-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to render SVGs if they contained text that requires fonts #177
Comments
I've tried to generate the PDF by
the process ends with error about not found font file:
The entry from Apache FOP config points to the <font embed-url="file:/D:/Work/Metanorma/repositories/mn-samples-bsi/sources/pd-19650-0/arialbd.ttf" kerning="yes" mn_default="false">
<alternate embed-url="Arial Bold.ttf"/>
<font-triplet name="Arial" style="normal" weight="bold"/>
</font> To do:
<font embed-url="file:/C:/Users/TestUser/.fontist/fonts/NotoSans-Bold.ttf" embedding-mode="full" kerning="yes" mn_default="false">
<font-triplet name="Arial" style="normal" weight="bold"/>
</font> Note: there isn't issue for the font
The Apache FOP uses the font
I think that metanorma should parse the attributes For the experiment, I've added the fonts from SVG into
The process stops with the error:
Then, remove the entry
Same for The result for manual
the result is:
fonts:
- name: Frutiger LT Std 45 Light
styles:
- family_name: Frutiger LT Std 45 Light
type: Bold
preferred_family_name: Frutiger LT Std You can install the font by 'preferred family':
But, we don't know what is kind of name is using in <text transform="translate(194.16 108.76)" style="fill:#231f20; font-family:FrutigerLTStd-Bold, 'Frutiger LT Std'; font-size:8.77px; font-weight:700;">
<tspan x="0" y="0" style="letter-spacing:.01em;">3</tspan>
<tspan x="4.98" y="0">D</tspan>
</text>
For - family_name: Arial
type: Regular
full_name: Arial
post_script_name: ArialMT My proposal is -
|
Errors occur after update for Method 1:
|
These errors occur on GH |
fixed issue with missing fonts, #177
<sourcecode id="_1780a541-a39f-897a-533a-f935721eca31"
lang="ruby">
<span class="nb">puts</span>
...
<annotation id="_f4eaad01-1f05-7b19-91a0-ae5a8d34312f">
<p id="_910b9068-d8a3-ce03-b853-029f70dd6630">This is an annotation</p>
</annotation>
</sourcecode> than just generated XML: <sourcecode id="_1780a541-a39f-897a-533a-f935721eca31"
lang="ruby">
<span class="nb">puts</span>
...
<dl>
<name>Key</name>
<dt id="_f4eaad01-1f05-7b19-91a0-ae5a8d34312f">
<span class="c">1</span>
</dt>
<dd>
<p id="_910b9068-d8a3-ce03-b853-029f70dd6630">This is an annotation</p>
</dd>
</dl>
</sourcecode>
|
fonts extraction from font-family issue fixed, #177
Method 1 realized in the mn2pdf v1.79. |
In mn-samples-bsi, the PD 19650-0 document uses SVG images that has text that uses other fonts. We need to find a way to make that work.
Please test with this PR:
The text was updated successfully, but these errors were encountered: