Presentation is loading. Please wait.

Presentation is loading. Please wait.

17th International Unicode Conference 1 Font Coverage in Windows Bob Rasmussen Rasmussen Software, Inc. Bob Rasmussen: Master layout Codeexamples.

Similar presentations


Presentation on theme: "17th International Unicode Conference 1 Font Coverage in Windows Bob Rasmussen Rasmussen Software, Inc. Bob Rasmussen: Master layout Codeexamples."— Presentation transcript:

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

2 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

3 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

4 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

5 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

6 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

7 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

8 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

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

10 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

11 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

12 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 "?"

13 17th International Unicode Conference 13

14 17th International Unicode Conference 14

15 17th International Unicode Conference 15

16 17th International Unicode Conference 16

17 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)

18 17th International Unicode Conference 18

19 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

20 17th International Unicode Conference 20 ¿Questions?


Download ppt "17th International Unicode Conference 1 Font Coverage in Windows Bob Rasmussen Rasmussen Software, Inc. Bob Rasmussen: Master layout Codeexamples."

Similar presentations


Ads by Google