<div dir="ltr"><div dir="ltr">Hi Werner,<br clear="all"><div><div dir="ltr" class="gmail_signature"><br></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 5, 2024 at 9:50 AM Werner LEMBERG <<a href="mailto:wl@gnu.org">wl@gnu.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
[This is a copy of a question asked in the GNOME discourse forum:<br>
<a href="https://discourse.gnome.org/t/example-for-pdf-output-created-by-pangocairo-using-variation-fonts/22020" rel="noreferrer" target="_blank">https://discourse.gnome.org/t/example-for-pdf-output-created-by-pangocairo-using-variation-fonts/22020</a><br>
– I'm not sure where to ask specific questions regarding pangocairo.<br>
Sorry for the duplication.]<br>
<br>
<br>
Folks,<br>
<br>
<br>
Is there an example that demonstrates how to use pangocairo to produce<br>
a PDF that contains Variation Font instances?<br></blockquote><div><br></div><div>This seems to do it for me:</div><div><br></div><div>$ pango-view --markup --text='<span font_family="Noto Sans" font_weight="870" font_size="102400">Test</span>' --output test.pdf --no-display</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The background for my question is LilyPond, which comes with a cairo<br>
backend (by using the `-dbackend=cairo` command-line option), and<br>
which correctly creates PDFs with named instances of VFs.  However, it<br>
fails to create PDFs with non-named instances, which are silently<br>
replaced with a subsetted non-VF font.</blockquote><div><br></div><div>Cairo synthesizes a subsetted non-VF font for those cases (and for named-instances as well), since PDF does not support variable-fonts.</div><div> </div><div>Hope that helps,</div><div>b</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
For my tests I used the current git versions of both pango and cairo<br>
(and the current git of LilyPond).<br>
<br>
You can find more details here:<br>
<a href="https://gitlab.com/lilypond/lilypond/-/issues/6613" rel="noreferrer" target="_blank">https://gitlab.com/lilypond/lilypond/-/issues/6613</a><br>
<br>
<br>
    Werner<br>
</blockquote></div></div>