1 / 20

Font Coverage in Windows

Bob Rasmussen: Master layout Codeexamples Printout format Transitions __Notes. Font Coverage in Windows. Bob Rasmussen Rasmussen Software, Inc. ras@anzio.com. Introduction . The problem Display many character/diacritic combinations An approach Determining font coverage

armelle
Télécharger la présentation

Font Coverage in Windows

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bob Rasmussen: • Master layout • Codeexamples • Printout format • Transitions • __Notes Font Coverage in Windows Bob Rasmussen Rasmussen Software, Inc. ras@anzio.com 17th International Unicode Conference

  2. Introduction • The problem • Display many character/diacritic combinations • An approach • Determining font coverage • Fallbacks for missing characters • Filling in the details 17th International Unicode Conference

  3. Statement of the Problem • Display/print a wide range of combos (some not in Unicode) • Use a single TrueType font • No operator interaction • Platforms: Win95 to Win2000 • Minor issues • Monospaced text, usually Courier New • Font coverage can vary with installed Windows options • Examples in Delphi 17th International Unicode Conference

  4. Issues • Combo may be in private use area • Character or combo may not exist in font • Diacritic may not exist in font • Combining diacritic may not “backspace” • May need to adjust vertical position • Transparency issues 17th International Unicode Conference

  5. Determining Font Coverage in a TrueType Font • Accessing the CMAP • Breaking apart the CMAP • Storing its information for easy use 17th International Unicode Conference

  6. Determining Font Coverage in a TrueType Font • Accessing the CMAP • Breaking apart the CMAP • Storing its information for easy use 17th International Unicode Conference

  7. Determining Font Coverage in a TrueType Font • Accessing the CMAP • Breaking apart the CMAP • Storing its information for easy use 17th International Unicode Conference

  8. Determining Font Coverage in a TrueType Font • Accessing the CMAP • Breaking apart the CMAP • Storing its information for easy use 17th International Unicode Conference

  9. Dealing with Missing Characters This routine will display a “tricky” character: 17th International Unicode Conference

  10. Dealing with Missing Characters Pseudo code: if (not in font) or (in private use area) if we can decompose to character + combining diacritic print base character remember its "top" make sure next character is combining advance to next character if this is a Unicode combining character check its x_offset if not in font, but alternate diacritic IS, use alternate 17th International Unicode Conference

  11. Dealing with Missing Characters Pseudo code: if (not in font) or (in private use area) if we can decompose to character + combining diacritic print base character remember its "top" make sure next character is combining advance to next character if this is a Unicode combining character check its x_offset if not in font, but alternate diacritic IS, use alternate 17th International Unicode Conference

  12. Dealing with Missing Characters Pseudo code (continued): if character IS in font if it's a diacritic OVER a character check for vertical placement ExtTextOutW else if we have a bitmap for it, or for its alternate display the bitmap (watch for transparency) else if we have a fallback character, in the font display it else if we're trying to do a combining diacritic skip it else display inverted "?" 17th International Unicode Conference

  13. 17th International Unicode Conference

  14. 17th International Unicode Conference

  15. 17th International Unicode Conference

  16. 17th International Unicode Conference

  17. Future Possibilities • Multiple diacritics on one base character • Checking the glyph index • Font switching • Using FoldStringW to decompose (NT/2000 only) 17th International Unicode Conference

  18. 17th International Unicode Conference

  19. References • Kano, Nadine, “Developing International Software for Windows 95 and Windows NT”, Microsoft Press, 1995, ISBN 1-55615-840-8 • Schmitt, David A., “International Programming for Microsoft Windows”, Microsoft Press, 2000, ISBN 1-57231-956-9 • “HOWTO: Translate Unicode Character Codes to TrueType Glyph Indices in Windows 95”, Microsoft Knowledge Base Article Q241020 • “cmap - Character To Glyph Index Mapping Table”http://msdn.microsoft.com/library/specs/cmap.htm 17th International Unicode Conference

  20. ¿Questions? 17th International Unicode Conference

More Related