The cause is found, now Why?
Hello odedta, Thanks for your reply.
I tried changing the @font-face to font-family: AlexBrush; and replacing "marg" with "AlexBush" and despite what Calbre may think, it doesn't make any difference. The family-name can be anything provided the src: is correctly identified.
From MDN
@font-face
{
[ font-family: <family-name>; ]?
...
}
family-name
Specifies a name that will be used as the font face value for font properties. ( i.e. font-family: <family-name>; )
An online example is:
@font-face
{
font-family: MyHelvetica;
src: url(MgOpenModernaBold.ttf);
}
So, Calibre's error message is incorrect.
What is happening is this:
This works,
<div class="letter">
<p class="marg">This is a test.</p>
</div>
This doesn't,
<div class="letter marg">
<p >This is a test.</p>
</div>
The problem seems to be combining the font class with anything else.
Multiple classes cause the font to fall back to the default/inherited font BUT, the other properties are correctly applied.
However if this CSS declaration is made:
p.inherit
{
font-family: inherit;
}
then this works:
<div class="letter marg">
<p class="inherit">This is a test.</p>
<p class="inherit">This is a second line.</p>
</div>
So, the font "marg" is being correctly applied by the division tag, but the para tag is nevertheless inheriting the font-family from somewhere else. Forcing the paragraph tag to inherit the font-family from the division tag declaration corrects the inheritance, but only for one para tag at a time.
So the situation is: state the "inherit" class on every tag, or state the "marg" tag on every tag, because the font-family property is not inherited. And that's the case with changing the font indent—nothing about the embedded font is inherited, any change/use must repeat the full CSS description.
The next question is: Why doesn't an embedded font become the new default after use?
Tony
|