Commit Graph
232 Commits
Author SHA1 Message Date
pagedown a9a7912372 ... 2022-02-23 21:37:41 +08:00
pagedown 43f435c334 Avoid shadow the global variable name 2022-02-23 21:30:05 +08:00
Kovid Goyal 08221489fd Cleanup previous PR 2022-02-23 07:59:41 +05:30
Nick Wynja c240e7deaf Also check ### to confirm spacer strategy
relates to #4721
2022-02-22 14:59:19 -05:00
Kovid Goyal 263d121f3e Rescale symbol_map faces for the desired cell height
Matches treatment of fallback faces. See #4670
2022-02-12 07:57:03 +05:30
Kovid Goyal 01b4654461 A new option narrow_symbols to turn off opportunistic wide rendering of private use codepoints 2022-02-11 13:04:44 +05:30
Kovid Goyal 18ce091bfa Fix symbol/PUA glyphs loaded via symbol_map instead of as fallbacks not using following spaces to render larger versions
Fixes #4670
2022-02-11 06:36:54 +05:30
Kovid Goyal 6b47f6f769 Make adding new underline styles easier in the future 2022-02-04 14:05:19 +05:30
Kovid Goyal e8b19e08fa Fix non-renderable combining chars causing some text to not be rendered on Linux
The test for non-renderable chars was broken and the variation selectors
were not included in the test. Fixes #4444
2022-01-05 22:33:53 +05:30
Kovid Goyal 1be7425186 Another mypy 0.920 fix 2021-12-17 06:15:10 +05:30
Kovid Goyal 536d6e00d9 Further simplify logic for PUA space ligatures 2021-11-14 12:47:54 +05:30
Kovid Goyal 725a04b321 Fix #4236 2021-11-14 12:42:08 +05:30
Kovid Goyal 4fc8267264 Fix #4235 2021-11-14 10:23:42 +05:30
Kovid Goyal fbf47f75d5 Fix soft hyphens not being preserved when round tripping text through the terminal
Also roundtrip all characters in the Cf category.

Characters with the DI (Default Ignorable) property are now
preserved but not rendered and treated as zero-width
as per the unicode standard.
See https://www.unicode.org/faq/unsup_char.html
2021-10-07 12:44:22 +05:30
Kovid Goyal 40b50332de Fix space ligatures not working with Iosevka for some characters in the Enclosed Alphanumeric Supplement
Recognize chars in this block as non-emoji dingbats to turn on space
ligatures for them

Fixes #3954
2021-08-19 22:28:07 +05:30
Kovid Goyal ef76c075e0 Get rid of bits from CellAttrs 2021-08-18 10:06:08 +05:30
Kovid Goyal 780e526143 Use a union for cell attributes
Cleaner code, no performance impact
2021-08-18 10:06:08 +05:30
Kovid Goyal be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal 9d3a2cc219 Fix space based ligatures not rendering correctly
The new infinite ligature cache needed to be keyed by total number of
cells as well as total number of glyphs, otherwise a space based
ligature which is the same glyph rendered in different numbers of cells
wold render incorrectly when present in multiple forms. Fixes #3729
2021-06-16 18:41:01 +05:30
Kovid Goyal 1b35708d89 macOS: Fix a crash when rendering ligatures larger than 128 characters
Fixes #3724
2021-06-14 07:15:52 +05:30
Kovid Goyal d09c20aa01 Store the global font_size on the opts object where it belongs 2021-06-04 21:51:02 +05:30
Kovid Goyal 46a0566e2e Special handling for IOSevka's future ligatures
See https://github.com/be5invis/Iosevka/issues/1007
2021-05-21 17:53:49 +05:30
Kovid Goyal 0a742ea8d0 middle is more common than start or end 2021-05-18 09:55:00 +05:30
Kovid Goyal eced40a761 ... 2021-05-07 09:31:31 +05:30
Kovid Goyal 5ac315bc3a DRYer 2021-05-07 09:30:44 +05:30
Kovid Goyal 32df4daa63 Fix warning from CodeQL 2021-05-07 09:27:52 +05:30
Kovid Goyal dc6ab69387 Workaround spurious error reported by ASAN 2021-05-07 08:34:18 +05:30
Kovid Goyal 7301c56753 ... 2021-05-07 07:42:39 +05:30
Kovid Goyal 3b76d657bd Fix colored indication not being sent to GPU 2021-05-07 07:41:19 +05:30
Kovid Goyal 2adb6240e4 Reduce GPU memory for infinite length ligatures
An infinite length ligature (longer than 9 glyphs) that has long
sequences of a repeated glyph now does not store a separate sprite
for every repeat.

For example in the ligature ---------- even though there are 10 hyphen
glyphs only four will be stored on the GPU.
2021-05-07 06:59:30 +05:30
Kovid Goyal e11af496da Remove incorrect cast 2021-05-07 06:59:30 +05:30
Kovid Goyal f6e33406d7 Dont assume all sprites are rendered if the first one is 2021-05-07 06:59:30 +05:30
Kovid Goyal 6eab138d68 ... 2021-05-07 06:59:29 +05:30
Kovid Goyal 33287115de Support infinite length ligatures 2021-05-07 06:59:24 +05:30
Kovid Goyal 4a34f596a8 Remove MAX_EXTRA_GLYPHS_IN_GROUP 2021-05-07 06:58:55 +05:30
Kovid Goyal 7616a3e743 ... 2021-05-07 06:58:55 +05:30
Kovid Goyal c64353c324 Dont make canvas dependent on max num of glyphs 2021-05-07 06:58:55 +05:30
Kovid Goyal 8eac22d37a typo 2021-05-07 06:58:55 +05:30
Kovid Goyal 35fab12330 Dont rely on max glyphs limit for scratch space 2021-05-07 06:58:55 +05:30
Kovid Goyal a46988bc50 Simplify code by getting rid of ExtraGlyphs 2021-05-07 06:58:54 +05:30
Kovid Goyal 26e1d6fe5c Use uthash for glyph properties as well 2021-05-07 06:58:54 +05:30
Kovid Goyal 33de0f821f Use uthash for the sprite position cache 2021-05-07 06:58:54 +05:30
Kovid Goyal accdf9a6a8 DRYer 2021-05-06 08:57:38 +05:30
Kovid Goyal 1a4efd9d81 Remove unused code 2021-05-06 07:46:31 +05:30
Kovid Goyal f32ad617a2 Special case rendering of the few remaining Powerline box drawing chars
Fixes #3535
2021-04-26 09:07:55 +05:30
Kovid Goyal 7043d565c9 ... 2021-04-24 09:44:40 +05:30
Kovid Goyal 3f5f218e0b Use correct printf codes 2021-04-19 13:00:48 +05:30
Kovid Goyal d28caf15b2 More glyph grouping fixes 2021-03-25 14:06:16 +05:30
Kovid Goyal 7c7933efa9 Fix #3416 2021-03-24 13:17:38 +05:30
Kovid Goyal 1f4fdb174a Fix rendering of the new infinite length ligatures on CoreText
Apparently on CoreText, harfbuzz gives incorrect values for glyph
positions. So we use it only for selection and grouping of glyphs.
Actual positioning is done using CoreText. This means sophisticated
positioning using GPOS tables is probably broken, but that isn't really
useable in a character grid anyway.

Also remove the hack where glyph_centering was done for calt ligatures
as it seems to not be needed with modern FiraCode and CoreText
rendering. Fixes #3372
2021-03-11 20:11:40 +05:30