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
ed44515318
All tests pass
2018-05-27 12:37:05 +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
409bd37db5
Store combining chars as an array in the Cell
...
Makes it easier to increase the number of combining chars if needed,
rather than storing them as a mask.
2018-01-18 14:10:58 +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
b9d0ec0d4c
CoreText: Use the layout engine to calculate cell height
...
Slower, but hopefully more accurate, since it takes into account
whatever kludges Apple is currently using to calculate line height
in its applications.
2017-12-13 14:12:23 +05:30
Kovid Goyal
869abc4d5c
...
2017-12-13 14:05:01 +05:30
Kovid Goyal
872118fcbe
CoreText: Fix incorrect underline position and thickness calculation
2017-12-13 13:59:11 +05:30
Kovid Goyal
d25c0d42bc
CoreText: Ensure cell_width and cell_height are never zero
2017-12-13 09:35:50 +05:30
Kovid Goyal
a1b4f7c92d
Fix COreText leak on exit
2017-12-13 08:27:33 +05:30
Kovid Goyal
47704f24c1
CoreText: Get rid of the line height fudge factor
...
It was leading to larger line heights than in iTerm on High Sierra with
Menlo. Also as per Apple documentation, line height should be ascent +
descent + leading.
https://developer.apple.com/library/content/documentation/TextFonts/Conceptual/CocoaTextArchitecture/TypoFeatures/TextSystemFeatures.html
2017-12-13 08:22:26 +05:30
Kovid Goyal
a29b424477
CoreText: Implement resizing of glyphs too wide to fit
2017-12-11 20:34:23 +05:30
Kovid Goyal
005c4bf29e
Finish up CoreText based rendering
2017-12-11 19:04:44 +05:30
Kovid Goyal
c86c166448
More work on positioning glyphs with CoreText
2017-12-11 18:48:14 +05:30
Kovid Goyal
0999ce159e
Fix colors incorrect when rendering directly to buf
2017-12-11 10:43:32 +05:30
Kovid Goyal
98d8ab2953
Fix OT shaper not working on macOS
...
Also dont keep an extra reference to the hb font in fonts.c
2017-12-11 09:48:20 +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
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
98e93cb4bd
Workaround for broken CTFontCreateForString
2017-11-11 10:16:43 +05:30
Kovid Goyal
3592f82e4f
Implement fallback fonts in CoreText
2017-11-11 08:08:03 +05:30
Kovid Goyal
289cfe7584
Fix bold-italic variant not being auto-selected on macOS
2017-11-10 22:06:11 +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
5c582f7639
Start work on harfbuzz rendering on macs
2017-11-10 12:52:54 +05:30
Kovid Goyal
3ec64a17f8
Dont call the font change machinery when the actual size has not changed
2017-11-09 16:55:45 +05:30
Kovid Goyal
dd6108de5b
DRYer
2017-11-09 16:55:44 +05:30
Kovid Goyal
aa1b94aed0
Ensure descriptor is always set for coretext font objects
2017-11-09 16:55:44 +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
d05ea312ef
Fix crash on macOS when failing to get font_descriptor
2017-11-09 16:55:44 +05:30
Kovid Goyal
da8bf5adc7
Add rendering tests
2017-11-09 16:55:44 +05:30
Kovid Goyal
ce0e5a893f
Make the showcase output a little nicer
2017-11-09 16:55:44 +05:30
Kovid Goyal
58be99a27e
Work on rendering ligatures correctly
2017-11-09 16:55:43 +05:30
Kovid Goyal
ae06879193
Mark unused pending implementation
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
4ba17df570
Forward declaration of Face_Type needed
2017-11-09 16:55:42 +05:30
Kovid Goyal
38a5e76c50
More work on line based rendering
...
Should now build on all platforms
2017-11-09 16:45:45 +05:30
Kovid Goyal
729395c887
Release old hb_font when changing font size
2017-11-09 16:45:44 +05:30
Kovid Goyal
83e114d211
Implement new font methods for CoreText
2017-11-09 16:45:44 +05:30
lxcode
81f14edb49
Enable subpixel quantization and positioning
2017-11-01 15:37:43 -07:00
Kovid Goyal
4a27793651
DRYer CoreText
2017-09-15 10:45:17 +05:30
Kovid Goyal
697a7b78b3
macOS: Fix selecting fonts using full names (including sub-family) not working
...
Fixes #83
2017-08-24 19:16:12 +05:30
Kovid Goyal
58644e2b37
Function to get all fonts on macOS
2017-08-24 15:05:42 +05:30
Kovid Goyal
ddcd4daede
macOS: Fix wide characters having their right edges slightly truncated
2017-08-24 12:46:41 +05:30
Kovid Goyal
598c5d313b
A better (I hope) cell height calculation on OS X
...
See #42
2017-01-24 08:01:52 +05:30
Kovid Goyal
f4a6c42b48
Implement CTFace.__repr__
2017-01-14 10:59:52 +05:30