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

Doesn't work under Windows properly #3

Closed
flocc opened this issue Dec 30, 2017 · 42 comments
Closed

Doesn't work under Windows properly #3

flocc opened this issue Dec 30, 2017 · 42 comments

Comments

@flocc
Copy link

flocc commented Dec 30, 2017

Two PCs (Win8, Win10), same results:

  • works in Notepad
  • doesn't work in gVim, cmd, bash

Windows doesn't recognize this font as mono spaced.
Help. I love the changes!

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Might be worth checking: belluzj/fantasque-sans#4

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

I haven't had any problem with it on Xubuntu Linux, but I'm starting a new job working on Windows on Monday, so I definitely want to get this resolved. I have an idea of how I might fix it, but while I'm working on that, it would be great if you could install Liberation Mono (https://www.fontsquirrel.com/fonts/liberation-mono) and see if it has the same problem.

I'll post here again once I've pushed a new version.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Liberation Mono is the reason I found Epiphyte and yes - it works good on both machines (terminal, bash, gvim)

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

OK, that's good to hear, thanks.

I just pushed an update, which should hopefully take care of the problem. I don't want to create a new release until we know it's fixed, but if you clone the repository, or just download it as a Zip, you can find the updated TTFs in the fonts/ directory. Let me know how it works after updating.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Just for the record: my change was to adjust the "spacing classes" in the BirdFont files, and then re-export. I used the letter A, which I did not modify, as a baseline, and set it so that all of the characters I modified will have the same width as the letter A.

If it doesn't work, I think I'll try the FontForge method mentioned in this thread, which was linked from the issue @flocc mentioned.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Still, doesn't work.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

OK, I'm trying the FontForge solution now.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Alright, I just pushed another new version. Let me know how it works.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Doesn't work. I installed FontForge myself too. I will report back if i find anything that makes it work. I will try to copy all the values from Liberation Mono.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Hmm, I'm not sure what the problem is, then, but I'll do some more research to see if I can figure it out.

One thing is, after marking the fonts as monospaced via FontForge, I ran them back through BirdFont again, because I was hoping to get *.bf files that would properly generate the TTFs. Perhaps that's not possible, though. I'll try marking them via FontForge and then not running them through BirdFont. I'll let you know once I've pushed those files.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

OK, I don't know if this will work, but I just pushed again.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Ok. Those are great changes to Liberation Mono. I hope you will resolve this. I will try to do some research too. Will try this: https://stackoverflow.com/questions/10344115/what-makes-a-font-invalid-for-use-in-gvim

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Last push doesn't work too.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

In FontForge try validating Liberation Mono first and then Epiphyte. There are some errors. I hope you will find what causes this. I can test all builds - no worries. :)

@flocc
Copy link
Author

flocc commented Dec 30, 2017

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

OK, thanks for all your help. I will let you know when I have something new to try.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

I tried what the second respondent to that StackOverflow question suggested, and I just pushed the resulting files. It seems that BirdFont automatically changed the width of a bunch of glyphs to zero, which would make sense for a proportional font, but not a monospaced one. I'd appreciate if you could try out the latest files and see if they work.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

It doesn't work. Sorry

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Thanks for trying.

When I regenerate Liberation Mono with FontForge, I get two warnings, whereas when I regenerate Epiphyte Mono, I get a very long list of warnings, mainly on characters I didn't even change. That makes me think BirdFont has changed some things behind the scenes, which might make it difficult to fix. I'll keep looking, though.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

I just tried to open original Liberation Mono with FontForge and just generate ttf without changing anything. It doesn't work in gvim/bash/cmd but only with notepad. It might be some option during generation...

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Ah, so perhaps we haven't found it yet... Windows seems to be very picky about what it requires to consider a font monospaced. It occurred to me that it may be a combination of things, so I pushed TTFs that have been both marked as monospace and which have all glyphs the same width. If you could try them and see if they work, that would be great.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Doesn't work.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

OK, I'm going to try this script next.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

I ran it on the fonts, maybe that will do it?

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Still doesn't work. I will search for other software to experiment. :)

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

I tried changing the values in the hhea and hmtx tables described here, using an alteration of the script I linked above, but that just messed up the way it looks on my computer. The search continues...

@flocc
Copy link
Author

flocc commented Dec 30, 2017

It's working! I restarted windows... but it's strange, i could remove/replace all the other fonts on the fly...

@flocc
Copy link
Author

flocc commented Dec 30, 2017

But let me download your last commit so i can confirm.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Oh, weird... it sounds like it somehow got cached or something.

Alright, let me know how it goes.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

It works with gvim, bash, cmd under Windows! But something is wrong with clarity of the font. Compare yourself with your older release or with Liberation Mono. I can do some screenshots if its not visible on your xubuntu.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

I'm glad it's being recognized as monospaced now, but the lack of clarity is worrisome. I'm not seeing any difference here, so I would appreciate if you could send some screenshots. Font rendering can be quite different sometimes between OSes.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Yes, i love ubuntu font rendering. https://imgur.com/a/Pa7bl Liberation Mono vs Epiphyte Mono

@flocc
Copy link
Author

flocc commented Dec 30, 2017

I used to use MacType for Windows, but still you can't get that nice linux font rendering. The screenshot i gave you is default ClearType on Windows, right one (last release) is a little bit blurry

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

I'm trying to figure out how to fix this, and I am getting a lot of articles about adjusting Cleartype, which obviously isn't the problem, seeing as Liberation Mono still looks right. This article suggests GDIPP as an alternative to ClearType or MacType, but it's still not really a solution.

Just to make sure, you said earlier version of Epiphyte Mono were as clear as Liberation Mono, right?

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Almost positive... but let me download your older release and compare it in Notepad and post screenshot if not :)

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

Thanks. There's a program called ttfautohint that, as the name suggests, is meant to take care of this automatically, so I'll try it out and push the resulting files for you to try as well.

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

OK, I have the auto-hinted TTFs up now, so it would be great if you could try them, too, when you get a chance.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Current vs Liberation Mono on Windows https://imgur.com/a/2TnGI

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

It's not the same hinting as Liberation Mono has, but in the screenshot, at least, it seems very clear.

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Yes it looks good now. I don't know how it works but can you get hint value from Liberation Mono and your last release and set hint to something between them? :)

@flocc
Copy link
Author

flocc commented Dec 30, 2017

Ok i have to go to sleep (Central Europe). I'm glad it's working on Windows now. Good work!

@jdw1996
Copy link
Owner

jdw1996 commented Dec 30, 2017

What I did to get the better-hinted version was simply call:

$ ttfautohint unhinted-font.ttf hinted-font.ttf

There are some additional options you can use with ttfautohint, but none of them seem to me to control the difference I see in your screenshot. If you're interested in having a look, the documentation is here. I'm going to close the issue for now, though.

Thanks for all of your help and encouragement. Have a good night, and a happy new year!

@jdw1996 jdw1996 closed this as completed Dec 30, 2017
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

2 participants