Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fira Code v5 is not listed as monospace anymore under Linux #1073

Closed
lkuty opened this issue Jun 10, 2020 · 9 comments
Closed

Fira Code v5 is not listed as monospace anymore under Linux #1073

lkuty opened this issue Jun 10, 2020 · 9 comments

Comments

@lkuty
Copy link

lkuty commented Jun 10, 2020

Under Linux, Fira Code v4 is listed as monospace:

$ fc-list -v "Fira Code Retina"
...
spacing: 90(i)(s)
...

We don't have this anymore with v5 which means that my terminal named kitty cannot use the font anymore.

@tonsky
Copy link
Owner

tonsky commented Jun 10, 2020

Oops. Fixed in 5.1. Thank you for reporting!

@tonsky tonsky closed this as completed Jun 10, 2020
@salim-b
Copy link

salim-b commented Jun 11, 2020

Under Linux, Fira Code v4 is listed as monospace:

$ fc-list -v "Fira Code Retina"
...
spacing: 90(i)(s)
...

A spacing of 90 means dual-width, not monospace.

FiraCode v5.1 is still reported as dual-width:

$ fc-list :spacing=90 -f '%{family}\n' | cut -d ',' -f 1 | sort | uniq
...
Fira Code
...

If you need it to be reported as monospace (e.g. because your editor/terminal/IDE only supports monospaced fonts like RStudio), a workaround is to overwrite the spacing of FiraCode to 100 (mono) using a custom fontconfig .conf file.

@tonsky
Copy link
Owner

tonsky commented Jun 11, 2020

I wonder if RStudio is the only one having problems with dual-width?

@tonsky
Copy link
Owner

tonsky commented Oct 8, 2020

@lkuty @salim-b can you please check that this build works for you? Thanks!

@sooqua @Tatsh @zoickx or anyone with the double-width issue, can you please test this build for me? Thanks!

Fira_Code_v6.zip

@lkuty
Copy link
Author

lkuty commented Oct 8, 2020

That looks good under Debian 10.

# unzip Fira_Code_v6.zip
# rm /usr/share/fonts/truetype/FiraCode-*
# cp *.ttf  /usr/share/fonts/truetype/
# fc-cache
# fc-list -v "Fira Code" | grep -E "family|file|width|spacing"
	family: "Fira Code"(s) "Fira Code SemiBold"(s)
	familylang: "en"(s) "en"(s)
	width: 100(f)(s)
	spacing: 100(i)(s)
	file: "/usr/share/fonts/truetype/FiraCode-SemiBold.ttf"(s)
	family: "Fira Code"(s)
	familylang: "en"(s)
	width: 100(f)(s)
	spacing: 100(i)(s)
	file: "/usr/share/fonts/truetype/FiraCode-Regular.ttf"(s)
	family: "Fira Code"(s) "Fira Code Medium"(s)
	familylang: "en"(s) "en"(s)
	width: 100(f)(s)
	spacing: 100(i)(s)
	file: "/usr/share/fonts/truetype/FiraCode-Medium.ttf"(s)
	family: "Fira Code"(s)
	familylang: "en"(s)
	width: 100(f)(s)
	spacing: 100(i)(s)
	file: "/usr/share/fonts/truetype/FiraCode-Bold.ttf"(s)
	family: "Fira Code"(s) "Fira Code Light"(s)
	familylang: "en"(s) "en"(s)
	width: 100(f)(s)
	spacing: 100(i)(s)
	file: "/usr/share/fonts/truetype/FiraCode-Light.ttf"(s)

I tested it with the kitty terminal and it is ok. I noted that the Retina font is gone.

@tonsky
Copy link
Owner

tonsky commented Oct 8, 2020

@lkuty thank you!

@salim-b
Copy link

salim-b commented Oct 9, 2020

@lkuty @salim-b can you please check that this build works for you? Thanks!

Works fine, thanks!

Before (v5.2):

$ fc-list -v "Fira Code" | grep spacing
	spacing: 90(i)(s)
	spacing: 90(i)(s)
	spacing: 90(i)(s)
	spacing: 90(i)(s)
	spacing: 90(i)(s)
	spacing: 90(i)(s)

After (v6; no Retina version included):

$ fc-list -v "Fira Code" | grep spacing
	spacing: 100(i)(s)
	spacing: 100(i)(s)
	spacing: 100(i)(s)
	spacing: 100(i)(s)
	spacing: 100(i)(s)

Now RStudio recognizes FiraCode as a possible editor font out of the box, i.e. no hackish workaround needed anymore. 🙏

@tonsky
Copy link
Owner

tonsky commented Oct 9, 2020

Thank you, that’s great to hear! Maybe we are getting somewhere after all :)

@zoickx
Copy link

zoickx commented Oct 27, 2020

(...) @zoickx or anyone with the double-width issue, can you please test this build for me? Thanks!

Fira_Code_v6.zip

Looks good to me. No double-width.

(+ just mirroring the command others have posted:

$ fc-list -v "Fira Code" | grep spacing
        spacing: 100(i)(s)

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants