Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font on Mobile #1

Closed
jcuenod opened this issue Oct 1, 2017 · 5 comments
Closed

Font on Mobile #1

jcuenod opened this issue Oct 1, 2017 · 5 comments

Comments

@jcuenod
Copy link
Member

jcuenod commented Oct 1, 2017

For some reason we don't get complete coverage on Greek text with "SBL Biblit" on mobile.

@jcuenod
Copy link
Member Author

jcuenod commented Mar 2, 2018

This could actually be related to #7

@jcuenod
Copy link
Member Author

jcuenod commented Apr 5, 2018

I notice that the ש with a dot struggles to display correctly. This must be a unicode + glyphs in the webfont issue.

@jcuenod
Copy link
Member Author

jcuenod commented May 24, 2018

It looks as though a good avenue for investigation is document.fonts.check:

Once content is loaded, something like

if (!document.fonts.check("12px SBLBiblit") {
    let fontFace = new FontFace("SBLBiblit", `url('SBLBiblit.woff2') format('woff2'), 
        url('SBLBiblit.woff') format('woff')`);
    fontFace.load().then((loadedFontFace) => {
        document.fonts.add(loadedFontFace);
        // not sure we need this line...
        document.getElementById("target").style.fontFamily = "SBLBiblit";
    })
}

@jcuenod
Copy link
Member Author

jcuenod commented Jun 6, 2018

Just remembered that theMarker knows what fonts you have...
It uses <script src="js/fontdetect.min.js"></script> from https://github.com/JenniferSimonds/FontDetect

FontDetect.isFontLoaded('SBL BibLit')

@jcuenod
Copy link
Member Author

jcuenod commented Sep 8, 2018

Also, there is dynamic loading: https://github.com/typekit/webfontloader

I'm thinking we just force SBL though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant