dwrite_3.idl 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005
  1. /*
  2. * Copyright 2016 Nikolay Sivov for CodeWeavers
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  17. */
  18. import "dwrite_2.idl";
  19. interface IDWriteFontFaceReference;
  20. interface IDWriteFontFaceReference1;
  21. interface IDWriteFontFace3;
  22. interface IDWriteFontSet;
  23. interface IDWriteFontDownloadQueue;
  24. interface IDWriteFontFace5;
  25. interface IDWriteFontList2;
  26. cpp_quote("#ifndef _WINGDI_")
  27. /* already defined in wingdi.h but needed for WIDL */
  28. typedef struct FONTSIGNATURE FONTSIGNATURE;
  29. cpp_quote("#endif /* _WINGDI_ */")
  30. typedef enum DWRITE_LOCALITY
  31. {
  32. DWRITE_LOCALITY_REMOTE,
  33. DWRITE_LOCALITY_PARTIAL,
  34. DWRITE_LOCALITY_LOCAL
  35. } DWRITE_LOCALITY;
  36. typedef enum DWRITE_RENDERING_MODE1
  37. {
  38. DWRITE_RENDERING_MODE1_DEFAULT,
  39. DWRITE_RENDERING_MODE1_ALIASED,
  40. DWRITE_RENDERING_MODE1_GDI_CLASSIC,
  41. DWRITE_RENDERING_MODE1_GDI_NATURAL,
  42. DWRITE_RENDERING_MODE1_NATURAL,
  43. DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC,
  44. DWRITE_RENDERING_MODE1_OUTLINE,
  45. DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
  46. } DWRITE_RENDERING_MODE1;
  47. typedef enum DWRITE_FONT_PROPERTY_ID
  48. {
  49. DWRITE_FONT_PROPERTY_ID_NONE,
  50. DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME,
  51. DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME,
  52. DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME,
  53. DWRITE_FONT_PROPERTY_ID_FULL_NAME,
  54. DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME,
  55. DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME,
  56. DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG,
  57. DWRITE_FONT_PROPERTY_ID_SUPPORTED_SCRIPT_LANGUAGE_TAG,
  58. DWRITE_FONT_PROPERTY_ID_SEMANTIC_TAG,
  59. DWRITE_FONT_PROPERTY_ID_WEIGHT,
  60. DWRITE_FONT_PROPERTY_ID_STRETCH,
  61. DWRITE_FONT_PROPERTY_ID_STYLE,
  62. DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FACE_NAME,
  63. DWRITE_FONT_PROPERTY_ID_TOTAL = DWRITE_FONT_PROPERTY_ID_STYLE + 1,
  64. DWRITE_FONT_PROPERTY_ID_TOTAL_RS3 = DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FACE_NAME + 1,
  65. DWRITE_FONT_PROPERTY_ID_FAMILY_NAME = DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME,
  66. DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME = DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME,
  67. DWRITE_FONT_PROPERTY_ID_FACE_NAME = DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME,
  68. } DWRITE_FONT_PROPERTY_ID;
  69. typedef struct DWRITE_FONT_PROPERTY
  70. {
  71. DWRITE_FONT_PROPERTY_ID propertyId;
  72. WCHAR const *propertyValue;
  73. WCHAR const *localeName;
  74. } DWRITE_FONT_PROPERTY;
  75. cpp_quote("#ifdef __cplusplus")
  76. cpp_quote("#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (static_cast<DWRITE_FONT_AXIS_TAG>(DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d)))")
  77. cpp_quote("#else")
  78. cpp_quote("#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d))")
  79. cpp_quote("#endif")
  80. typedef enum DWRITE_FONT_AXIS_TAG
  81. {
  82. DWRITE_FONT_AXIS_TAG_WEIGHT = 0x74686777, /* 'wght' */
  83. DWRITE_FONT_AXIS_TAG_WIDTH = 0x68746477, /* 'wdth' */
  84. DWRITE_FONT_AXIS_TAG_SLANT = 0x746e6c73, /* 'slnt' */
  85. DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE = 0x7a73706f, /* 'opsz' */
  86. DWRITE_FONT_AXIS_TAG_ITALIC = 0x6c617469, /* 'ital' */
  87. } DWRITE_FONT_AXIS_TAG;
  88. typedef enum DWRITE_FONT_SOURCE_TYPE
  89. {
  90. DWRITE_FONT_SOURCE_TYPE_UNKNOWN,
  91. DWRITE_FONT_SOURCE_TYPE_PER_MACHINE,
  92. DWRITE_FONT_SOURCE_TYPE_PER_USER,
  93. DWRITE_FONT_SOURCE_TYPE_APPX_PACKAGE,
  94. DWRITE_FONT_SOURCE_TYPE_REMOTE_FONT_PROVIDER
  95. } DWRITE_FONT_SOURCE_TYPE;
  96. typedef struct DWRITE_FONT_AXIS_VALUE
  97. {
  98. DWRITE_FONT_AXIS_TAG axisTag;
  99. FLOAT value;
  100. } DWRITE_FONT_AXIS_VALUE;
  101. typedef struct DWRITE_FONT_AXIS_RANGE
  102. {
  103. DWRITE_FONT_AXIS_TAG axisTag;
  104. FLOAT minValue;
  105. FLOAT maxValue;
  106. } DWRITE_FONT_AXIS_RANGE;
  107. typedef enum DWRITE_AUTOMATIC_FONT_AXES
  108. {
  109. DWRITE_AUTOMATIC_FONT_AXES_NONE,
  110. DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE,
  111. } DWRITE_AUTOMATIC_FONT_AXES;
  112. typedef enum DWRITE_FONT_AXIS_ATTRIBUTES
  113. {
  114. DWRITE_FONT_AXIS_ATTRIBUTES_NONE,
  115. DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE,
  116. DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN,
  117. } DWRITE_FONT_AXIS_ATTRIBUTES;
  118. typedef enum DWRITE_FONT_FAMILY_MODEL
  119. {
  120. DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC,
  121. DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE,
  122. } DWRITE_FONT_FAMILY_MODEL;
  123. [
  124. local,
  125. object,
  126. uuid(b06fe5b9-43ec-4393-881b-dbe4dc72fda7)
  127. ]
  128. interface IDWriteFontDownloadListener : IUnknown
  129. {
  130. void DownloadCompleted(IDWriteFontDownloadQueue *queue, IUnknown *context, HRESULT result);
  131. }
  132. [
  133. local,
  134. object,
  135. uuid(b71e6052-5aea-4fa3-832e-f60d431f7e91)
  136. ]
  137. interface IDWriteFontDownloadQueue : IUnknown
  138. {
  139. HRESULT AddListener(IDWriteFontDownloadListener *listener, UINT32 *token);
  140. HRESULT RemoveListener(UINT32 token);
  141. BOOL IsEmpty();
  142. HRESULT BeginDownload(IUnknown *context);
  143. HRESULT CancelDownload();
  144. UINT64 GetGenerationCount();
  145. }
  146. [
  147. local,
  148. object,
  149. uuid(b7924baa-391b-412a-8c5c-e44cc2d867dc)
  150. ]
  151. interface IDWriteRenderingParams3 : IDWriteRenderingParams2
  152. {
  153. DWRITE_RENDERING_MODE1 GetRenderingMode1();
  154. }
  155. [
  156. local,
  157. object,
  158. uuid(cfee3140-1257-47ca-8b85-31bfcf3f2d0e)
  159. ]
  160. interface IDWriteStringList : IUnknown
  161. {
  162. UINT32 GetCount();
  163. HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
  164. HRESULT GetLocaleName(UINT32 index, WCHAR *name, UINT32 size);
  165. HRESULT GetStringLength(UINT32 index, UINT32 *length);
  166. HRESULT GetString(UINT32 index, WCHAR *string, UINT32 size);
  167. }
  168. [
  169. local,
  170. object,
  171. uuid(53585141-d9f8-4095-8321-d73cf6bd116b)
  172. ]
  173. interface IDWriteFontSet : IUnknown
  174. {
  175. UINT32 GetFontCount();
  176. HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
  177. HRESULT FindFontFaceReference(IDWriteFontFaceReference *reference,
  178. UINT32 *index, BOOL *exists);
  179. HRESULT FindFontFace(IDWriteFontFace *fontface, UINT32 *index, BOOL *exists);
  180. HRESULT GetPropertyValues__(DWRITE_FONT_PROPERTY_ID id, IDWriteStringList **values);
  181. HRESULT GetPropertyValues_(DWRITE_FONT_PROPERTY_ID id,
  182. WCHAR const *preferred_locales, IDWriteStringList **values);
  183. HRESULT GetPropertyValues(UINT32 index, DWRITE_FONT_PROPERTY_ID id, BOOL *exists,
  184. IDWriteLocalizedStrings **values);
  185. HRESULT GetPropertyOccurrenceCount(DWRITE_FONT_PROPERTY const *property, UINT32 *count);
  186. HRESULT GetMatchingFonts_(WCHAR const *family, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch,
  187. DWRITE_FONT_STYLE style, IDWriteFontSet **fontset);
  188. HRESULT GetMatchingFonts(DWRITE_FONT_PROPERTY const *props, UINT32 count, IDWriteFontSet **fontset);
  189. }
  190. [
  191. local,
  192. object,
  193. uuid(1f803a76-6871-48e8-987f-b975551c50f2)
  194. ]
  195. interface IDWriteFontResource : IUnknown
  196. {
  197. HRESULT GetFontFile(IDWriteFontFile **fontfile);
  198. UINT32 GetFontFaceIndex();
  199. UINT32 GetFontAxisCount();
  200. HRESULT GetDefaultFontAxisValues(
  201. DWRITE_FONT_AXIS_VALUE *values,
  202. UINT32 num_values);
  203. HRESULT GetFontAxisRanges(
  204. DWRITE_FONT_AXIS_RANGE *ranges,
  205. UINT32 num_ranges);
  206. DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes(
  207. UINT32 axis);
  208. HRESULT GetAxisNames(
  209. UINT32 axis,
  210. IDWriteLocalizedStrings **names);
  211. UINT32 GetAxisValueNameCount(
  212. UINT32 axis);
  213. HRESULT GetAxisValueNames(
  214. UINT32 axis,
  215. UINT32 axis_value,
  216. DWRITE_FONT_AXIS_RANGE *axis_range,
  217. IDWriteLocalizedStrings **names);
  218. BOOL HasVariations();
  219. HRESULT CreateFontFace(
  220. DWRITE_FONT_SIMULATIONS simulations,
  221. DWRITE_FONT_AXIS_VALUE const *axis_values,
  222. UINT32 num_values,
  223. IDWriteFontFace5 **fontface);
  224. HRESULT CreateFontFaceReference(
  225. DWRITE_FONT_SIMULATIONS simulations,
  226. DWRITE_FONT_AXIS_VALUE const *axis_values,
  227. UINT32 num_values,
  228. IDWriteFontFaceReference1 **reference);
  229. }
  230. [
  231. local,
  232. object,
  233. uuid(7e9fda85-6c92-4053-bc47-7ae3530db4d3)
  234. ]
  235. interface IDWriteFontSet1 : IDWriteFontSet
  236. {
  237. HRESULT GetMatchingFonts(
  238. DWRITE_FONT_PROPERTY const *property,
  239. DWRITE_FONT_AXIS_VALUE const *axis_values,
  240. UINT32 num_values,
  241. IDWriteFontSet1 **fontset);
  242. HRESULT GetFirstFontResources(IDWriteFontSet1 **fontset);
  243. HRESULT GetFilteredFonts__(
  244. UINT32 const *indices,
  245. UINT32 num_indices,
  246. IDWriteFontSet1 **fontset);
  247. HRESULT GetFilteredFonts_(
  248. DWRITE_FONT_AXIS_RANGE const *axis_ranges,
  249. UINT32 num_ranges,
  250. BOOL select_any_range,
  251. IDWriteFontSet1 **fontset);
  252. HRESULT GetFilteredFonts(
  253. DWRITE_FONT_PROPERTY const *props,
  254. UINT32 num_properties,
  255. BOOL select_any_property,
  256. IDWriteFontSet1 **fontset);
  257. HRESULT GetFilteredFontIndices_(
  258. DWRITE_FONT_AXIS_RANGE const *ranges,
  259. UINT32 num_ranges,
  260. BOOL select_any_range,
  261. UINT32 *indices,
  262. UINT32 num_indices,
  263. UINT32 *actual_num_indices);
  264. HRESULT GetFilteredFontIndices(
  265. DWRITE_FONT_PROPERTY const *props,
  266. UINT32 num_properties,
  267. BOOL select_any_range,
  268. UINT32 *indices,
  269. UINT32 num_indices,
  270. UINT32 *actual_num_indices);
  271. HRESULT GetFontAxisRanges_(
  272. UINT32 font_index,
  273. DWRITE_FONT_AXIS_RANGE *axis_ranges,
  274. UINT32 num_ranges,
  275. UINT32 *actual_num_ranges);
  276. HRESULT GetFontAxisRanges(
  277. DWRITE_FONT_AXIS_RANGE *axis_ranges,
  278. UINT32 num_ranges,
  279. UINT32 *actual_num_ranges);
  280. HRESULT GetFontFaceReference(
  281. UINT32 index,
  282. IDWriteFontFaceReference1 **reference);
  283. HRESULT CreateFontResource(
  284. UINT32 index,
  285. IDWriteFontResource **resource);
  286. HRESULT CreateFontFace(
  287. UINT32 index,
  288. IDWriteFontFace5 **fontface);
  289. DWRITE_LOCALITY GetFontLocality(UINT32 index);
  290. }
  291. [
  292. local,
  293. object,
  294. uuid(29748ed6-8c9c-4a6a-be0b-d912e8538944)
  295. ]
  296. interface IDWriteFont3 : IDWriteFont2
  297. {
  298. HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
  299. BOOL Equals(IDWriteFont *font);
  300. HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
  301. BOOL HasCharacter(UINT32 character);
  302. DWRITE_LOCALITY GetLocality();
  303. }
  304. [
  305. local,
  306. object,
  307. uuid(da20d8ef-812a-4c43-9802-62ec4abd7adf)
  308. ]
  309. interface IDWriteFontFamily1 : IDWriteFontFamily
  310. {
  311. DWRITE_LOCALITY GetFontLocality(UINT32 index);
  312. HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
  313. HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
  314. }
  315. [
  316. local,
  317. object,
  318. uuid(3ed49e77-a398-4261-b9cf-c126c2131ef3)
  319. ]
  320. interface IDWriteFontFamily2 : IDWriteFontFamily1
  321. {
  322. HRESULT GetMatchingFonts(
  323. DWRITE_FONT_AXIS_VALUE const *axis_values,
  324. UINT32 num_values,
  325. IDWriteFontList2 **fontlist);
  326. HRESULT GetFontSet(IDWriteFontSet1 **fontset);
  327. }
  328. [
  329. local,
  330. object,
  331. uuid(53585141-d9f8-4095-8321-d73cf6bd116c)
  332. ]
  333. interface IDWriteFontCollection1 : IDWriteFontCollection
  334. {
  335. HRESULT GetFontSet(IDWriteFontSet **fontset);
  336. HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily1 **family);
  337. }
  338. [
  339. local,
  340. object,
  341. uuid(514039c6-4617-4064-bf8b-92ea83e506e0)
  342. ]
  343. interface IDWriteFontCollection2 : IDWriteFontCollection1
  344. {
  345. HRESULT GetFontFamily(
  346. UINT32 index,
  347. IDWriteFontFamily2 **family);
  348. HRESULT GetMatchingFonts(
  349. const WCHAR *familyname,
  350. DWRITE_FONT_AXIS_VALUE const *axis_values,
  351. UINT32 num_values,
  352. IDWriteFontList2 **fontlist);
  353. DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel();
  354. HRESULT GetFontSet(IDWriteFontSet1 **fontset);
  355. }
  356. [
  357. local,
  358. object,
  359. uuid(a4d055a6-f9e3-4e25-93b7-9e309f3af8e9)
  360. ]
  361. interface IDWriteFontCollection3 : IDWriteFontCollection2
  362. {
  363. HANDLE GetExpirationEvent();
  364. }
  365. [
  366. local,
  367. object,
  368. uuid(5e7fa7ca-dde3-424c-89f0-9fcd6fed58cd)
  369. ]
  370. interface IDWriteFontFaceReference : IUnknown
  371. {
  372. HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
  373. HRESULT CreateFontFaceWithSimulations(DWRITE_FONT_SIMULATIONS simulations,
  374. IDWriteFontFace3 **fontface);
  375. BOOL Equals(IDWriteFontFaceReference *reference);
  376. UINT32 GetFontFaceIndex();
  377. DWRITE_FONT_SIMULATIONS GetSimulations();
  378. HRESULT GetFontFile(IDWriteFontFile **fontfile);
  379. UINT64 GetLocalFileSize();
  380. UINT64 GetFileSize();
  381. HRESULT GetFileTime(FILETIME *writetime);
  382. DWRITE_LOCALITY GetLocality();
  383. HRESULT EnqueueFontDownloadRequest();
  384. HRESULT EnqueueCharacterDownloadRequest(WCHAR const *chars, UINT32 count);
  385. HRESULT EnqueueGlyphDownloadRequest(UINT16 const *glyphs, UINT32 count);
  386. HRESULT EnqueueFileFragmentDownloadRequest(UINT64 offset, UINT64 size);
  387. }
  388. [
  389. local,
  390. object,
  391. uuid(c081fe77-2fd1-41ac-a5a3-34983c4ba61a)
  392. ]
  393. interface IDWriteFontFaceReference1 : IDWriteFontFaceReference
  394. {
  395. HRESULT CreateFontFace(IDWriteFontFace5 **fontface);
  396. UINT32 GetFontAxisValueCount();
  397. HRESULT GetFontAxisValues(
  398. DWRITE_FONT_AXIS_VALUE *values,
  399. UINT32 num_values);
  400. }
  401. [
  402. local,
  403. object,
  404. uuid(da20d8ef-812a-4c43-9802-62ec4abd7ade)
  405. ]
  406. interface IDWriteFontList1 : IDWriteFontList
  407. {
  408. DWRITE_LOCALITY GetFontLocality(UINT32 index);
  409. HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
  410. HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
  411. }
  412. [
  413. local,
  414. object,
  415. uuid(c0763a34-77af-445a-b735-08c37b0a5bf5)
  416. ]
  417. interface IDWriteFontList2 : IDWriteFontList1
  418. {
  419. HRESULT GetFontSet(IDWriteFontSet1 **fontset);
  420. }
  421. [
  422. local,
  423. object,
  424. uuid(dc7ead19-e54c-43af-b2da-4e2b79ba3f7f)
  425. ]
  426. interface IDWriteFontSet2 : IDWriteFontSet1
  427. {
  428. HANDLE GetExpirationEvent();
  429. }
  430. [
  431. local,
  432. object,
  433. uuid(7c073ef2-a7f4-4045-8c32-8ab8ae640f90)
  434. ]
  435. interface IDWriteFontSet3 : IDWriteFontSet2
  436. {
  437. DWRITE_FONT_SOURCE_TYPE GetFontSourceType(UINT32 index);
  438. UINT32 GetFontSourceNameLength(UINT32 index);
  439. HRESULT GetFontSourceName(UINT32 index, WCHAR *buffer, UINT32 buffer_size);
  440. }
  441. [
  442. local,
  443. object,
  444. uuid(d37d7598-09be-4222-a236-2081341cc1f2)
  445. ]
  446. interface IDWriteFontFace3 : IDWriteFontFace2
  447. {
  448. HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
  449. void GetPanose(DWRITE_PANOSE *panose);
  450. DWRITE_FONT_WEIGHT GetWeight();
  451. DWRITE_FONT_STRETCH GetStretch();
  452. DWRITE_FONT_STYLE GetStyle();
  453. HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
  454. HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
  455. HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID stringid,
  456. IDWriteLocalizedStrings **strings,
  457. BOOL *exists);
  458. BOOL HasCharacter(UINT32 character);
  459. HRESULT GetRecommendedRenderingMode(
  460. FLOAT emsize,
  461. FLOAT dpi_x,
  462. FLOAT dpi_y,
  463. DWRITE_MATRIX const *transform,
  464. BOOL is_sideways,
  465. DWRITE_OUTLINE_THRESHOLD threshold,
  466. DWRITE_MEASURING_MODE measuring_mode,
  467. IDWriteRenderingParams *params,
  468. DWRITE_RENDERING_MODE1 *rendering_mode,
  469. DWRITE_GRID_FIT_MODE *gridfit_mode);
  470. BOOL IsCharacterLocal(UINT32 character);
  471. BOOL IsGlyphLocal(UINT16 glyph);
  472. HRESULT AreCharactersLocal(WCHAR const *characters,
  473. UINT32 count, BOOL enqueue_if_not, BOOL *are_local);
  474. HRESULT AreGlyphsLocal(UINT16 const *glyphs, UINT32 count,
  475. BOOL enqueue_if_not, BOOL *are_local);
  476. }
  477. typedef struct DWRITE_LINE_METRICS1
  478. {
  479. UINT32 length;
  480. UINT32 trailingWhitespaceLength;
  481. UINT32 newlineLength;
  482. FLOAT height;
  483. FLOAT baseline;
  484. BOOL isTrimmed;
  485. FLOAT leadingBefore;
  486. FLOAT leadingAfter;
  487. } DWRITE_LINE_METRICS1;
  488. typedef enum DWRITE_FONT_LINE_GAP_USAGE
  489. {
  490. DWRITE_FONT_LINE_GAP_USAGE_DEFAULT,
  491. DWRITE_FONT_LINE_GAP_USAGE_DISABLED,
  492. DWRITE_FONT_LINE_GAP_USAGE_ENABLED
  493. } DWRITE_FONT_LINE_GAP_USAGE;
  494. typedef struct DWRITE_LINE_SPACING
  495. {
  496. DWRITE_LINE_SPACING_METHOD method;
  497. FLOAT height;
  498. FLOAT baseline;
  499. FLOAT leadingBefore;
  500. DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
  501. } DWRITE_LINE_SPACING;
  502. [
  503. local,
  504. object,
  505. uuid(f67e0edd-9e3d-4ecc-8c32-4183253dfe70)
  506. ]
  507. interface IDWriteTextFormat2 : IDWriteTextFormat1
  508. {
  509. HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
  510. HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
  511. }
  512. [
  513. local,
  514. object,
  515. uuid(6d3b5641-e550-430d-a85b-b7bf48a93427)
  516. ]
  517. interface IDWriteTextFormat3 : IDWriteTextFormat2
  518. {
  519. HRESULT SetFontAxisValues(
  520. DWRITE_FONT_AXIS_VALUE const *axis_values,
  521. UINT32 num_values);
  522. UINT32 GetFontAxisValueCount();
  523. HRESULT GetFontAxisValues(
  524. DWRITE_FONT_AXIS_VALUE *axis_values,
  525. UINT32 num_values);
  526. DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
  527. HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
  528. }
  529. [
  530. local,
  531. object,
  532. uuid(07ddcd52-020e-4de8-ac33-6c953d83f92d)
  533. ]
  534. interface IDWriteTextLayout3 : IDWriteTextLayout2
  535. {
  536. HRESULT InvalidateLayout();
  537. HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
  538. HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
  539. HRESULT GetLineMetrics(DWRITE_LINE_METRICS1 *metrics, UINT32 max_count, UINT32 *count);
  540. }
  541. [
  542. local,
  543. object,
  544. uuid(05a9bf42-223f-4441-b5fb-8263685f55e9)
  545. ]
  546. interface IDWriteTextLayout4 : IDWriteTextLayout3
  547. {
  548. HRESULT SetFontAxisValues(
  549. DWRITE_FONT_AXIS_VALUE const *axis_values,
  550. UINT32 num_values,
  551. DWRITE_TEXT_RANGE range);
  552. UINT32 GetFontAxisValueCount(UINT32 pos);
  553. HRESULT GetFontAxisValues(
  554. UINT32 pos,
  555. DWRITE_FONT_AXIS_VALUE *values,
  556. UINT32 num_values,
  557. DWRITE_TEXT_RANGE *range);
  558. DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
  559. HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
  560. }
  561. [
  562. local,
  563. object,
  564. uuid(2397599d-dd0d-4681-bd6a-f4f31eaade77)
  565. ]
  566. interface IDWriteFontFallback1 : IDWriteFontFallback
  567. {
  568. HRESULT MapCharacters(
  569. IDWriteTextAnalysisSource *source,
  570. UINT32 pos,
  571. UINT32 length,
  572. IDWriteFontCollection *base_collection,
  573. const WCHAR *familyname,
  574. DWRITE_FONT_AXIS_VALUE const *axis_values,
  575. UINT32 num_values,
  576. UINT32 *mapped_length,
  577. FLOAT *scale,
  578. IDWriteFontFace5 **fontface);
  579. }
  580. [
  581. local,
  582. object,
  583. uuid(4556be70-3abd-4f70-90be-421780a6f515)
  584. ]
  585. interface IDWriteGdiInterop1 : IDWriteGdiInterop
  586. {
  587. HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont,
  588. IDWriteFontCollection *collection,
  589. IDWriteFont **font);
  590. /* GetFontSignature() methods are listed in reversed order to make
  591. resulting vtable order compatible. */
  592. HRESULT GetFontSignature_(IDWriteFontFace *fontface, FONTSIGNATURE *fontsig);
  593. HRESULT GetFontSignature(IDWriteFont *font, FONTSIGNATURE *fontsig);
  594. HRESULT GetMatchingFontsByLOGFONT(LOGFONTW const *logfont,
  595. IDWriteFontSet *fontset,
  596. IDWriteFontSet **subset);
  597. }
  598. [
  599. local,
  600. object,
  601. uuid(2f642afe-9c68-4f40-b8be-457401afcb3d)
  602. ]
  603. interface IDWriteFontSetBuilder : IUnknown
  604. {
  605. HRESULT AddFontFaceReference_(IDWriteFontFaceReference *ref,
  606. DWRITE_FONT_PROPERTY const *props,
  607. UINT32 prop_count);
  608. HRESULT AddFontFaceReference(IDWriteFontFaceReference *ref);
  609. HRESULT AddFontSet(IDWriteFontSet *fontset);
  610. HRESULT CreateFontSet(IDWriteFontSet **fontset);
  611. }
  612. [
  613. local,
  614. object,
  615. uuid(3ff7715f-3cdc-4dc6-9b72-ec5621dccafd)
  616. ]
  617. interface IDWriteFontSetBuilder1 : IDWriteFontSetBuilder
  618. {
  619. HRESULT AddFontFile(IDWriteFontFile *file);
  620. }
  621. [
  622. local,
  623. object,
  624. uuid(ee5ba612-b131-463c-8f4f-3189b9401e45)
  625. ]
  626. interface IDWriteFontSetBuilder2 : IDWriteFontSetBuilder1
  627. {
  628. HRESULT AddFont(
  629. IDWriteFontFile *fontfile,
  630. UINT32 face_index,
  631. DWRITE_FONT_SIMULATIONS simulations,
  632. DWRITE_FONT_AXIS_VALUE const *axis_values,
  633. UINT32 num_values,
  634. DWRITE_FONT_AXIS_RANGE const *axis_ranges,
  635. UINT32 num_ranges,
  636. DWRITE_FONT_PROPERTY const *props,
  637. UINT32 num_properties);
  638. HRESULT AddFontFile(const WCHAR *filepath);
  639. }
  640. [
  641. local,
  642. object,
  643. uuid(9a1b41c3-d3bb-466a-87fc-fe67556a3b65)
  644. ]
  645. interface IDWriteFactory3 : IDWriteFactory2
  646. {
  647. HRESULT CreateGlyphRunAnalysis(
  648. DWRITE_GLYPH_RUN const *run,
  649. DWRITE_MATRIX const *transform,
  650. DWRITE_RENDERING_MODE1 rendering_mode,
  651. DWRITE_MEASURING_MODE measuring_mode,
  652. DWRITE_GRID_FIT_MODE gridfit_mode,
  653. DWRITE_TEXT_ANTIALIAS_MODE antialias_mode,
  654. FLOAT origin_x,
  655. FLOAT origin_y,
  656. IDWriteGlyphRunAnalysis **analysis);
  657. HRESULT CreateCustomRenderingParams(
  658. FLOAT gamma,
  659. FLOAT enhanced_contrast,
  660. FLOAT grayscale_enhanced_contrast,
  661. FLOAT cleartype_level,
  662. DWRITE_PIXEL_GEOMETRY pixel_geometry,
  663. DWRITE_RENDERING_MODE1 rendering_mode,
  664. DWRITE_GRID_FIT_MODE gridfit_mode,
  665. IDWriteRenderingParams3 **params);
  666. /* CreateFontFaceReference methods are listed in reversed order to make
  667. resulting vtable order compatible. */
  668. HRESULT CreateFontFaceReference_(
  669. IDWriteFontFile *file,
  670. UINT32 index,
  671. DWRITE_FONT_SIMULATIONS simulations,
  672. IDWriteFontFaceReference **reference);
  673. HRESULT CreateFontFaceReference(
  674. WCHAR const *path,
  675. FILETIME const *writetime,
  676. UINT32 index,
  677. DWRITE_FONT_SIMULATIONS simulations,
  678. IDWriteFontFaceReference **reference);
  679. HRESULT GetSystemFontSet(IDWriteFontSet **fontset);
  680. HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder **builder);
  681. HRESULT CreateFontCollectionFromFontSet(
  682. IDWriteFontSet *fontset,
  683. IDWriteFontCollection1 **collection);
  684. HRESULT GetSystemFontCollection(
  685. BOOL include_downloadable,
  686. IDWriteFontCollection1 **collection,
  687. BOOL check_for_updates);
  688. HRESULT GetFontDownloadQueue(IDWriteFontDownloadQueue **queue);
  689. }
  690. typedef struct DWRITE_GLYPH_IMAGE_DATA
  691. {
  692. void const *imageData;
  693. UINT32 imageDataSize;
  694. UINT32 uniqueDataId;
  695. UINT32 pixelsPerEm;
  696. D2D1_SIZE_U pixelSize;
  697. D2D1_POINT_2L horizontalLeftOrigin;
  698. D2D1_POINT_2L horizontalRightOrigin;
  699. D2D1_POINT_2L verticalTopOrigin;
  700. D2D1_POINT_2L verticalBottomOrigin;
  701. } DWRITE_GLYPH_IMAGE_DATA;
  702. [
  703. local,
  704. object,
  705. uuid(27f2a904-4eb8-441d-9678-0563f53e3e2f)
  706. ]
  707. interface IDWriteFontFace4 : IDWriteFontFace3
  708. {
  709. HRESULT GetGlyphImageFormats_(
  710. UINT16 glyph,
  711. UINT32 ppem_first,
  712. UINT32 ppem_last,
  713. DWRITE_GLYPH_IMAGE_FORMATS *formats);
  714. DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats();
  715. HRESULT GetGlyphImageData(
  716. UINT16 glyph,
  717. UINT32 ppem,
  718. DWRITE_GLYPH_IMAGE_FORMATS format,
  719. DWRITE_GLYPH_IMAGE_DATA *data,
  720. void **context);
  721. void ReleaseGlyphImageData(void *context);
  722. }
  723. [
  724. local,
  725. object,
  726. uuid(98eff3a5-b667-479a-b145-e2fa5b9fdc29)
  727. ]
  728. interface IDWriteFontFace5 : IDWriteFontFace4
  729. {
  730. UINT32 GetFontAxisValueCount();
  731. HRESULT GetFontAxisValues(
  732. DWRITE_FONT_AXIS_VALUE *values,
  733. UINT32 value_count);
  734. BOOL HasVariations();
  735. HRESULT GetFontResource(IDWriteFontResource **resource);
  736. BOOL Equals(IDWriteFontFace *fontface);
  737. }
  738. typedef struct DWRITE_COLOR_GLYPH_RUN1 DWRITE_COLOR_GLYPH_RUN1;
  739. cpp_quote("struct DWRITE_COLOR_GLYPH_RUN1")
  740. cpp_quote("{")
  741. cpp_quote(" DWRITE_GLYPH_RUN glyphRun;")
  742. cpp_quote(" DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription;")
  743. cpp_quote(" FLOAT baselineOriginX;")
  744. cpp_quote(" FLOAT baselineOriginY;")
  745. cpp_quote(" DWRITE_COLOR_F runColor;")
  746. cpp_quote(" UINT16 paletteIndex;")
  747. cpp_quote("#ifdef _WIN64")
  748. cpp_quote(" UINT32 _pad;")
  749. cpp_quote("#endif")
  750. cpp_quote(" DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat;")
  751. cpp_quote(" DWRITE_MEASURING_MODE measuringMode;")
  752. cpp_quote("};")
  753. [
  754. local,
  755. object,
  756. uuid(7c5f86da-c7a1-4f05-b8e1-55a179fe5a35)
  757. ]
  758. interface IDWriteColorGlyphRunEnumerator1 : IDWriteColorGlyphRunEnumerator
  759. {
  760. HRESULT GetCurrentRun(
  761. DWRITE_COLOR_GLYPH_RUN1 const **run);
  762. }
  763. [
  764. local,
  765. object,
  766. uuid(4b0b5bd3-0797-4549-8ac5-fe915cc53856)
  767. ]
  768. interface IDWriteFactory4 : IDWriteFactory3
  769. {
  770. HRESULT TranslateColorGlyphRun(
  771. D2D1_POINT_2F baseline_origin,
  772. DWRITE_GLYPH_RUN const *run,
  773. DWRITE_GLYPH_RUN_DESCRIPTION const *run_desc,
  774. DWRITE_GLYPH_IMAGE_FORMATS desired_formats,
  775. DWRITE_MEASURING_MODE measuring_mode,
  776. DWRITE_MATRIX const *transform,
  777. UINT32 palette,
  778. IDWriteColorGlyphRunEnumerator1 **layers);
  779. HRESULT ComputeGlyphOrigins_(
  780. DWRITE_GLYPH_RUN const *run,
  781. D2D1_POINT_2F baseline_origin,
  782. D2D1_POINT_2F *origins);
  783. HRESULT ComputeGlyphOrigins(
  784. DWRITE_GLYPH_RUN const *run,
  785. DWRITE_MEASURING_MODE measuring_mode,
  786. D2D1_POINT_2F baseline_origin,
  787. DWRITE_MATRIX const *transform,
  788. D2D1_POINT_2F *origins);
  789. }
  790. [
  791. local,
  792. object,
  793. uuid(ce25f8fd-863b-4d13-9651-c1f88dc73fe2)
  794. ]
  795. interface IDWriteAsyncResult : IUnknown
  796. {
  797. HANDLE GetWaitHandle();
  798. HRESULT GetResult();
  799. }
  800. typedef struct DWRITE_FILE_FRAGMENT
  801. {
  802. UINT64 fileOffset;
  803. UINT64 fragmentSize;
  804. } DWRITE_FILE_FRAGMENT;
  805. [
  806. local,
  807. object,
  808. uuid(4db3757a-2c72-4ed9-b2b6-1ababe1aff9c)
  809. ]
  810. interface IDWriteRemoteFontFileStream : IDWriteFontFileStream
  811. {
  812. HRESULT GetLocalFileSize(UINT64 *size);
  813. HRESULT GetFileFragmentLocality(UINT64 offset, UINT64 size, BOOL *is_local, UINT64 *partial_size);
  814. DWRITE_LOCALITY GetLocality();
  815. HRESULT BeginDownload(
  816. GUID const *operation_id,
  817. DWRITE_FILE_FRAGMENT const *fragments,
  818. UINT32 fragment_count,
  819. IDWriteAsyncResult **async_result);
  820. }
  821. typedef enum DWRITE_CONTAINER_TYPE
  822. {
  823. DWRITE_CONTAINER_TYPE_UNKNOWN,
  824. DWRITE_CONTAINER_TYPE_WOFF,
  825. DWRITE_CONTAINER_TYPE_WOFF2,
  826. } DWRITE_CONTAINER_TYPE;
  827. [
  828. local,
  829. object,
  830. uuid(68648c83-6ede-46c0-ab46-20083a887fde)
  831. ]
  832. interface IDWriteRemoteFontFileLoader : IDWriteFontFileLoader
  833. {
  834. HRESULT CreateRemoteStreamFromKey(void const *key, UINT32 key_size, IDWriteRemoteFontFileStream **stream);
  835. HRESULT GetLocalityFromKey(void const *key, UINT32 key_size, DWRITE_LOCALITY *locality);
  836. HRESULT CreateFontFileReferenceFromUrl(
  837. IDWriteFactory *factory,
  838. WCHAR const *base_url,
  839. WCHAR const *file_url,
  840. IDWriteFontFile **fontfile);
  841. }
  842. [
  843. local,
  844. object,
  845. uuid(dc102f47-a12d-4b1c-822d-9e117e33043f)
  846. ]
  847. interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
  848. {
  849. HRESULT CreateInMemoryFontFileReference(
  850. IDWriteFactory *factory,
  851. void const *data,
  852. UINT32 data_size,
  853. IUnknown *owner,
  854. IDWriteFontFile **fontfile);
  855. UINT32 GetFileCount();
  856. }
  857. [
  858. local,
  859. object,
  860. uuid(958db99a-be2a-4f09-af7d-65189803d1d3)
  861. ]
  862. interface IDWriteFactory5 : IDWriteFactory4
  863. {
  864. HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder);
  865. HRESULT CreateInMemoryFontFileLoader(IDWriteInMemoryFontFileLoader **loader);
  866. HRESULT CreateHttpFontFileLoader(
  867. WCHAR const *referrer_url,
  868. WCHAR const *extra_headers,
  869. IDWriteRemoteFontFileLoader **loader);
  870. DWRITE_CONTAINER_TYPE AnalyzeContainerType(void const *data, UINT32 data_size);
  871. HRESULT UnpackFontFile(
  872. DWRITE_CONTAINER_TYPE container_type,
  873. void const *data,
  874. UINT32 data_size,
  875. IDWriteFontFileStream **stream);
  876. }
  877. [
  878. local,
  879. object,
  880. uuid(f3744d80-21f7-42eb-b35d-995bc72fc223)
  881. ]
  882. interface IDWriteFactory6 : IDWriteFactory5
  883. {
  884. HRESULT CreateFontFaceReference(
  885. IDWriteFontFile *file,
  886. UINT32 face_index,
  887. DWRITE_FONT_SIMULATIONS simulations,
  888. DWRITE_FONT_AXIS_VALUE const *axis_values,
  889. UINT32 num_axis,
  890. IDWriteFontFaceReference1 **face_ref);
  891. HRESULT CreateFontResource(
  892. IDWriteFontFile *file,
  893. UINT32 face_index,
  894. IDWriteFontResource **resource);
  895. HRESULT GetSystemFontSet(
  896. BOOL include_downloadable,
  897. IDWriteFontSet1 **fontset);
  898. HRESULT GetSystemFontCollection(
  899. BOOL include_downloadable,
  900. DWRITE_FONT_FAMILY_MODEL family_model,
  901. IDWriteFontCollection2 **collection);
  902. HRESULT CreateFontCollectionFromFontSet(
  903. IDWriteFontSet *fontset,
  904. DWRITE_FONT_FAMILY_MODEL family_model,
  905. IDWriteFontCollection2 **collection);
  906. HRESULT CreateFontSetBuilder(
  907. IDWriteFontSetBuilder2 **builder);
  908. HRESULT CreateTextFormat(
  909. const WCHAR *familyname,
  910. IDWriteFontCollection *collection,
  911. DWRITE_FONT_AXIS_VALUE const *axis_values,
  912. UINT32 num_axis,
  913. FLOAT fontsize,
  914. const WCHAR *localename,
  915. IDWriteTextFormat3 **format);
  916. }
  917. [
  918. local,
  919. object,
  920. uuid(35d0e0b3-9076-4d2e-a016-a91b568a06b4)
  921. ]
  922. interface IDWriteFactory7 : IDWriteFactory6
  923. {
  924. HRESULT GetSystemFontSet(
  925. BOOL include_downloadable,
  926. IDWriteFontSet2 **fontset);
  927. HRESULT GetSystemFontCollection(
  928. BOOL include_downloadable,
  929. DWRITE_FONT_FAMILY_MODEL family_model,
  930. IDWriteFontCollection3 **collection);
  931. }