Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font features: OpenType support, multiple styles #17

Open
Seirdy opened this issue Jan 19, 2020 · 1 comment
Open

Font features: OpenType support, multiple styles #17

Seirdy opened this issue Jan 19, 2020 · 1 comment

Comments

@Seirdy
Copy link

Seirdy commented Jan 19, 2020

Currently, only a single path to a TrueType font is supported. Supporting multiple fonts for bold/italic styles would be appreciated.

Many fonts (inc. Nerd Fonts) are only available as .otf files, and need to be converted to TrueType fonts for use in Havoc. Support for OpenType fonts would make it easier to use these fonts.

@ii8
Copy link
Owner

ii8 commented Jan 20, 2020

Supporting multiple styles should be fairly easy, some small modifications to glyph.c so multiple font objects can be created (I was lazy so it just uses static memory atm.)
And then just using a different font object in the draw_cell function depending on the attributes. That would do it for bold, some extra stuff might have to be figured out for italic.

To support OpenType would probably mean to start depending on FreeType or something similar. FreeType would give support for all sorts of font formats but also a lot of features we really don't need or care about in monospaced termnials. So originally I didn't use it because of lofty minimalism goals(few dependencies, small static binary etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants