Show / Hide Table of Contents

Namespace Codecrete.SwissQRBill.Generator.Canvas

Classes

AbstractCanvas

Abstract base class for simplified implementation of classes implementing ICanvas.

The class mainly implements text measurement and a helper for multi-line text.

CanvasCreator

Creates ICanvas instances using the registered ICanvasFactory instances.

CharWidthData

Character width data for Helvetica, Arial, Frutiger and Liberation Sans.

Character widths are given in 1/1000 pt for font size 1. Only the character range allowed for QR bill text is covered.

FontMetrics

Simple font metrics class, independent of graphics subsystems and installed fonts.

PDFCanvas

Canvas for generating PDF files.

The PDF generator currently only supports the Helvetica font.

PDFCanvasFactory

Factory for creating PDFCanvas instances

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.

SVGCanvas

Canvas for generating SVG files.

SVGCanvasFactory

Factory for creating SVGCanvas instances

TransformationMatrix

3-by-3 matrix for affine geometric transformation.

Interfaces

ICanvas

Common interface for all output formats to draw the QR bill.

The coordinate system has its origin in the bottom left corner. The y-axis extends from the bottom to the top.

The graphics model is similar to the one used by PDF, in particular with regards to the orientation of the y axis, the concept of a current path, and using the baseline for positioning text.

Instance of this class are expected to use a single font family for the QR bill (regular and bold font weight).

ICanvasFactory

Factory for creating ICanvas instances

ICanvasFactory2

Factory for creating ICanvas instances.

This interface is an extension of ICanvasFactory that allows specifying the character set.

Enums

FontEmbedding

Font embedding options.

LineStyle

Line style

In this article
Back to top Generated by DocFX