24 Commits

Author SHA1 Message Date
Kovid Goyal
9c874f6685
Add support for the unicode emoji presentation variation selector 2018-02-06 09:52:55 +05:30
Kovid Goyal
240b1475c7
Fix regression that caused a few ligatures to not render correctly in rare circumstances
This was caused by cache corruption. is_special_glyph() and
is_empty_glyph() were treading over each other if called in
the right sequence. Fixes #303
2018-02-05 00:04:05 +05:30
Kovid Goyal
fc7ec1d3f7
Get rid of the option to use the system wcwidth
The system wcwidth() is often wrong. Not to mention that if you SSH into
a different machine, then you have a potentially different wcwidth. The
only sane way to deal with this is to use the unicode standard.
2018-02-04 21:02:30 +05:30
Kovid Goyal
1ae7ae4a1d
Fix consecutive separate ligatures being rendered in the same group
Rendering multiple ligatures in the smae group is bad for performance
and also causes incorrect rendering if the last ligature in the group
does not fit into the number of cells in the group.
2018-01-14 11:18:44 +05:30
Kovid Goyal
684a2e05f4
Move logical DPI calculation into glfw module
Now DPI state is maintained in only one central place.
2017-12-14 18:30:53 +05:30
Kovid Goyal
f2d00589d8
Update test to match new set of pre-rendered sprites 2017-12-04 12:41:50 +05:30
Kovid Goyal
eb8f4e0b3c
isosx -> is_macos 2017-12-01 12:16:13 +05:30
Kovid Goyal
26e6716f67
A test that reliably triggers the current failure 2017-11-13 15:30:30 +05:30
Kovid Goyal
9fccc38382
Better fix for not using the unsafe to break flag
Recognize special glyphs by comparing the index to the glyph for the
codepoint in the font. Cannot rely on glyph width as many glyphs have
zero width. For example the glyph for space characters.
2017-11-13 07:03:58 +05:30
Kovid Goyal
5c6be7f637
Insulate emoji test from system wcwidth 2017-11-12 23:43:21 +05:30
Kovid Goyal
088087df73
Use only cluster numbers and glyph sizes for grouping glyphs into cells
See https://github.com/behdad/harfbuzz/issues/615 for discussion
2017-11-12 23:43:21 +05:30
Kovid Goyal
5f4e003bed
Add a ligature shaping test 2017-11-11 20:55:53 +05:30
Kovid Goyal
53e9f35c1f
Add test for harfbuzz shaping 2017-11-11 18:47:34 +05:30
Kovid Goyal
e5d411b80d
Refactor font code
DRYer with global state stored in fewer places. And only round-tripping
through python for font selection, not face creation.
2017-11-11 18:14:22 +05:30
Kovid Goyal
b58e900806
Call prerender() in rendering tests setup 2017-11-10 08:30:35 +05:30
Kovid Goyal
758d315b8e
Better fix for test 2017-11-09 16:55:45 +05:30
Kovid Goyal
dc7d705c87
Runa simplified version of the font rendering test on macOS 2017-11-09 16:55:45 +05:30
Kovid Goyal
a8bca1c119
Skip the rendering test on macOS
macOS is underpowered junk.
2017-11-09 16:55:44 +05:30
Kovid Goyal
da8bf5adc7
Add rendering tests 2017-11-09 16:55:44 +05:30
Kovid Goyal
898e87aa7b
Dont allocate space for dummy fonts
Also move sprite_map test into fonts test module
2017-11-09 16:55:42 +05:30
Kovid Goyal
d153794c05
... 2017-11-09 16:55:42 +05:30
Kovid Goyal
81143e0c7e
Test to render all box drawing characters under the sanitizers 2017-11-09 16:55:42 +05:30
Kovid Goyal
5a044c0320
... 2017-11-09 16:55:41 +05:30
Kovid Goyal
0518cabef6
Infrastructure for rendering cells in the test suite 2017-11-09 16:55:41 +05:30