termux-app
termux-app copied to clipboard
True italic fonts.
Closes #711. Adds support to true italic fonts. If an italic font file (~/.termux/font-italic.ttf
) not exists, fallback to previous italic effect.
One thing that maybe can be an issue is to use two different kinds of fonts. This isn't easy to handle with my current knowledge of the code then should be avoided if possible (sane people will not use two different fonts, I hope...).
If this PR is merged please add a corresponding tip here: https://wiki.termux.com/wiki/Termux:Styling
One thing that maybe can be an issue is to use two different kinds of fonts.
@j0ng4b I couldn't understand that. Can you provide an example?
I tried this PR with two different fonts and it works:
- Regular font (~/.termux/font.ttf): Hack regular nerd font.
- Italic font (~/.termux/font-italic.ttf): Inconsolata italic nerd font.
I couldn't understand that. Can you provide an example?
This is most related to the render
function that's do all the math before draw things on the canvas (if I don't miss understood). This by now only consider the normal font dimensions (line height, acent etc...) to do this math if this dimensions differ from normal and italic the text could be wrong draw (maybe I'm wrong about this).
For example, the fonts with the same or almost the same dimensions:
When mixing the italic text and normal text everything goes well in this case, but when using fonts with different dimensions this is the result:
On the two images the result is different because the base (non-italic) font width used to do the math before draw change in the two fonts.
Why is this not merged? This works perfect.
Why is this not merged?
Waiting for this project to be fixed and merged
@j0ng4b @agnostic-apollo can this be merged?
Waiting for this PR merge conflicts to be resolved to see if it fixes my italic clipping issues with neovim. Any progress?
Hopefully it's fixed soon
Please, resolve the conflicts 🙏
For anyone who wants to build, the PR is still working, there's very simple conflicts
Any updates?
When I get some time I'll work on improve this (maybe add true bold fonts) and fix the conflicts.
Hey, are there any updates on this?