#3642 Wrong / No characters shown from auxiliary fonts

closed-fixed
Max Funk
None
5
2012-01-24
2012-01-16
Max Funk
No

Assume, auxiliary fonts are switched on.
1) In a sequence of characters, if one of the characters cannot be shown with the main font and the system switches to a lower-quality auxiliary font, the subsequent characters are also shown with the lower quality font.
2) Characters of higher planes (>0xFFF) are only shown for the main font, not for auxiliary fonts.

I found, that both errors are in Chunk.layoutGlyphs. There is a concept "Draw as much as you can [with current font]", responsible for Bug 1). A char[] array is responsible for bug 2). One should assign the correct font character by character (perhaps with this BreakIterator class...)

To reproduce 1)
I tested with normal main font (Monospaced) and preferred fonts: Code2000, Code2001 (code2000.sourceforge.net) and unifont (unifoundry.com/unifont.html).
I charactermap, private use area, various letters from code 2000 can be seen, the missing characters are marked with a unifont symbol.
If I insert only one of these symbols, all subsequent characters inserted from Private use area show this same symbol.

To reproduce 2)
If I insert e.g. a character from block "Phaistos Disc" \uD800 \uDD00, I just see two placeholders. If I switch the main font to Code2001, I can see the symbol, a little man.

Discussion

  • Max Funk

    Max Funk - 2012-01-17

    I fixed Bug 1; it is on the patch tracker, # 3474765

     
  • Max Funk

    Max Funk - 2012-01-17
    • assigned_to: nobody --> mf3
    • status: open --> pending
     
  • Max Funk

    Max Funk - 2012-01-17

    I fixed it completely on the Patch tracker # 3474765.

    Auxiliary fonts, low and high unicode planes, should show correctly in text area now.

     
  • Max Funk

    Max Funk - 2012-01-17
    • status: pending --> open-fixed
     
  • Max Funk

    Max Funk - 2012-01-17
    • status: open-fixed --> pending-fixed
     
  • Max Funk

    Max Funk - 2012-01-23

    My bug description of the two bugs was not very readable, Maybe not necessary. but i try to make this better.
    1) jEdit should select for every character the best possible font, otherwise it can be stuck in a lower quality "fallback" font (like GNU Unifont)
    2)Characters >0xFFFF from the auxiliary fonts are not shown.

    Fixing both bugs ensures that characters inserted from charmap look always equal in jEdit.

    Patch tracker #374765 contains also an easy testfile.

     
  • Max Funk

    Max Funk - 2012-01-23
    • status: pending-fixed --> open-fixed
     
  • Alan Ezust

    Alan Ezust - 2012-01-24
    • status: open-fixed --> closed-fixed
     
  • Alan Ezust

    Alan Ezust - 2012-01-24

    Committed to trunk. Thanks, mf3!!

     

Log in to post a comment.