Forum Bugs

Overline and Line-spacing issue up on using unicode-range + different font

shivaram
The trademark symbol looks small on the main font, so we need to apply a different font for that character using @font-face{ unicode-range }. We got the trademark symbol correct, but the overline and the line-spacing are affected.

@font-face {
  font-family: ARNO;
  src: local("ArnoPro-Subhead");
}
@font-face {
  font-family: STIX;
  unicode-range: U+AE-AE;
  src: local("STIXGeneral");
}
body {
  font-size: 11pt;
  line-height: 1.2;
  text-align: justify;
  text-justify: inter-word;
  hyphens: manual;
}
.arno{
  font-family: ARNO;
}
.stix{
  font-family: STIX, ARNO;
}
.overline{
  text-decoration: overline;
}

<div class="arno">we get correct overline and line-spacing</div>
<div class="stix">But for stix font the overline and line-spacing changed.</div>


I've created a sample demo file to demonstrate the issue, kindly let me know if there is any workaround?




Edited by mikeday

shivaram
Sample output showing the issue
  1. sample_output.jpg137.0 kB
    Sample output showing the issue
mikeday
We will investigate this issue, perhaps in the meantime you can set an explicit line-height?
shivaram
Currently line-height is coming from body and no other tag have line-height property
body {
    line-height: 1.2;
}


If we use hard-coded values (like 13pt), then I've to give it for all style elements (like h1, h2, h3). Also, it doesn't solve the overline moving further up.

shivaram
> We will investigate this issue, perhaps in the meantime you can set an explicit line-height?

May I know, if you have already investigated this issue?
mikeday
Another idea worth trying would be to specify Arno first instead of second, but restrict it to apply to every Unicode character except U+AE.
shivaram
So, you're suggesting like
{
  unicode-range: U+AE;
  font-family: STIX;
}
{
   unicode-range: U+00-AD, U+AF-FF;
   font: ARNO
}
and define ARNO first like:
font-family: ARNO, STIX


but we're dealing with many unicode, kindly look into the attachment and defining all non STIX ranges in main font is not so easy




  1. unicode_range.jpg211.5 kB
mikeday
True, that looks complicated! But you only need to exclude the specific characters you don't want to use from Arno, right? Characters that Arno doesn't have will still fall through to STIX.

(The unicode-range will need to go to FFFF though, not just FF).
shivaram
Yes, its complex.

But the ranges which we want to go with STIX is also available in ARNO too, so for your suggestion we have to create a exclude range for ARNO (removing all STIX range) also this way will be complex for maintenance too - im worried here ;-)
mikeday
It might be easier to just wrap the TM character in a span and apply a different font-family! :D
shivaram
yeah, but still the span touches the line-height. I think i've to wrap display:inline; and play with line-height...

After all, it would be good if you guys fix this in the Prince rather patchy works :)
mikeday
You could apply "line-height: 0" to the span so it does not affect the containing line at all. But we will take a look at what is going on. :)
shivaram
ok, thank you for your support Mike