Reputation: 2115
Is there a way to specify a custom font (i.e. one that's not installed in the Windows/Fonts folder) in my XSL-FO stylesheet?
In CSS, you can do this:
@font-face {
font-family: OpenSans;
src: url(OpenSans-Regular.ttf);
}
Is something similar possible in XSL-FO?
I've checked the Antennahouse Formatter docs. AHF allows you to specify custom font folders in the Font Configuration File, but that is a systemwide file. I want to set a font for a single stylesheet without affecting other stylesheets.
Upvotes: 0
Views: 381
Reputation: 8068
Add axf:font-face
(see https://www.antennahouse.com/product/ahf66/ahf-ext.html#axf.font-face) inside fo:declarations
.
The example from the documentation is:
<fo:declarations>
<axf:font-face src="url('http://www.hixie.ch/resources/fonts/AHEM____.TTF')"
font-family="AHEM"/>
</fo:declarations>
Upvotes: 1