DraqueT / PolyGlot

PolyGlot is a conlang construction toolkit.
MIT License
398 stars 46 forks source link

Conlang Font showing the wrong letters #540

Closed Keniko closed 6 years ago

Keniko commented 6 years ago

UPDATE: According to official Java devs, ligatures must be enabled manually. See this documentation for guidence: https://docs.oracle.com/javase/8/docs/api/java/awt/font/TextAttribute.html#LIGATURES

ORIGINAL USER TEXT: I've made a custom font for writing on my computer, and I've tested it on Notepad with no issues, but when I put it into PolyGlot the letters become jumbled, becoming associated to the wrong corresponding letters on my keyboard.

DraqueT commented 6 years ago

Could you upload a version of the font for me to take a look at? If I can see the differences, I might be able to help there.

Also, have you set anything up in the character replacement section? That could mess up how the typing is working for you.

Keniko commented 6 years ago

I'm unsure how to upload the font as the file type isn't supported here, however I took pictures demonstrating the problem. The first is the order of the keybinds and the characters they're associated to, the second how the same order appears in the alphabetical order section (for some reason that includes overlapping letters), and the third an example of mismatched letters that I've found. Some characters are even connected to keys that aren't supposed to be used at all.

example notepad example polyglot 1 example polyglot 2

Keniko commented 6 years ago

In addition, the character replacement section has been left untouched

DraqueT commented 6 years ago

You can just email this and the language files to me at draquemail@gmail.com. I should be able to take a look at them there. ^^

scottgit commented 6 years ago

@DraqueT FYI, I just experienced the same issue. I can type my newly created font in MS Word and Notepad fine (well, Word is not recognizing my kerning, but that is not an issue here), but in PolyGlot, the characters are not correctly associated to the correct keys on the keyboard.

For conlang generation using unique alphabets, which is why I downloaded PolyGlot, this is a major issue. I have spent a few weeks now (on and off) working on my font, so I could upload it and actually begin using Polyglot for what is was designed for ... only to find that I still cannot, because I cannot type my alphabet into the program correctly.

I am on Windows 10 and built a TrueType font in FontForge.

DraqueT commented 6 years ago

@scottgit Could you please email me a copy of the pgd file? I was never able to find the underlying issue here, and any additional instances of it occurring would be very helpful to see. Thank you for taking the time to write this up and post it in the ticket!

scottgit commented 6 years ago

@DraqueT Before I email the file, let me ask two things.

First, when I originally posted having the same issue, I was at least seeing some of my characters in PolyGlot, just not encoded to the right keys. But now (after I have done some font tweaks and other outputs to correct some kerning issues), I do not see any of my characters at all, just blank boxes in PolyGlot (so I cannot tell if the keys are miscoded or not, since it is not displaying the characters at all). Is that still of help to you, or do you need a file that at least shows some characters?

Second, does PolyGlot embed the font, or will I need to email the ttf file also?

DraqueT commented 6 years ago

Polyglot embeds the font, so just sending that will be fine. I'll just do a comparison of hitting the keys in QWERTY order on both sides and see if there's difference.

Also. Do you use any special keyboard setup, or just a standard one? All of the systems I develop on are just American English style.

scottgit commented 6 years ago

@DraqueT

First, I do not use a special keyboard setup.

Second, again before we go to the step of emailing a pgd file, I've discovered two things, one of which I need help to correct to (1) see if there really still is this issue and (2) to have a correct file to email if there is.

Those two discoveries:

  1. I am having more success in getting the font to display, but what I had to do was apply the font (at which time, it did not show correctly when typing), then I had to save and exit PolyGlot, then upon reopening the file my characters were displaying. So the issue in part is that it does not automatically load/display the font correctly upon selection of it (which is why I thought it was not displaying at all correctly; I expected it to immediately work).
  2. What I need help with is forcing PolyGlot to update the font. I've saved the same font to Windows with an update, but PolyGlot does not seem to be loading that new font information into it, as it retains what was originally loaded for the font. So I cannot get the font to reload with the revisions to see if perhaps it is actually working for me. How do I delete the original font loaded into PolyGlot, and force it to reload the update?
kaivx commented 6 years ago

