Class PDFFontSettings
Sets the font to use for a PDF canvas.
To render a QR bill to a PDF document, a regular and a bold font face are needed. According to the Swiss QR bill specification, only the non-serif fonts Helvetica, Arial, Liberation Sans and Frutiger are allowed.
There are two options for fonts:
- Use the standard Helvetica font. It does not need to be embedded in the PDF document as it is supported by all PDF viewers. However, it only covers the WinANSI character set. This is sufficient for the Latin 1 Subset character set but not for the Extended Latin character set.
- Use the Liberation Sans font bundled with this library. It covers a wide range of characters and is sufficient for the Extended Latin character set. A subset of characters will be embedded in the PDF document. The font has been published under SIL OPEN FONT LICENSE Version 1.1 and is free for use.
Inherited Members
Namespace: Codecrete.SwissQRBill.Generator.Canvas
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public class PDFFontSettings
Properties
| Edit this page View SourceFontEmbedding
Gets the font embedding type.
Declaration
public FontEmbedding FontEmbedding { get; }
Property Value
| Type | Description |
|---|---|
| FontEmbedding |
FontFamily
Gets the font family name.
Declaration
public string FontFamily { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceEmbeddedLiberationSans()
Creates a font settings instance for the Liberation Sans font.
Declaration
public static PDFFontSettings EmbeddedLiberationSans()
Returns
| Type | Description |
|---|---|
| PDFFontSettings | A new font settings instance. |
StandardHelvetica()
Creates a font settings instance for the standard Helvetica font.
Declaration
public static PDFFontSettings StandardHelvetica()
Returns
| Type | Description |
|---|---|
| PDFFontSettings | A new font settings instance. |