Font Support

FO.NET includes arbitrary font support allowing XSL-FO developers to utilise any font present in the Windows Font directory. Individual fonts may be referenced in FO documents via their family name without the necessity for additional configuration and metrics generation.

FO.NET also allows you to control how the font should be handled in the generated PDF file. For more information please see the section Font Linking, Embedding and Subsetting.

Additional information regarding fonts can be found in the sections Private Fonts, Font Kerning and Font Limitations.

XSL-FO Font Example:

<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="">

  <!-- layout-master-set removed intentionally for readability -->

  <fo:page-sequence master-reference="simple">
    <fo:flow flow-name="xsl-region-body">

      <!-- Regular -->
      <fo:block font-size="18pt" font-family="Verdana">
        This is Verdana Regular

      <!-- Bold -->
      <fo:block font-size="18pt" font-family="Verdana" font-weight="bold">
        This is Verdana Bold

      <!-- Italic -->
      <fo:block font-size="18pt" font-family="Verdana" font-style="italic">
        This is Verdana Italic.



Last edited Jan 31, 2009 at 5:54 AM by griffm, version 1


Ndamu Oct 2, 2012 at 10:18 AM 
guys with, can I generate pdf's the way Itextsharp works?

maitakov Jun 22, 2010 at 2:49 PM 
Try to replace

<!-- layout-master-set removed intentionally for readability -->


<fo:simple-page-master master-name="simple" page-width="210mm" page-height="297mm">
<fo:region-body region-name="xsl-region-body" margin="15mm"/>

ullfindsmit Mar 17, 2010 at 6:37 PM 
Using the XML above with the code below

Fonet.Render.Pdf.PdfRendererOptions options = new Fonet.Render.Pdf.PdfRendererOptions();
options.Author = "David Brent";
options.Title = "How to Motivate Your Staff";
options.Subject = "Management Guide";
options.EnableModify = false;
options.EnableAdd = false;
options.EnableCopy = false;
options.EnablePrinting = true;
options.OwnerPassword = "slough";

String sInputPath = @"C:\Temp\Test\TestProjects\Test1.App\";
FonetDriver driver = FonetDriver.Make();
driver.Options = options;
driver.Render(sInputPath + "XMLFile3.xml", sInputPath + Guid.NewGuid().ToString() + ".pdf");

I get the following error

System.NullReferenceException: Object reference not set to an instance of an object.
at Fonet.Fo.Pagination.PageSequence..ctor(FObj parent, PropertyList propertyList)
at Fonet.Fo.Pagination.PageSequence.Maker.Make(FObj parent, PropertyList propertyList)
at Fonet.Fo.FOTreeBuilder.StartElement(String uri, String localName, Attributes attlist)
at Fonet.Fo.FOTreeBuilder.Parse(XmlReader reader)