2016-08-07 20:27 GMT+09:00 manuelschiller.pimail via vim_dev <
vim_dev@googlegroups.com>:

> On Monday, 19 October 2015 08:41:36 UTC+2, Hörmetjan Yiltiz  wrote:
> > On Sunday, 20 April 2014 11:55:22 UTC-4, François Gannaz  wrote:
> > > Hello
> > >
> > > In a few words, here is a patch that makes gvim work better with
> ligatures
> > > in fonts, which can be useful even for programmers. Details follow.
> > >
> > > I tried to use a Hasklig[^1], a font with ligatures intended for the
> > > Haskell language. It serves the same objective as the Haskell Conceal
> > > script[^2], but with the added benefit that even a mouse copy-paste
> works
> > > as intended.
> > > [^1]: https://github.com/i-tu/hasklig
> > > [^2]: http://www.vim.org/scripts/script.php?script_id=3200
> > >
> > > Unfortunately, gvim doesn't support ligatures on ASCII characters. The
> > > following assertion fails at run-time:
> > >
> > >     ascii_glyph_table_init: assertion 'gui.ascii_glyphs->num_glyphs ==
> > >     sizeof(ascii_chars)' failed
> > >
> > > and many characters are displayed with the wrong glyphs.
> > > The attached patch limits the function ascii_glyph_table_init() to
> > > spaces and alphanumeric chars. It solves the problem here.
> > >
> > > Yet I wonder if the current hack with ASCII characters is really
> useful.
> > > Is there any performance test to check if a simpler behaviour wouldn't
> be
> > > suitable, at least for modern desktop installations?
> > > As the code comment mentions spaces, maybe it should be restricted to
> > > blank lines?
> > >
> > > Regards
> > > --
> > > François
> >
> > This would be so great to see implemented.
>
> It certainly would (and apologies for reopening such an old discussion).
>
> On my system, the patch François sent doesn't work for the ligatures in
> PragmataPro (but flawlessly for other fonts like Hasklig),


According to http://www.fsd.it/shop/fonts/pragmatapro/ ,  PragmataPro has
"One typeface, 3 families for the right need":

- PragmataPro is a spaced modularly font family with working ligatures.
- PragmataPro Mono is a very monospaced without ligatures.
- Essential PragmataPro is the cheap version to coding for English only.

As you know, Vim is implemented by design only to support monospace font
families.

So it looks to me that, among those three font families,  the only possible
and suitable choice for Vim to use with is PragmataPro Mono alone.

If that is the case, however, that font family is described as "without
ligatures," which makes your patch no sense.

Accordingly, it appears my assumption was wrong; it might be better for me
to conclude that what you meant by PragmataPro was literally PragmataPro,
not its monospace version, or PragmataPro Mono.

Then, another question arises:  What  does "a spaced modularly font" mean?
Does it imply that the font family in question is technically considered
something equivalent to a monospaced font and hence deserve Vim's support?

I'd appreciate it if you would give me some clarification or correct my
possible misunderstanding.

Best regards,
Kazunobu Kuriyama

apparently because the ASCII-to-glyph mapping won't quite work - I suspect
> that's due to PragmataPro having ligatures in that range, too. I solved
> this by inserting a space between characters that we hand to pango for
> shaping. Sane fonts will not have ligatures between a space and a printable
> character, this way we still get one glyph per ASCII character. I've
> attached the modified patch. This will work with normal fonts and ones with
> programming ligatures like Hasklig and PragmataPro; I've tested it with the
> gtk2 and gtk3 front ends.
>
> Please let me know if it would be possible to include this, and if not, at
> least the patch is public now where people can find it if they want it.
>
> Best regards,
>
> 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 vim_dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to