On Monday, 8 August 2016 21:27:36 UTC+2, Tony Mechelynck wrote: > On Mon, Aug 8, 2016 at 3:16 PM, manuelschiller.pimail via vim_dev > <[email protected]> wrote: > > On Monday, 8 August 2016 14:51:01 UTC+2, Tony Mechelynck wrote: > >> Well, if you let Pango do glyph reshaping for U+0020 to U+007F you > >> might end up with what you said you didn't want, i.e. fi fl st ffi ffl > >> digraphs and trigraphs, which in my experience are actually uglier (in > >> monospaced fonts) than just letting the individual letters stand side > >> by side. Try the following in a gvim (even unpatched) with 'encoding' > >> set to utf-8 to see what I mean: > >> 1. Enter Insert mode (i or a or o or whatever) > >> 2. Type the following sequences (with no spaces). Each sequence should > >> output one glyph. > >> Ctrl-V u fb00 > >> Ctrl-V u fb01 > >> Ctrl-V u fb02 > >> Ctrl-V u fb03 > >> Ctrl-V u fb04 > >> Ctrl-V u fb05 > >> Ctrl-V u fb06 > >> You should see, in that order, the glyphs for ff fi fl ft st ffi ffl. > >> I absolutely don't like them (in the monospaced fonts that have them; > >> in serif or sans-serif fonts it's different, especially in serif > >> italic). OTOH, I think that expanding them to two or three character > >> cells would be ugly the opposite way. > > > > Point taken, but this is not what the patch does. The sets [A-Z], [a-z], > > [0-9], and ' ' are still drawn without glyph shaping, when there's nothing > > else in the string being drawn that requires it - just as the old code did. > > (And the old code also fell back to full glyph shaping once you move above > > character code 128, i.e. into the range where you start to get UTF-8 > > encoded characters...) So in that sense, there's no substantial change in > > strategy. > > > > Also, I'm not changing the width of any glyph drawn, so there is no > > expansion of glyphs going on. It's just a question of how exactly the cache > > works that bypasses the glyph shaping (and which strings are allowed to > > bypass the glyph shaping process by going through the cache...). > > > > Are you proposing changes to the patch, or are you more concerned about how > > it'll look? In the former case, maybe you could outline which changes you'd > > like to see? In the latter case, why not just give the patch a try (e.g by > > typing one of the character combinations, and see if it does what you'd > > like it to do), and tell me which bits you don't like (which is much more > > productive than discussing in the abstract)? > > I'm concerned about how it will look, and I wasn't aware that you were > intentionally short-circuiting Pango for all letters and digits. > > Yes, these 6 codepoints (U+FB01 to U+FB06) are above the ASCII range > but they show examples of what one could get by replacing some > particular pairs of letters. Similarly, the Arabic subsystem of Vim > fetches its glyphs by (IIUC) altering their codepoint numbers > depending on whether they're joined to a preceding character, or to a > following character, or whether a lam and an alif are found together > in that order, thus implementing the rules for Arabic character > shaping by means of "presentation form" codepoints. > > > > > Kind regards, > > > > Manuel > > Best regards, > Tony.
Okay, now I understand - thanks for the clarification. Well, current vim code (and my patch) bypasses pango's glyph shaping completely in some cases. Current vim code does this if the string only contains code points <= 127. My patch restricts the range somewhat, so that glyph shaping occurs in more cases as with vanilla vim code. As far as I can tell, strings containing code points of 128 and above are left alone with or without my patch, and pango deals with them the usual way by shaping, and then drawing the resulting glyphs... Thanks, Manuel -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
