Skip to content

Missing glyphs #605

Closed
Closed

Description

@Perlence

I feel kind of bad for creating two issues revolving around same particular font (Iosevka) 😄

So, I've got tofu when trying to print 'warning sign' \u26a0. This time, top window is mintty, bottom is st:

Missing glyph

Activity

  1. mintty commented on Oct 23, 2016

    @mintty
    Owner

    I feel kind of bad for creating two issues revolving around same particular font (Iosevka)

    No problem with that; however, this is a duplicate of #573.
    If you can help out with why and how font fallback works in st but not in mintty, that would be great.

  2. Perlence commented on Oct 23, 2016

    @Perlence
    Author
  3. mintty commented on Oct 23, 2016

    @mintty
    Owner

    It would be good to identify the font fallback procedure in fontconfig, or maybe X11, on Windows, so it could be reused for mintty.
    Or maybe there is a library already that could be used for this purpose?

  4. arcanis commented on Nov 5, 2016

    @arcanis

    I have zero experience in developing on Windows, but after searching for some time I've found the following thread which might be useful. I copy here the most interesting part, a ExtTextOutW wrapper which apparently solve this issue:

    #include <Usp10.h> 
    #pragma comment(lib,"Usp10.lib") 
    
    bool TextOutUniscribe(HDC hdc, int x, int y, UINT fuOptions, RECT *prc, LPCWSTR psz, int cch) 
    { 
        if (cch == 0)
            return true; 
    
        SCRIPT_STRING_ANALYSIS ssa; 
        HRESULT hr = ScriptStringAnalyse (hdc, psz, cch, 0, -1,SSA_FALLBACK | SSA_GLYPHS, MAXLONG,NULL, NULL, NULL, NULL, NULL, &ssa); 
    
        if (SUCCEEDED(hr)) { 
            hr = ScriptStringOut(ssa, x, y, fuOptions, prc, 0, 0, FALSE); 
            ScriptStringFree(&ssa); 
        } 
    
        return SUCCEEDED(hr); 
    } 

    Another interesting thread on StackOverflow: http://stackoverflow.com/questions/16828868/how-to-automatically-choose-most-suitable-font-for-different-language

  5. mintty commented on Nov 5, 2016

    @mintty
    Owner

    Thanks a lot for digging this out. It works indeed for missing characters. For others (like Arabic) it seems to break proper display, however.
    Also there is still a positioning inconsistency, as also mentioned in your references, along with an idea to fix it.
    These issues need to be checked.

  6. mintty commented on Nov 15, 2016

    @mintty
    Owner

    ScriptStringAnalyse can be fixed to obey the monospace character distribution by adding the piDx parameter. But:

    • its font substitution differs from that of ExtTextOut (where it works) in unpleasant ways, e.g. CJK characters are tinier than they would need to be
    • it fails miserably on some script ranges, e.g. Arabic or Hangul Jamo, for no apparent reason
    • it does not seem to combine ligatures (Ligature support #601) (likely not supported in Uniscribe "basic" mode)

    If someone demonstrates how this can be managed, we'll get a step further...

  7. mintty commented on Dec 4, 2016

    @mintty
    Owner

    Released Uniscribe support in 2.7.1.
    This does not solve all font fallback cases, though.

  8. mintty commented on Mar 11, 2017

    @mintty
    Owner

    Released 2.7.5 with default FontRender=uniscribe.

  9. yossizahn commented on Mar 25, 2017

    @yossizahn

    This does not solve all font fallback cases, though.

    I am using Consolas which does not contain Hebrew characters. Attempting to display Hebrew fails without even showing a box character - just an empty space. Using Windows Font Linking as mentioned in #573 also doesn't help even though it works for me in cmd.exe.

    • Can Uniscribe rendering be enabled for RTL when --nobidi has been passed in?
    • Why does font linking not help? Why am I not at least shown a box character? (not that a box character will help much, just it seems as though Hebrew characters are being explicitly filtered out).
  10. mintty commented on Mar 25, 2017

    @mintty
    Owner

    The box glyph is taken from the font, so it may vary, even with font fallback.
    Why would you use the --nobidi option, actually?
    Uniscribe for RTL may be an option.

  11. 6 remaining items

  12. mintty commented on Apr 2, 2017

    @mintty
    Owner

    Mined should be disabling the scrollbar when it detects a bidi terminal; does that not always work?
    With the bidi controls enabled, this would no longer be necessary.

  13. mintty commented on Apr 12, 2017

    @mintty
    Owner

    While implementing partial support for bidi markers, it became apparent that this is not sufficient to control absolute positioning (like for the application scrollbar or menu). A switching sequence may be added.

  14. mintty commented on Apr 13, 2017

    @mintty
    Owner

    Released 2.7.6.

  15. mintty commented on May 19, 2017

    @mintty
    Owner

    Released 2.7.7.

  16. ducklin5 commented on Aug 28, 2019

    @ducklin5

    I'm using Monofur NF and the font itself is missing some symbols (I've tested it with both mitty, notepad and notepad++). From what I've read uniscribe is supposed to replace the missing symbols from a list of available fonts. I have a font with the missing symbols installed (DejaVuSans NF), but the symbol is still replaced by a box. Is there an option to provide a list of fallback fonts?

  17. ducklin5 commented on Aug 28, 2019

    @ducklin5

    I also tried

    FontChoice=Common:6
    Font6=DejaVuSansMono NF
    
  18. BrianInglis commented on Aug 28, 2019

    @BrianInglis

    Search for Microsoft Windows Font Linking for how to set up fallback fonts.
    Registry entries to tweak at:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

  19. BrianInglis commented on Aug 28, 2019

    @BrianInglis

    Suitable fonts e.g. SIL Unicode BMP Fallback,, Unicode Last Resort, and GNU Unifont, are explained, named, and linked in Wikipedia

  20. mintty commented on Aug 29, 2019

    @mintty
    Owner

    FontChoice=Common:6

    Common is not supported as it covers a set of basic punctuation and other symbols, not a script.

  21. mintty commented on Mar 20, 2022

    @mintty
    Owner

    For right-to-left scripts there is now a generic implicit font fallback mechanism: #1148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions