Confusing font error: (UnknownFont) is not a known font.
Posted by
jlo2k on
Mar 02, 2021; 9:11am
URL: https://discuss.asciidoctor.org/Confusing-font-error-UnknownFont-is-not-a-known-font-tp8551.html
Hello,
i created a theme which uses extends and font catalog merge and some company specific DIN fonts wich creates a PDF without errors being a part of docToolchain gradle based automation for building on mac 10.15.7 using asciidoctorj 1.6 and asciidoctorj-pdf 1.5.3:
extends: default-with-fallback-font
font:
catalog:
merge: true
company-din:
normal: company-din-normal.ttf
medium: company-din-medium.ttf
bold: company-din-bold.ttf
italic: company-din-normal.ttf
medium-italic: company-din-medium.ttf
bold-italic: company-din-bold.ttf
company-din-condensed:
light: company-din-condensed-light.ttf
light-italic: company-din-condensed-light.ttf
company-din-slab:
normal: company-din-slab-normal.ttf
medium: company-din-slab-medium.ttf
black: company-din-slab-black.ttf
italic: company-din-slab-normal.ttf
medium-italic: company-din-slab-medium.ttf
black-italic: company-din-slab-black.ttf
page:
margin: [0.7in, 0.67in, 0.67in, 0.67in]
toc:
font_family: company-din
font_color: 2156A5
font_style: normal
font_size: 12
heading:
font_family: company-din-slab
font_style: normal
font_color: BA3925
header:
font_family: company-din
font_style: normal
height: $base_line_height_length * 3.5
border_color: dddddd
border_width: 0.25
recto:
left:
content: image:../../docs/arc42/images/arc42-logo.png[width=50]
center:
content: 'arc42 Template'
right:
content: image:../../docs/arc42/images/company-logo.svg[width=50]
verso:
left:
content: $header_recto_left_content
center:
content: $header_recto_center_content
right:
content: $header_recto_right_content
footer:
font_family: company-din
font_style: normal
recto:
right:
content: '{section-title} | *{page-number}*'
verso:
left:
content: '*{page-number}* | {section-title}'
But as soon as i define these fonts for base by adding:
base:
font_family: company-din
I get the confusing font error:
(UnknownFont) is not a known font.As this font is not added but already used in the upper version, i presume this is an underlying error of a different type and the shown error is misleading. My assumption is that maybe there is some incompatiblity between settings in the default themes and the company fonts... but i currently have no clue how to dig deeper by enabling more detailed output of asciidoctor-pdf converter being embedded into docToolchain. How would you debug this?
Do you have seen similar errors already?
My next ideas would be to replay this behaviour with
1. some other DIN like fonts to exclude the font itself being the problem
2. local asciidoctor and ascidoctor-pdf installation on mac to be able to exclude docToolchain as a source.
but of course i would prefer if there is a less time consuming variant to debug with the existing environment.
Thanks in advance.