-
Hi, this time I am having issue with the fonts there is something that I didn't get and I can't figure what I am doing wrong. This basic example work:
With this test where I am trying to mix different fonts, I got errors!
This is the output:
After a week hitting my head I was able only to get the first correct result but I couldn't rendering the second proof. Thanks... 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You are quite close! The problem is that there is no Regular defined for the font family <DefineFontfamily fontsize="32" leading="32" name="tito">
<Bold fontface="CamingoCode-Bold" />
</DefineFontfamily> In line 28 you use: <Paragraph fontfamily="tito">
<Value select="@title" />
</Paragraph> which switches to the family So the solution is to also define the Regular shape: <DefineFontfamily fontsize="32" leading="32" name="tito">
<Regular fontface="CamingoCode-Regular" />
<Bold fontface="CamingoCode-Bold" />
</DefineFontfamily> So the full layout file is: <Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<SetGrid nx="3" ny="2" />
<Trace grid="yes" textformat="yes" />
<Pageformat width="210mm" height="290mm" />
<LoadFontfile name="CrimsonPro-Regular" filename="CrimsonPro-Regular.ttf" mode="harfbuzz" />
<LoadFontfile name="CamingoCode-Bold" filename="CamingoCode-Bold.ttf" mode="harfbuzz" />
<DefineFontfamily fontsize="18" leading="24" name="para">
<Regular fontface="CrimsonPro-Regular" />
</DefineFontfamily>
<DefineFontfamily fontsize="32" leading="32" name="tito">
<Regular fontface="CamingoCode-Regular" />
<Bold fontface="CamingoCode-Bold" />
</DefineFontfamily>
<Record element="data">
<ProcessNode select="animals" />
</Record>
<Record element="animals">
<PlaceObject>
<Textblock width="1">
<Paragraph fontfamily="tito">
<Value select="@title" />
</Paragraph>
<ForAll select="item">
<Paragraph fontfamily="para">
<Value select="." />
</Paragraph>
</ForAll>
</Textblock>
</PlaceObject>
</Record>
</Layout> |
Beta Was this translation helpful? Give feedback.
I don't know whether this might help, @Cicorione.
When you define a font family, Publisher uses the regular font, unless you request bold, italics or bold italics.
Publisher gives errors when a requested font cannot be found (since it is not defined, it cannot find it).
In your case, you have two options:
Provide a only a regular font, such as in:
The regular font is marked by the
<Regular>
element, not by thename
orfilename
…