Welcome
Guest
•
Login
PDFsharp and MigraDoc Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
File Management
Create Account
Quick Search
»
Visit the new
Website for PDFsharp & MigraDoc Foundation 6.0 for .NET 6
and find information about the new version for Windows, Linux, and other platforms.
Back
PostScript fonts and PDFsharp
Modified on 2009/08/05 17:32
by
Thomas Hövel
Categorized as
Articles
,
MigraDoc Articles
,
PDFsharp Articles
PDFsharp cannot use PostScript fonts to draw text in a PDF file. Only TrueType fonts and OpenType fonts with TrueType outlines can be used with PDFsharp. PDFsharp can open and manipulate existing PDF documents that contain PostScript fonts. The restriction applies only to text created with PDFsharp. ==Background== The [http://en.wikipedia.org/wiki/PostScript_fonts|PostScript font] technology was invented by Adobe in 1984. From 1990 to 2000 the [http://en.wikipedia.org/wiki/Adobe_type_manager|Adobe Type Manager] had to be installed to use PostScript fonts under Windows 3.x to Windows 98. For Windows 2000 and Windows XP (and the corresponding Server editions) Microsoft licensed the Adobe Type Manager and integrated it into GDI. Therefore PostScript fonts can be used like TrueType fonts from programs that use the Win32 API. PDFsharp is based on GDI+ or WPF. GDI+ was originally developed by Microsoft for internal use in the Microsoft Office products. The public version of GDI+ was introduced with Windows XP (as {s:fileName|gdiplus.dll}) and with the .NET framework as the foundation of the {s:className|System.Drawing} namespace. GDI+ can neither handle PostScript fonts nor OpenType fonts with PostScript outlines. PDFsharp was designed to draw on all windows, printers and PDF pages. The GDI+ build of PDFsharp therefore cannot handle PostScript fonts. It would be possible to implement PostSript font handling directly in PDFsharp, but this was not intended. PostScript fonts are not very important today anymore, because of [http://en.wikipedia.org/wiki/Opentype/|OpenType]. Newer Microsoft products like Windows Vista, Windows 7 or Office 2007 do not support PostSript fonts at all. If you use one in a document, it is rendered as a bitmap image when the document is printed or saved as PDF. The WPF build of PDFsharp is based on [http://en.wikipedia.org/wiki/Windows_Presentation_Foundation|Windows Presentation Foundation] which fully supports OpenType fonts. Very roughly spoken an OpenType file is a unified container of either a TrueType or a PostScript font. As an example the font manager of Windows reports “OpenType with TrueType Outlines” for most fonts that comes with Windows and “OpenType with PostScript Outlines” for fonts that come e. g. with the Adobe Creative Suite. Because OpenType technology unifies font handling the WPF build of PDFsharp can indirectly handle PostScript fonts when they come as an OpenType font with PostScript outline. ==Workarounds== The best you can do if you have a PostScript font and want to use it with PDFsharp is to convert it into a TrueType font or an OpenType font. A reliable commercial tool for such conversions is [http://fontlab.com/Font-tools/TransType|TransTypePro] from [http://www.fontlab.com|FontLab]. If you use the GDI+ build of PDFsharp, you can convert the PostScript font into a TrueType font. Because of mathematical reasons the [http://en.wikipedia.org/wiki/Hinting|hinting table] of a font cannot be completely transformed from PostScript hinting to TrueType hinting. That leads to less readably [http://en.wikipedia.org/wiki/Glyph|glyphs] on computer displays. On printers with several hundred dpi this effect becomes invisible. If you use the WPF build of PDFsharp, you can convert the PostScript font either in a TrueType or an OpenType font. {s:note}Fonts are a significantly much more complicated topic than this brief article may show.
Meta Keywords:
Meta Description:
Change Comment:
Visit the new
Website for PDFsharp & MigraDoc Foundation 6.0 for .NET 6
and find information about the new version for Windows, Linux, and other platforms.
Miscellaneous
Home
PDFsharp
FAQ
Samples
Articles
MigraDoc
FAQ
Samples
Articles
ScrewTurn Wiki version 3.0.5.600. Some of the icons created by
FamFamFam
.
Impressum - Privacy Policy, Data Protection Declaration, Legal Notice