OEM Code Page bit of OS2.ulCodePageRange

When should / would I set bit 30 of the OS2.ulCodePageRange1?

The spec simply says "OEM Character Set" and I've run into a dead end looking for more info. Many fonts do seem to have this turned on ... 

Comments

  • Thomas PhinneyThomas Phinney Posts: 1,774
    edited February 7
    It probably doesn’t matter, unless you need VERY OLD apps that require linedraw / box drawing characters to recognize your font as supporting such. Modern apps look for codepoint support and do not rely on codepage settings in the fonts. (EDIT: apparently not true!) That said....

    The OEM character set was a single-byte character set that included ASCII, linedraw/block drawing characters—and potentially other characters that could vary from font to font, despite occupying the same codepoints.

    I do not know, but expect that the standardized part of the OEM character set is/was specifically the same linedraw / block drawing characters we see preserved in the WGL-4 character set: https://en.wikipedia.org/wiki/Windows_Glyph_List_4. That's ~ 48 characters. (The Unicode block for linedraw starts at U+2500 and runs up to U+257F. Block elements go from U+2580 to U+259F.)

    I would check the box if I supported those 48 characters. If I supported most but not all?... I would probably change the character set to support them all.

    Doubtless some Microsoft folks, especially those who were doing this stuff back in the 80s and 90s, could confirm or contradict my presumptions on this matter.
  • ClintGossClintGoss Posts: 32
    Thanks for that info ...
    Modern apps look for codepoint support and do not rely on codepage settings in the fonts. 
    MS Word (Office 365 Win10x64) rejected my font on Traditional Chinese characters because ulCodePageRange bit 20 (for Code Page 950) was not set. I was setting my bits with the guessRangeBits() perl routine in Font::TTF without realizing it sets all DBCS bits off. Decided to go through *all* the bits and programmatically set them correctly. Significant amount of code!

    It looks at first blush like Code Page 437 is a very close approximation to the OEM bit. There is a note about this at https://en.wikipedia.org/wiki/Windows_code_page#OEM_code_page. I'll start from that and modify as needed ... 


Sign In or Register to comment.