I just opened an issue about font problems as well. I'm having trouble with font ligatures. Some letters on my font should be switched to another when combined and this is not happening on Polyglot, so some of my language's rules are not respected and things look bad. Here are the prints:

how it should look

bn

how it is looking

poli

And btw I forgot to thank you in the other post for this amazing program (:

scottgit commented 6 years ago

@hokumi So have you had issues getting the font to update in PolyGlot (if you have updated it after having loaded it once)?

kaivx commented 6 years ago

@scottgit I haven't updated it since I uploaded it the first time, so I don't know.

DraqueT commented 6 years ago

Thanks for pointing out the update fonts issue! This is something that I hadn't noticed before, but which can occur in certain scenarios. Adding to the bug list now...

scottgit commented 6 years ago

@DraqueT Is there any work around for it? That issue has me at a stand still for using PolyGlot. At present, I'm thinking I will have to uninstall it, then reinstall it. But is there some font storage file I can "delete" related to it, so that it force reloads the fonts?

DraqueT commented 6 years ago

I'm not positive what activates it in the program itself, but I can tell you how to fix it manually.

-1 Change the extension of your language file to .zip -2 Open the file as a zip -3 Replace the file conLangFont with the font you wish to use (you'll need to change the filename of the font itself to conLangFont, and case matters) -4 Change the extension of your file back to what it was

When you open the file, the font should be changed.

scottgit commented 6 years ago

@DraqueT When I do that process, and rename back to .pgd extension, when trying to open it, it gives an error and says

Image loading error: For input string: "PGDictionary.xml"

(even though I did not do anything with that file). Thoughts?

DraqueT commented 6 years ago

@scottgit Unfortunately there is not yet a workaround for this one. An update to how Java treats ligatures is the cause, and I need to figure out how to make it either use the old system, or get the new one to respect ligatures.

DraqueT commented 6 years ago

@scottgit I have a new version of PolyGlot that addresses the problem with changing fonts. Let me know if this is still a problem for you and I can get you a beta.

scottgit commented 6 years ago

@DraqueT Yes, it is still an issue.

DraqueT commented 6 years ago

@scottgit Where is a good place for me to email you a link to the latest build? Still not ready to put it out for public consumption.

scottgit commented 6 years ago

@DraqueT Just emailed you at your contact email noted on the PolyGlot readme page.

DraqueT commented 6 years ago

@Keniko @scottgit @hokumi It looks like this is a bug in Java's 2D rendering system. I've submitted a bug to Oracle and will update here when there are replies.

DraqueT commented 6 years ago

A ticket is now open with Oracle regarding this:

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8204527

Currently working out some issues with the Java dev (sent wrong font initially X|) and trying to resolve.

scottgit commented 6 years ago

@DraqueT I noticed that the Oracle bug report states it is "resolved," so is the resolution one that is going to allow a fix of PolyGlot?

DraqueT commented 6 years ago

It should be! It seems like Java no longer enables optical ligatures by default and I will need to do that manually. I'm currently working on a class based conjugation system, which is taking a bit of time, but getting back to this is next on my plate. One of the things I want to resolve if possible before the next release since it has affected so many people.

DraqueT commented 6 years ago

EFFING EUREKA.

Ok. As a heads up, this is solved. The solution is STUPID. But it is solved. Gotta implement...

Sorry this took so long, @Keniko @scottgit @hokumi @thaumavorio !

DraqueT commented 6 years ago

Please contact if any of you would like a beta version to test with. @Keniko @scottgit @hokumi @thaumavorio

scottgit commented 6 years ago

Draque,

I'll take a beta version to test. Any other "changes" in that beta that I should be aware of?

Scott

On Thu, Jul 19, 2018 at 8:52 AM Draque Thompson notifications@github.com wrote:

Please contact if any of you would like a beta version to test with. @Keniko https://github.com/Keniko @scottgit https://github.com/scottgit @hokumi https://github.com/hokumi @thaumavorio https://github.com/thaumavorio

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DraqueT/PolyGlot/issues/540#issuecomment-406325785, or mute the thread https://github.com/notifications/unsubscribe-auth/AB8_lBwsNVJsfkb8omNa2FKDuEoN7jS9ks5uIKtTgaJpZM4SV1Vy .