Skip to content

dongguaguaguagua/hybrid-fonts-for-sublime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid fonts for sublime text 4

In VScode, users can use two fonts by installing a custom css plugin and changing css styles.

But there is no way changing css in sublime text 4. But sublime can detect bold and italic fonts in a font family. For example, Fira Code is a font family, which contains Bold,Light,Medium,SemiBold,Regular,Retina fonts.

"font_face": "Fira Code", in Preferences.sublime-settings tells sublime to use the fira code font family. My sublime can only distinguish FiraCode-Italic and FiraCode-Bold.

When FiraCode-Italic doesn't exisit, sublime will fake the italic font. However, it fails to fake the bold font if FiraCode-Bold is not found. In this case, a text dosn't change when it sopposed to be bold.

Fira-Code-60002

This folder contains 9 ttf fonts:

FiraCode-Bold.ttf     FiraCode-Medium.ttf   FiraCodeRegular-OperatorMonoLightItalic.ttf
FiraCode-SemiBold.ttf FiraCode-Regular.ttf  FiraCodeRegular-ConsolasItalic.ttf
FiraCode-Light.ttf    FiraCode-Retina.ttf   FiraCodeRegular-changed-ga.ttf

Fira Code & Consolas

Please rename Fira-Code-60002/FiraCodeRegular-ConsolasItalic.ttf into FiraCode-Italic.ttf then install it. Don't forget to uninstall the previous italic font to avoid confliction.

Up till 2023/1/9, the latest Fira Code version is 6.2, but obviously, FiraCode 6.2 doesn't provide an italic font. So I combined Fira Code with consolas_ligaturized.

To be more specefic, I extracted italic characters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 and punctuation marks like '"/!@#$%^& from consolas and migrated them with Fira Code Regular.

As a result, the hybrid font Fira Code Italic is similiar to consolas but maintained ligature features of Fira Code.

ligature Image

Other fonts in Fira-Code-60002 are exactly the same fonts from the latest Fira Code github release.

Also, Fira Code Italic belongs to Fira Code font family, so you can install this font to your computer with no concern.

It looks pretty in both Python and C++, with Monakai Pro (code scheme) and Material Theme (UI).

Python Image

Cpp Image

Fira Code & operator mono light italic

Please rename Fira-Code-60002/FiraCodeRegular-OperatorMonoLightItalic.ttf into FiraCode-Italic.ttf then install it. Don't forget to uninstall the previous italic font to avoid confliction.

Looks good on my Mac:

Cpp Image

Fira Code & operator mono book italic

Please rename Fira-Code-60002/FiraCodeRegular-OperatorMonoBookItalic.ttf into FiraCode-Italic.ttf then install it. Don't forget to uninstall the previous italic font to avoid confliction.

Book italic font is bolder than light italic.

Fira Code Regular With Changed g and a

Please rename Fira-Code-60002/FiraCodeRegular-changed-ga.ttf into FiraCode-Regular.ttf then install it. Don't forget to uninstall the previous regular font to avoid confliction.

In Fira Code WiKi, code cv01 and code cv02 mean to change the style of g and a. But sublime doesn't provide cv01 and cv02. So I have to edit the ttf file myself.

stylistic settings

Monaco

Please rename Monaco/MonacoPro-OperatorMonoBookItalic.ttf into MonacoPro-Italic.ttf then install it.

To avoid confliction, I renamed Monaco into Monaco Pro. Like the fonts I mentioned above, Monaco Pro Italic is acturally Monaco, while major characters are replaced by Operator Mono BookItalic.

How to build your own hybrid font ?

About

font families with multiple fonts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published