Ebooks reader not capturing embedded font for epub file

前端 未结 2 1749
耶瑟儿~
耶瑟儿~ 2021-01-11 15:38

I have a problem in my epub reader, it displays all content correctly but it\'s not capturing the embedded font in the CSS file.

When I run the same file on other r

相关标签:
2条回答
  • 2021-01-11 16:05

    I can confirm the issue. I have tried your HTML and CSS (adapted it) with 2 different Arabic fonts ("Arabic Magic" and "Mcs Book Title 3"). Those are TTF fonts, but didn't work either.

    When applied, there are no errors in the Web Inspector console, the fonts are loaded well. Also when applied I actually see the default font changes a bit: it increases spacing between letters a bit, and that's it. Same situation when I tried on Firefox and Chrome on macOS.

    My guess is that most likely those fonts we try don't contain all the glyphs for the required characters to display, or that the font needs to be processed in some way before browser engines (including UIWebView) can successfully detect and render them.

    I know it's not a definitive answer, but I'm just sharing my research here. Hope that it helps to continue digging into the problem.

    Related issues:

    • Using Arabic fonts with the extension .otf
    • How to fix Arabic Font in Safari and FireFox?
    • Custom Arabic font in iOS
    • Arabic text with custom fonts in iOS

    Update: also tried windows-1256 Arabic encoding (reencoded HTML, and applied meta charset), because I thought that utf-8 might be too complicated for these fonts, but got the same result: the text is rendered with some default font.

    0 讨论(0)
  • 2021-01-11 16:15

    Not all the fonts are suitable for web display. You can check your font here. Notice, that some fonts have active icons of web, screen or mobile, and some don't. Use those fonts which are designed for web and screen simultaneously. https://www.fontsquirrel.com/fonts/list/recent

    0 讨论(0)
提交回复
热议问题