belluzj / fantasque-sans

A font family with a great monospaced variant for programmers.
http://openfontlibrary.org/en/font/fantasque-sans-mono
SIL Open Font License 1.1
7.05k stars 155 forks source link

Stylistic Set 1 - No loop k, build as default? #67

Closed kevinwaddle closed 7 years ago

kevinwaddle commented 8 years ago

Is it possible for me to build a ttf set from source that has ss01 set as the default?

PuTTY doesn't seem to support selecting stylistic sets.

belluzj commented 8 years ago

You cannot build it from source yet, as my build scripts are very simple and don't handle this. I will look into this, most probably by stealing ideas and code from Monoid's build system, which seems to solve this problem.

In the meantime, you can use FontSquirrel's Webfont Generator. Upload the .ttf files, select Expert Mode, and tick "Style Set 1" in the "OpenType Flattening". You may also want to check "No subsetting" if you need Greek or Cyrillic characters.

kevinwaddle commented 8 years ago

Ahhh, Thanks for the workaround! I'll give it a try. Although I think I may like the k-with-character better, but I want to compare.

kilobyte commented 8 years ago

Is there a way to enable such "stylistic sets" without recompiling and shipping separate copies of the font? Like, via some global fontconfig setting (yeah, that'd be different on different platforms).

As I'm afraid this single glyph turns a good font into something ridiculous.

belluzj commented 8 years ago

I'm not aware of any global setting like what you describe (I haven't researched it however). I think building several custom versions is the way to go, it's easier for users and works on all platforms, once you've downloaded the version that suits your tastes.

You're harsh on my looped k :) But I understand that lots of people can find it disturbing, that's why I made an alternative version.

NoAnyLove commented 8 years ago

The non-loop version k looks great, I can't wait to give a try. Unfortunately, I didn't figure out how to enable it, the webfont generator is a little bit inconvenient. I think building different version is good idea.

TheBaronHimself commented 8 years ago

I think I'm being a bit daft, but how does one enable Style Set 1.

bluss commented 8 years ago

That font tool is interesting, but even if I set Vertical Metrics to No Adjustment, it produces a font with very different vertical spacing (so it's not usable).

sigprof commented 7 years ago

On Linux with recent enough fontconfig and Pango >= 1.34 you can enable the ss01 feature via fontconfig (~/.config/fontconfig/fonts.conf or /etc/fonts/conf.d/*.conf):

<match target='font'>
    <test name='fontformat' compare='not_eq'>
        <string/>
    </test>
    <test name='family'>
        <string>Fantasque Sans Mono</string>
    </test>
    <edit name='fontfeatures' mode='assign_replace'>
        <string>ss01</string>
    </edit>
</match>
belluzj commented 7 years ago

OK people, I generated the files using Font Squirrel's Webfont Generator. Here is the archive.

This should do until I finally implement a more modern build system. For reference, I used these settings:

screen shot 2017-05-23 at 21 06 53

raghur commented 7 years ago

@belluzj - this generated version seems to have quite a few problems.. the size isn't consistent and just doesn't feel right to the eye. I guess these are artifacts of the automatic conversion?

see a below

2017-06-03 16_21_28-neovim

belluzj commented 7 years ago

Indeed, but that's the best I can do quickly. My plan is to have a better build system in the long run, like Monoid for example, but that will take more time and I can't do it now.

Maybe you can fix this particular problem by regenerating the font with the same Font Squirrel settings as in the screenshot before, but with "Keep Existing" in the "True Type Hinting" section.

raghur commented 7 years ago

@belluzj thanks for the quick response - I understand.. Take your own time... I'm just back to the regular looped k. Love this font!

belluzj commented 7 years ago

Hello everyone!

I finally upgraded my build system (thanks to Monoid for the inspiration and most of the code), and here is the new version of the font with the straight k:

https://github.com/belluzj/fantasque-sans/releases/download/v1.7.2-alpha/FantasqueSansMono-NoLoopK.zip

This time it should behave just like the original version. @raghur can you confirm when you have some time to try again? Thanks in advance.

SammyP6 commented 7 years ago

@belluzj Thank you so much. This is my favorite font, I juts didn't like the K. Im installing it now :D

raghur commented 7 years ago

@belluzj - Thanks - just downloaded. The sizing issues are fixed. However, Italic and BoldItalic versions in TTF and OTF directories still have the looped k (as shown by Windows font installer preview)

belluzj commented 7 years ago

Thanks for the report. I kept the looped version in the italic on purpose because I thought that it did fit better with the handwritten cursive style. But I will provide a coherent version and also open the loop in the italic, in the next version.

belluzj commented 7 years ago

Done for the 4 styles:

https://github.com/belluzj/fantasque-sans/releases/tag/v1.7.2-alpha.2

svenper commented 6 years ago

@sigprof
Your snippet doesn’t have any effect for me, even after clearing the cache and relogging in. Is anything else required? Must it be loaded in a certain order before or after the fonts?

fontconfig 2.13.0
pango 1.42.3
sigprof commented 6 years ago

@svenper You can check that fontconfig interprets your configuration properly:

$ fc-match -v 'Fantasque Sans Mono' | grep fontfeatures
    fontfeatures: "ss01"(w)

If that command shows ss01, but you still see the loop form of k, maybe the problem is that the program which displays the text does not handle the fontfeatures property from fontconfig. Programs using GTK+ ≥ 2 use the Pango library for text rendering, which supports fontfeatures; most other programs (including Tk and Qt-based ones) do not support fontfeatures and will display the default form of k.