googlefonts / Inconsolata

Development repo of Inconsolata Fonts by Raph Levien
http://levien.com/type/myfonts/inconsolata.html
SIL Open Font License 1.1
1.32k stars 64 forks source link

Any thought on larger height #66

Open WindSoilder opened 3 years ago

WindSoilder commented 3 years ago

First, thanks for your awesome font very much!!!

I saw this font have different width and weight, are there any ideas for different height? Personally, I find Inconsolata-g's is bigger than Inconsolata, I think it's better for High Resolution Screen

nirajd commented 3 years ago

I wondered about this as well. I use Inconsolata as my system font and with default size settings (12pts usually), Inconsolata is considerably smaller than other monospace fonts.

Would be great to be able to use it without trying to tweak font size in various applications.

svipas commented 1 year ago

@m4rc1e @raphlinus Please, could you consider this? Or at least say how we could do that by ourself from some build script? I need at least 14 font size for Regular or 15 font size for SemiCondensed for it to be usable and the problem is if I increase size in Visual Studio Code other widgets with different font looks enormous...

CrendKing commented 1 year ago

I can think of two ways to achieve this. First is to use FontForge's Transformation function to actually scale all the glyphs by a percentage. There are many tutorials online, such as this. However, because the way how FontForge exports the font file will certainly be different to how this repo does, it is a lossy process and I do not recommend.

The other simple way is to reduce the UPM (em square) of the font from the original 1000 to something like 900, which is increase the size by around 11%. FontForge can do this, but again it's a lossy process. A cleaner approach is to use fonttools' ttx:

  1. Install fonttools in a virtualenv.
  2. Export the original head table from the font: ttx -t head -o head.ttx 'Inconsolata[wdth,wght].ttf'
  3. Change the line <unitsPerEm value="1000"/> in head.ttx to something like <unitsPerEm value="900"/>.
  4. Merge the new head table back to the font with ttx --no-recalc-timestamp -o 'Inconsolata[wdth,wght]-larger.ttf' -m 'Inconsolata[wdth,wght].ttf' head.ttx

Note that because Inconsolata comes with hinting program, changing the UPM may mess up the hinting effect. To fix that, re-apply hinting with FreeType's ttfautohint. Simply use the GUI version and leave all parameter default.

svipas commented 1 year ago

@CrendKing Thanks a lot, but still I hope there would be an "official" way to do this or separate builds with larger size. I tried your suggestion with fonttools, but seems like hinting is "off" even though I used ttfauthohint, font is thinner than original one.

svipas commented 1 year ago

@m4rc1e Any help here? Maybe we could do it ourself somehow? Because I need to use 14.5 font size which increases sizes for a lot of things in IDE... It would be really good if I could use 12.5 like I do for e.g. with Iosevka.