Commit Graph
99 Commits
Author SHA1 Message Date
Joseph Adams ee2c9775a7 Use distribute_dots() to even out spacing in underline 2022-01-18 15:46:31 +01:00
Joseph Adams da486153de Add (possibly erroneous) test for new underline.
Also make more clear *what* exactly is rendered in the cell (i.e. a
strikethrough).
2022-01-18 12:52:59 +01:00
Joseph Adams e86c7d668c Add rendering functions for dotted and dashed underline.
Dashed underline looks pretty good regardless of conditions, but the
dotted underline only looks good/correct on certain font-sizes. This is
due to the underline being rendered on a per cell/glyph basis (so one
can not place a dot directly between two letters, say. Could be remedied
by pulling the rendering of the underlines into the shader, but that is
more work.
2022-01-17 13:25:08 +01:00
Joseph Adams a2c4f830b3 Enable use of higher options for underlining text.
In `Colored and styled underlines` it's proposed that the SGR codes
\e[4:4m and \e[4:5m are used to add a dotted or dashed underline to the
rendering context respectively. This commit prepares the necessary
changes to add the two additional underline style, while still rendering
them as a normal underline and curly underline.
2022-01-13 17:27:02 +01:00
Kovid Goyal 1be7425186 Another mypy 0.920 fix 2021-12-17 06:15:10 +05:30
Kovid Goyal d31935b8eb Old python compat 2021-10-27 14:23:07 +05:30
Kovid Goyal d090db380f Add more type annotations 2021-10-27 13:26:18 +05:30
Kovid Goyal 6546c1da9b run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal 6d7df1c5e8 Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal c5afe4e745 Merge branch 'feat/undercurl-retina' of https://github.com/disrupted/kitty 2021-05-21 08:30:21 +05:30
disrupted d650a97dda Fix undercurl height & thickness on HiDPI screens
Update positioning
2021-05-18 19:00:46 +02:00
Kovid Goyal 608ac953e5 Pass DPI through to special render function 2021-05-18 07:46:04 +05:30
Antoine Bertin 822c9367c6 Support default font_features from fontconfig 2020-12-16 14:58:38 +01:00
Kovid Goyal 8b2fb105d0 Fix #2735 2020-06-05 19:24:40 +05:30
Kovid Goyal 362e4266bb Better coalescing of multiple symbol_maps
When specifying multiple symbol_map values in kitty.conf later ones
should override conflicting previous ones. Fixes #2662
2020-05-17 23:03:28 +05:30
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 382c31ddf2 Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal c912eef040 Minor strictness increases 2020-03-14 14:59:31 +05:30
Kovid Goyal 8803eeb890 more typing work 2020-03-10 12:58:53 +05:30
Kovid Goyal c817ba9eae more typing work 2020-03-09 13:32:45 +05:30
Kovid Goyal 9beae321d7 More typing work 2020-03-08 22:08:18 +05:30
Kovid Goyal 9b973ef99c More typing work 2020-03-08 20:36:50 +05:30
Kovid Goyal cc1336a616 More typing work
Also use a mypy based linter when editing
2020-03-08 11:02:14 +05:30
Eyal Chojnowski 08ad4f389d Fix linting 2020-02-06 16:21:32 +01:00
Eyal Chojnowski edba63d0d9 Make underline cursor thickness configurable 2020-02-06 16:15:12 +01:00
Eyal Chojnowski 332714a925 Make cursor beam thickness configurable 2020-02-06 12:54:42 +01:00
Kovid Goyal 547f138703 Bound width and height for render_curosr 2020-02-06 06:55:13 +05:30
Kovid Goyal 14560b008a Clean up font features merge 2020-01-07 08:54:32 +05:30
Fredrick Brennan 1db613e95b Add font_feature_settings
Close #2247
2020-01-04 14:36:20 +08:00
Kovid Goyal a649eb2a48 Coalesce neighboring symbol maps for better lookup performance 2019-11-12 20:05:48 +05:30
Luflosi 4eed8463b3 Simplify chained comparisions 2019-06-05 15:24:36 +02:00
Luflosi a792c94ccf Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal 27acd4c7d4 Don't crash when rendering special cells with absurd cell sizes
Fixes #1378
2019-02-14 09:49:51 +05:30
Kovid Goyal 3fa7007e91 Use the Wu line anti-alias algorithm for drawing undercurls
Fixes #853
2018-12-05 14:02:21 +05:30
Kovid Goyal 019e6efeda Reduce overlap with text when rendering wavy underline at small font sizes 2018-11-27 07:19:30 +05:30
Kovid Goyal b0a39b127d Remove unused import 2018-09-04 17:54:33 +05:30
Kovid Goyal e36f1157cc Improve anti-aliasing at small sizes for wavy underlines 2018-09-04 15:48:01 +05:30
Kovid Goyal 053b9a786c Use a cosine instead of sine wave for wavy underlines
Matches other terminals
2018-09-04 15:35:48 +05:30
Kovid Goyal b0a2dea747 Improve rendering of wavy underline at small font sizes
See #853
2018-09-03 10:15:53 +05:30
Kovid Goyal e552bcb0c6 Prerender cursor sprites 2018-07-19 14:03:39 +05:30
Kovid Goyal 84b2fbba28 --debug-font-fallback also prints out what basic fonts were matched
Fixes #656
2018-06-19 12:48:33 +05:30
Kovid Goyal b14c9614e0 DRYer 2018-05-27 12:37:05 +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 2be2f6aa0c Make icat a kitten
The kittens framework did not exist when icat was first written.
2018-05-09 20:26:30 +05:30
Kovid Goyal 328f22adab Let update_cell_emtrics() know if it is being called in response to a DPI change 2018-02-06 20:12:57 +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 8d94285a5d Ensure underlines are rendered even for fonts with very poor metrics
Fixes #236
2017-12-19 00:54:04 +05:30
Kovid Goyal cb04deef63 icat: Add a command line argument for horizontal alignment 2017-12-15 13:08:27 +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