How do I use non-regular variant of a font in Ubuntu?
Simply stating, I was trying to use light variant of a font. However, I couldn't. Every time I select those light variant, Ubuntu reluctantly used the same regular one.
For example, Today, I was trying to use Dosis
font. When I choose this using Ubuntu-Tweak (or Unity-Tweak-Tool), Ubuntu selected the light one. I wanted to use Medium one, since that was giving more contrast. But selecting Dosis-Medium gave the save light rendering!!
Lastly, I tried using fonts.conf
in .config/fontconfig
directory. I've put these lines in that file. Putting these lines forces Ubuntu to display medium variant, but then Every Dosis fonts become Medium. There is no way to use Light variant anymore.
<match>
<test name="family"><string>Dosis</string></test>
<edit name="style" mode="assign" binding="strong">
<string>Medium</string>
</edit>
</match>
In short, How can I select or use different variant of a font in Ubuntu. A solution using fonts.conf
is also okay.
Output of fc-list 'Dosis'
/usr/share/fonts/opentype/dosis/Dosis-Light.otf: Dosis:style=Light
/usr/share/fonts/opentype/dosis/Dosis-SemiBold.otf: Dosis:style=SemiBold
/usr/share/fonts/opentype/dosis/Dosis-Bold.otf: Dosis:style=Bold
/usr/share/fonts/opentype/dosis/Dosis-Book.otf: Dosis:style=Book
/usr/share/fonts/opentype/dosis/Dosis-ExtraBold.otf: Dosis:style=ExtraBold
/usr/share/fonts/opentype/dosis/Dosis-ExtraLight.otf: Dosis:style=ExtraLight
/usr/share/fonts/opentype/dosis/Dosis-Medium.otf: Dosis:style=Medium
Output of fc-match 'Dosis'
Dosis-Medium.otf: "Dosis" "Medium"
Output of fc-match 'Dosis-Medium'
Dosis-Medium.otf: "Dosis" "Medium"
Screenshot of Dosis font selecting light variant:
If I use fonts.conf
, all dosis become same
sudo cp /usr/share/fonts/opentype/dosis/Dosis-Light.otf /usr/share/fonts/opentype/anwar.otf
and then using fontanwar
?