Skip to main content

Forums

This topic contains 9 replies, has 4 voices, and was last updated by  jpeg729 1 year ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #199361

    inktrap
    Participant

    Would it be possible to highlight characters that are missing in the current font and automatically get substituted by the browser?

    #199363

    Paulie_D
    Moderator

    Interesting..not sure how but it sounds useful.

    #199491

    inktrap
    Participant

    Well, is it possible to detect what font is actually used in rendering?

    #199506

    Paulie_D
    Moderator

    Well, is it possible to detect what font is actually used in rendering?

    You set the fonts…shouldn’t you know?

    #199611

    inktrap
    Participant

    I do know; I was talking about detecting fallback fonts. Would finding out what font the browser uses even be possible with Javascript?

    #199615

    Paulie_D
    Moderator

    I don’t understand…why would you need to detect fallback fonts?

    If the current font doesn’t have a character it doesn’t fallback on the next one to try and find it.

    Fallback fonts are only there in case your primary font fails completely at least AFAIK.

    #199619

    inktrap
    Participant

    No, actually if there are any missing exotic characters in the current font the browser will replace them with the same characters from another font that has them. You can even see which font is used in the browser’s Inspector. Those are the instances that I’d like to be able to highlight.

    #202980

    duncan.mckenna
    Participant

    Don’t suppose there’s been any update on this? In the same boat.

    The only close solution I can find is detecting if a font is installed, not detecting if a glyph is missing.
    E.g. http://www.lalit.org/lab/javascript-css-font-detect/

    If you want a good indication if a special character is missing visually, you can set the next fallback to serif if you’re using a fancy sans-serif font. E.g:

    font-family: "totally-fancy-sans-font", serif;
    

    The missing characters will stick out like a sore thumb.

    #267690

    jpeg729
    Participant

    Many Google Fonts do not have glyphs for accented characters. They fall back to some standard font and you often have to look really closely to see whether “é” with an accent looks out of place compared to the “e” without an accent.

    #267691

    jpeg729
    Participant

    Worse, I actually typed an e-acute in that comment. Chrome DevTools shows the e with the accent, but the font just shows an “e”.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star