IdreesInc / Monocraft

A monospaced programming font inspired by the Minecraft typeface
https://idreesinc.com
SIL Open Font License 1.1
8.02k stars 115 forks source link

Adds Bold, Italic, and Thin Variants #128

Open Dheatly23 opened 1 year ago

Dheatly23 commented 1 year ago

Implements #127. Still needs to fix lag somehow. And maybe package all variants in a single file?

Example: (size: 10 pt) (in order: Regular, Italic, Bold, Bold Italic): Example

Ciubix8513 commented 1 year ago

Font generation can be really slow, especially now with continuous ligatures, and this will slow it down 3x, if I understand the code. Maybe it would be a good idea to separate each variant generation into it's own thread? So that the slow down is not that bad.

I don't have much experience with python, but form what I found it seems to be relatively easy

Dheatly23 commented 1 year ago

It gets a bit better with manually transforming bold glyph. But now there is really nasty segfault which i can't fix. I've commented out the offending line for now.

LevitatingBusinessMan commented 12 months ago

Very cool! What are the current issues that still need to be fixed?

Dheatly23 commented 12 months ago

Boldness needs to be ajdusted, i'm still trying to find a middle point. And i didn't test for all character, some might gets unreadable with bold. Also i don't know if putting all fonts into .ttc is a good move, maybe some OS does not support it? Lastly generation time is getting even longer, but it can be deferred for another time.

LevitatingBusinessMan commented 10 months ago

I've tried it out. For my usecase, in the terminal, the bold might be too thick.

Which conflicts with @SirMishaa's opinion who thinks it needs to be thicker.

Dheatly23 commented 10 months ago

I can make it multiple level of boldness/thinness. Trouble is, build time multiplies with each new variant. Another thing is i haven't had any algorithm for thinning, particularly with diagonals.

LevitatingBusinessMan commented 10 months ago

I don't think build time is that much of an issue. My laptop compiles your branch in 30 seconds, and most people download the font pre-built. I am curious what @IdreesInc's opinion is on that.

Ciubix8513 commented 10 months ago

I personally agree, while long build times are annoying when you're trying to quickly iterate on a glyph(s) for most people it's not an issue. Maybe add a flag to disable generation of additional fonts, to allow to iterate faster? if that's the concern.

IdreesInc commented 5 months ago

I don't think build time is that much of an issue. My laptop compiles your branch in 30 seconds, and most people download the font pre-built. I am curious what @IdreesInc's opinion is on that.

Look, if the font you use doesn't take a few days to generate, is it even a real font?

Update: Generates relatively quickly on my modern machine and with the new flags allowing people to skip generation of certain variants it should be fine.

IdreesInc commented 5 months ago

Wow, this is fantastic, thanks @Dheatly23 for adding this in! Apologies for the delay in reviewing it, been working on many new projects at once and haven't had the time to review new features in stable projects until now. The new weights look great, though the very bold and very light ones are hard to read on my machine (as expected). I've noticed that the font looks different based on the whether the user is on Windows or Mac due to the font rendering, so having new weights would likely reduce a lot of the complaints Monocraft receives. My only question is why do we need italic variants? At least on my Mac, the font is italicized automatically, though maybe this doesn't occur on other machines?

Dheatly23 commented 5 months ago

Thanks for the review!

I made a few tweaks with the polygonizer algorithm to support bold/thin, so there may be some bugs. And i'm still not happy with thinning algorithm (example: how to thin across corner?), but for now it's not too bad. One optimization (removing segmentation) significantly speeds up the code.

About the italic, some font renderer apparently can't automatically italicize fonts. So i suppose adding separate italic file would fix that.

With boldness of black variant, i reduce it a bit just now. You can see it here (8 pts, Windows 10): Black Before After I'm worried it's a bit too close to other variants, so feedback is much appreciated!