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
  • Hello,

    Do you resolve the issue? If you resolve the issue, please "Mark as answer" or "Vote as helpful" post to the appropriate answer, so that it will help other members to find solution quickly if they face similar issue. If not, please feel free to contact us.

    Best Regards,

    Suarez Zhou

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, November 22, 2019 3:17 AM