jdw1996 / epiphyte-mono

Programming font based on Liberation Mono
Other
5 stars 0 forks source link

Doesn't work under Windows properly #3

Closed flocc closed 6 years ago

flocc commented 6 years ago

Two PCs (Win8, Win10), same results:

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

flocc commented 6 years ago

Might be worth checking: https://github.com/belluzj/fantasque-sans/issues/4

jdw1996 commented 6 years ago

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 commented 6 years ago

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

jdw1996 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Still, doesn't work.

jdw1996 commented 6 years ago

OK, I'm trying the FontForge solution now.

jdw1996 commented 6 years ago

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

flocc commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

flocc commented 6 years ago

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 commented 6 years ago

Last push doesn't work too.

flocc commented 6 years ago

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 commented 6 years ago

https://fontforge.github.io/validation.html https://github.com/HinTak/Font-Validator/

jdw1996 commented 6 years ago

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

jdw1996 commented 6 years ago

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 commented 6 years ago

It doesn't work. Sorry

jdw1996 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Doesn't work.

jdw1996 commented 6 years ago

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

jdw1996 commented 6 years ago

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

flocc commented 6 years ago

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

jdw1996 commented 6 years ago

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 commented 6 years ago

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

flocc commented 6 years ago

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

jdw1996 commented 6 years ago

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

Alright, let me know how it goes.

flocc commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

flocc commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

jdw1996 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

jdw1996 commented 6 years ago

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

flocc commented 6 years ago

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 commented 6 years ago

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

jdw1996 commented 6 years ago

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!