flyingsaucerproject/flyingsaucer — pull request #69 by habermann24 (2014-12-13 12:33:37+00:00)
Title: Added proper font-weight and font-style handling with @font-face rule.

This change fixes some issues when specifying a specific font-style or
font-weight through @font-face. For example, when importing a special font
resource specifically for the italic font-style, the PDF output would not
match the correct font if the css rule specifies the style/weight.

Example from my stylesheet:

```css
@font-face {
font-family: "Eurostile LT";
font-weight: normal;
src: asset-url("pdf/fonts/eurostile.ttf");
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}

@font-face {
font-family: "Eurostile LT";
src: asset-url("pdf/fonts/eurostile_bold.ttf");
font-weight: bold;
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}

body {
font-family: "Eurostile LT";
font-weight: bold;
}
```

Without this patch the PDF would not use the bold font.