1 / 3

How Different Character Shapes Work in GUI?

How Different Character Shapes Work in GUI?. Characters are actually stored as ASCII (or Unicode) code (‘A’ = 65, etc).

Download Presentation

How Different Character Shapes Work in GUI?

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. How Different Character Shapes Work in GUI? • Characters are actually stored as ASCII (or Unicode) code (‘A’ = 65, etc). • Mapping is used to interpret these code numbers as shapes (glyphs) to be displayed on the screen/printed. Glyphs are stored in font files with extension .ttf (True Type Font) • Therefore a font set can contain whatever shapes the user requires, as long as each shape is stored in the location within the font file corresponding to an ASCII value. • A font family, such as Arial, has several font faces (sets of glyphs), e.g. normal, italic, bold and bold italic. These are stored in separate TTF files. Some Asian font face files may actually contain two font faces (a font collection file).

  2. Font File (eg: Times New Roman.ttf) • Set of Glyphs. • As Bitmap (Image) • Several Fonts can have same Glyphs. • One Font can have Different Glyphs. (one can look at font files by accessing fonts directory in control panel) • Character Map. • Convert Character encoding to the Glyph index. • Single Font may have several Character Mappings. • Eg: Unicode and ASCII.

  3. Working: Map the Character to Glyph Index Place Pen at cursor position Load the glyph image Translate Glyph image so that origin and pen position matches. Render Glyph to target device Increment pen position according to next character

More Related