You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOGFONTW docs outline enum-like typed values for certain members of its struct e.g. lfOutPrecision,lfQuality. It would be nice to update the definition to return an enum type for these members for readability.
For example, with lfOutPrecision, something like:
The docs also outline an LF_FACESIZE, which indicates the size of lfFaceName. Currently, the type of lfFaceName has a property Length which is essentially the LF_FACESIZE, but it would be nice to have this defined as an internal const in LOGFONTW to be able to reference this without having to first create one i.e. reference this value by calling LOGFONTW.LF_FACESIZE.
An enum can only have one size, so if the enum would tend to apply to sites that individually vary in size, we cannot share an enum between them. We could define the enum twice (with names to suggest their length), but I think we usually leave the enum undefined in such cases since it's perhaps not as cut-and-dry that it's a well-defined type.
Activity
elachlan commentedon Aug 18, 2022
CC: Andrew Arnott (@AArnott)
elachlan commentedon Aug 19, 2022
For
FONT_WEIGHTits is defined asLONG lfWeight.The structures CHARFORMAT2W/CHARFORMAT2A have a
WORD wWeightfield. The description says:If I include it, the build fails.
Similar issue with FONTDIFF/IFIMETRICS and their field
USHORT usWinWeight.Steve Otteson (@sotteson1) How do you reconcile that difference?
AArnott commentedon Aug 19, 2022
An enum can only have one size, so if the enum would tend to apply to sites that individually vary in size, we cannot share an enum between them. We could define the enum twice (with names to suggest their length), but I think we usually leave the enum undefined in such cases since it's perhaps not as cut-and-dry that it's a well-defined type.