Font Size: a A A

An Xpsdrv Of Ttf The Hinting Research And Realization

Posted on:2009-03-07Degree:MasterType:Thesis
Country:ChinaCandidate:L L LiFull Text:PDF
GTID:2208360245461880Subject:Information security
Abstract/Summary:PDF Full Text Request
Along with Windows Vista OS, a new document format XPS was released. Different from the traditional GDI print path, XPS introduces a thoroughly new print path XPSDrv. Under GDI print path, files are dealed by printer drivers and then sent to a printer. Under the new print architecture, XPS files created by WPF applications can be sent to GDI printer drivers through XPS-to-GDI conversion, or sent to XPSDrv directly. Also Win32 applications can send XPS files to XPSDrv through GDI-to-XPS conversion. Thus the research on XPSDrv is becoming one of hot topics in the print field.Both Vista OS and XPS use TrueType Font, which is also widely used in SmartPhones and PDAs. Therefore it is meaningful to study the font rendering engine. But now present engines can not balance the efficiency and the aesthetic feeling. Furthermore, the font rendering engines are now all designed for GDI print paths, none of them is designed for XPSDrv.A new solution to these problems is presented in this thesis. It can render TrueType in the XPSDrv effectly. The solution contains 4 modules: File Parse, Coordinates Transform, Hinting and Rasterizer. File Parse module parses TrueType files.Coordinates Transform module transfers Glyph coordinates from the EM system to the pixel system. Hinting module maintains the font features in the font level and distorting contours in the glyph level. Rasterizer scans and fills the outline, generating a beautiful bitmap.The Hinting module of the font rendering engine is carefully desuigned in this thesis. It contains 4 steps: Hinting preparation, fpgm Hinting, prep Hinting and Glyph Hinting. Hinting preparation initializes the parameters used by instructions. Fpgm Hinting defines a series of functions and new instructions. Prep Hinting recalculates cvt tables, Storage Area, Graphic State and so on, according to PPEM. Glyph Hinting moves the points on the contours, distorting the contours to be fitted for the grids.Furthermore, this presented engine introduces the bitmap cache mechanism. Glyphs don't have to be rendered a second time. The engine has run successfully in several printers of a famous printer manufacture in Japan. The presented engine is better than other engines in the running speed, while keeping a good bitmap visual effect.
Keywords/Search Tags:XPSDrv, TrueType Font, Hinting
PDF Full Text Request
Related items