EnumFontFamilies documentation RRS feed

  • Question

  • Hi, ALL,

    On the page, the 3rd parameter can be given a value of DEVICE_FONTTYPE, RASTER_FONTTYPE or TRUETYPE_FONTTYPE.

    However in the "Remarks" section the documentation talks about OpenType and TrueType fonts.

    Does this mean that there is an undocumented OPENTYPE_FONTTYPE constant defined somewhere? Or OpenType fonts are returned under TRUETYPE_FONTTYPE?

    Is there a way to differentiate them?

    Could someone please clarify?

    Thank you.

    Friday, November 8, 2019 11:46 PM

All replies

  • In order to differentiate the fonts when the result includes TRUETYPE_FONTTYPE, maybe check the values of returned NEWTEXTMETRIC, which contains flags for OpenType and Type 1.

    Saturday, November 9, 2019 8:47 AM
  • I suggest you take a look at

    It explains that "An OpenType font is equivalent to a TrueType font except that an OpenType font allows PostScript glyph definitions in addition to TrueType glyph definitions."

    Viorel_ suggested examining the NEWTEXTMETRIC structure.  If you go to the related documentation, it defines bit flags NTM_PS_OPENTYPE for a "PostScript OpenType font" and NTM_TT_OPENTYPE for a "TrueType OpenType font".

    Saturday, November 9, 2019 10:21 AM