Commit Graph
37 Commits
Author SHA1 Message Date
Trygve Aaberge 931e91f1a7 Read strikethrough info from font when using FreeType
This reads the strikethrough position and thickness from the font so it
is rendered correctly.

This is only implemented for FreeType, not Core Text, because I didn't
find any way to get the info from Core Text, and I don't have a Mac to
test it on either. When using Core Text or when the font doesn't provide
the info, the same approximation as before is used.
2020-03-30 20:09:30 +02:00
Kovid Goyal 57542fc204 Only disable liga and dlig for nimbus mono 2019-08-10 08:22:36 +05:30
Kovid Goyal 49429b5f49 When zeroing memory, use type independent code
Reduces the potential for bugs
2019-07-23 10:54:10 +05:30
Kovid Goyal 6037167336 Allow controlling the ligature strategy dynamically, per window
Fixes #1574
2019-04-27 22:05:33 +05:30
Luflosi 999a6a288c Do not render ligatures under cursor 2019-03-20 01:35:03 +01:00
Kovid Goyal c181919a57 Fix rendering of simple strings with FreeType 2019-03-04 19:54:10 +05:30
Kovid Goyal 11522ccc92 Initial code to show window size in cells while resizing 2019-03-04 19:54:10 +05:30
Kovid Goyal bb97c589c1 FreeType code to render a simple string 2019-03-04 19:54:09 +05:30
Daniel Hahler 12cfe6d1d1 render_line: use cells based on bitmap width
[ci skip]
2018-09-29 18:38:53 +02:00
Daniel Hahler 1d50a188c4 render_glyphs_in_cells: skip centering glyph for PUA 2018-09-29 16:19:53 +02:00
Kovid Goyal 8dea5b3e3e Reduce data sent to GPU per draw by 30%
Split up the Cell structure into a CPUCell and a GPUCell. Only the
GPUCell part needs to be sent to the GPU. Should make kitty use even
less system resources and make a performance difference on systems where
the GPU bandwidth is constrained.

Also allows adding more CPU only data in the future without affecting
GPU bandwidth. For example, hyperlinks or more combining characters.
2018-05-27 21:25:09 +05:30
Kovid Goyal df9eab279a Implement changing the font size for individual top level (OS) windows 2018-05-27 12:37:49 +05:30
Kovid Goyal 523aadaa3b Refactor font group handling
Allow kitty to manage multiple groups of fonts with different cell
sizes. Will eventually allow kitty to have different font sizes/dpi per
OSWindow
2018-05-27 12:37:05 +05:30
Kovid Goyal 96c93fa252 Add support for emoji presentation when choosing fallback fonts 2018-02-06 11:11:22 +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 0fcce6ec58 Remove trailing whitespace from native code files 2017-12-20 08:44:47 +05:30
Kovid Goyal c86c166448 More work on positioning glyphs with CoreText 2017-12-11 18:48:14 +05:30
Kovid Goyal 5407fa72b4 Start work on rendering with CoreText 2017-12-10 20:28:06 +05:30
Kovid Goyal e332522a61 Mark backend API in fonts.h header 2017-12-10 09:21:46 +05:30
Kovid Goyal ed2e83654f Draw emoji on macOS using CoreText rather than FreeType
Needed because FreeType cannot handle the latest version of the Apple
Color Emoji font, which probably uses SVG-in-OTF instead of SBIX.
Finishes up the color emoji implementation.
2017-12-09 12:01:43 +05:30
Kovid Goyal 8d7515bd9b Basic color emoji rendering working
Still need to downscale color bitmaps to fit into cells
2017-12-09 12:01:43 +05:30
Kovid Goyal 9cda51b5a8 Store sprites in an RGBA texture
Needed to support color emoji
2017-12-09 12:01:42 +05:30
Kovid Goyal 336857a106 A more general cp->gid API 2017-11-12 23:43:21 +05:30
Kovid Goyal 67a37f1f41 Adjust the point size of fallback and symbol fonts so that their heights match the current cell height 2017-11-12 10:30:57 +05:30
Kovid Goyal 5f4e003bed Add a ligature shaping test 2017-11-11 20:55:53 +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 cccacfdf7c Restore Apple's line height fudge factor on macOS 2017-11-10 17:38:36 +05:30
Kovid Goyal 541f389a06 Work on using FreeType to render on macOS as well 2017-11-10 15:39:53 +05:30
Kovid Goyal c2b2833a37 API to load FreeType font from path and psname 2017-11-10 14:50:15 +05:30
Kovid Goyal b0fffad0c2 API to create FreeType face from in memory data 2017-11-10 14:30:54 +05:30
Kovid Goyal 774956053a Allow storing arbitrary data on FreeType Face objects 2017-11-10 14:20:20 +05:30
Kovid Goyal 934d21ac30 Wire up a few remaining pieces 2017-11-09 16:55:46 +05:30
Kovid Goyal 58be99a27e Work on rendering ligatures correctly 2017-11-09 16:55:43 +05:30
Kovid Goyal 4726bcd210 Implement rendering of glyphs from font files in Freetype 2017-11-09 16:55:42 +05:30
Kovid Goyal 7d7d82a68d Start working on actually rendering lines of text 2017-11-09 16:55:38 +05:30
Kovid Goyal f25d2ea540 Rip out the old sprite update code 2017-11-09 16:45:45 +05:30
Kovid Goyal 3643a78b18 Start work on line based rendering 2017-11-09 16:45:44 +05:30