MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   I'm assuming it's the font's fault, but just in case ... (https://www.mobileread.com/forums/showthread.php?t=322468)

lumpynose 08-24-2019 05:28 PM

I'm assuming it's the font's fault, but just in case ...
 
In my html I have ½ and in the Preview window it shows 1/4 instead of 1/2. It does this with Google's Literata Book Medium; with Microsoft's Sitka it shows 1/2.

KevinH 08-24-2019 08:00 PM

Wow, could you check with Chrome browser and see if it has the same issue? QtWebEngine is chrome based.

lumpynose 08-24-2019 10:33 PM

Yes, same thing; 1/4 with Literata, 1/2 with another font. Does that mean they mixed up the glyph for #189?

KevinH 08-24-2019 11:55 PM

Yes that means it is the font that is messed up - either wrong glyph of wrong font table.

Vroni 08-25-2019 06:08 AM

You can check with a FontExplorer, using Windows the charactermap should be enough to fugure this out.

Tex2002ans 08-25-2019 12:45 PM

Quote:

Originally Posted by Vroni (Post 3882352)
You can check with a FontExplorer, using Windows the charactermap should be enough to fugure this out.

Yes, you can also use BabelMap, and easily compare all fonts with that character:

Fonts > Font Coverage > All Characters in this text: ½

Quote:

Originally Posted by lumpynose (Post 3882229)
In my html I have ½ and in the Preview window it shows 1/4 instead of 1/2. It does this with Google's Literata Book Medium; with Microsoft's Sitka it shows 1/2.

What version of that font do you have? I agree with KevinH, it could be an actual bug in that font.

Side Note: And may I ask why you're using the Vulgar Fraction characters?

lumpynose 08-25-2019 01:14 PM

Quote:

Originally Posted by Tex2002ans (Post 3882432)
Side Note: And may I ask why you're using the Vulgar Fraction characters?

It's what's used in the book. Is it preferable to use 1/2 instead of ½?

lumpynose 08-25-2019 01:25 PM

Quote:

Originally Posted by Tex2002ans (Post 3882432)
What version of that font do you have? I agree with KevinH, it could be an actual bug in that font.

It was Literata Book, not Literata. Its version was 2.002 or somesuch, while on fonts.google.com the version is 2.201 and there the name is Literata. I'm guessing that I got Literata Book from fontsquirrel.com.

Tex2002ans 08-26-2019 02:22 AM

Quote:

Originally Posted by lumpynose (Post 3882446)
It was Literata Book, not Literata. Its version was 2.002 or somesuch, while on fonts.google.com the version is 2.201 and there the name is Literata. I'm guessing that I got Literata Book from fontsquirrel.com.

Update your font and see if that works. Like mentioned, these errors sometimes slip through when font-designers are trying to fix bugs.

Quote:

Originally Posted by lumpynose (Post 3882441)
It's what's used in the book. Is it preferable to use 1/2 instead of ½?

Yes, standalone numbers are much more compatible than Vulgar Fractions. The biggest advantages are:
  • They're supported on all fonts
  • Easier to read (think font size)
    • 1/4 vs. ¼
  • Consistent look
  • Easier to Search

Vulgar Fractions have quite a few disadvantages (some are listed in this article):

http://www.personal.psu.edu/ejp10/bl...unicode-1.html

But the biggest disadvantage in my experience is: What if you need one that isn't included?

Here's a list of Vulgar Fractions in Unicode:

http://www.fileformat.info/info/unic...preview=entity

Unicode has the "most common" basic fractions like 1/2, 1/4, 3/4... but Font support is also very shaky once you get beyond the most basic. On my computer, ~230 fonts include ¼, but only 82 have ⅞.

Remember, people are going to be reading this on ereaders with all different types of fonts.

Also, when you need a 1/12 or 1/100 or 4/3... all of a sudden vulgar fractions will look one way, while normal fractions look another way.

* * *

If you still want the "vulgar look", it's better to implement this via OpenType frac and CSS:

https://helpx.adobe.com/fonts/using/...ntax.html#frac

but even this, support is going to be lacking in many Fonts/Readers/Tools.

Side Note: And whatever you do, don't try to hack together fractions as superscripts/subscripts:

Code:

<sup>1</sup>/<sub>2</sub>
And DEFINITELY don't ever use Unicode's superscript digits. For more info on that, see my post in "font with full super/under script support?"

lumpynose 08-26-2019 04:34 PM

Quote:

Originally Posted by Tex2002ans (Post 3882608)
Yes, standalone numbers are much more compatible than Vulgar Fractions. The biggest advantages are:
  • They're supported on all fonts
  • Easier to read (think font size)
    • 1/4 vs. ¼
  • Consistent look
  • Easier to Search

Ok, thanks. You've convinced me, yet again. :)

PeterT 08-26-2019 08:49 PM

I have to admit I've been quite annoyed at time by Kobo and fractions in Epub formatted material. Many times I've seen a square symbol in the ingredients list when the font in use does not have the required symbol.

At least in kepub they will fall back to displaying the missing symbol using a different font.

Sent from my moto g(7) power using Tapatalk


All times are GMT -4. The time now is 06:54 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.