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

Gtk2 graphem problems on windows #96

Closed
ProvGANG opened this issue Mar 30, 2015 · 19 comments
Closed

Gtk2 graphem problems on windows #96

ProvGANG opened this issue Mar 30, 2015 · 19 comments

Comments

@ProvGANG
Copy link

shoes-win

shoes-linux

These are two pics that show how it works on win and linux. So the problem is on windows as it can't represent the graphems in a way that I'd want to.

@IanTrudel
Copy link
Collaborator

It might simply be the fonts used by default is not UTF8 friendly.

@ProvGANG
Copy link
Author

Tried several common fonts, it's not about it. Otherwise the same problem would've appeared on linux too.

@ccoupe
Copy link

ccoupe commented Mar 30, 2015

I suspect the font and the new fontconfig code and/or cache are confused. What is the font(s) names? Truetype? or ?

@ccoupe
Copy link

ccoupe commented Mar 31, 2015

The following script displays the proper characters in my en.us Linux and Windows using the default font for each - Arial for Windows I believe.

Shoes.app do
  stack do
    para "Display some Croatian characters\n"
    title "\u0161 \u0111 \u010d \u0107 \u017e"
    edit_line do |c|
      @p.text = c.text
    end
   @p = para ""
  end
end

On linux, I use the shift+ctl+u method of entering the 4 hex digits in the edit_line. OK. That keystroke combo also works on Windows. Perhaps the old Shoes uses a different key entry?

@ccoupe
Copy link

ccoupe commented Mar 31, 2015

Updated the test script above to add an edit_line. It works fine for me using the Linux keystrokes for unicode entry

ccoupe pushed a commit that referenced this issue Mar 31, 2015
@ProvGANG
Copy link
Author

ProvGANG commented Apr 5, 2015

Guys is there an easy way to edit last 3.2.21 version of shoes to be able to put :title to alert widget? I'm sorry for being little out of topic but last version of Shoes was okay considering such encoding problems as new Win version is having, I just want to have that update, any solutions?

@passenger94
Copy link
Contributor

if you're able to compile shoes, just copy/paste relevant methods near the end of gtk.c, should work and the most simple i think

you could also try, as an exercise in eccentricities, some awful ludicrous aerobics by copying libshoes from 3.2.22 to 3.2.21

@ccoupe
Copy link

ccoupe commented Apr 5, 2015

@ProvGANG, you could try moving the 3.2.22 libshoes.dll to 3.2.21. It probably won't work. It would be better for everyone if you could help us debug why 3.2.22 doesn't work on your system. Any future version of Shoes is going to have the same problem if we don't debug it.

Does the script above display the characters? Can you enter them and are they echoed back correctly. We need to separate display (font) and keyboard/input issues.

@ccoupe
Copy link

ccoupe commented Apr 5, 2015

Coincidence - someone just file shoes/shoes-deprecated#272 at the old shoes repo.

@ProvGANG
Copy link
Author

ProvGANG commented Apr 5, 2015

The same thing persists when running the above code, here is the comparision when running older version and 3.2.22 version. Replacing libshoes.dll worked, but I agree that we should try to get this fixed. It could be the font issue, as I declare a font on 3.2.22 version it stays the same as on default you can see on the image.

shoes

@ProvGANG
Copy link
Author

ProvGANG commented Apr 5, 2015

Also if it helps, when I run cshoes from cmd, I get this message:
Fontconfig error: Cannot load default config file

@ccoupe
Copy link

ccoupe commented Apr 6, 2015

Yes that error message does help! That is an important clue. Lets see if we can rebuild the font cache or get more messages. In your HOME APPDATA\Local should be a fontconfig folder. Delete it and from the cmd line run cshoes.exe - it should take two minutes or so without errors.

What font is set as your Windows default?

@ProvGANG
Copy link
Author

ProvGANG commented Apr 6, 2015

Alright, I've deleted fontonfig, error message is still the same when I run
cshoes.exe

2015-04-06 2:02 GMT+02:00 Cecil Coupe [email protected]:

Yes that error message does help! That is an important clue. Lets see if
we can rebuild the font cache or get more messages. In your HOME
APPDATA\Local should be a fontconfig folder. Delete it and from the cmd
line run cshoes.exe - it should take two minutes or so without errors.

What font is set as your Windows default?


Reply to this email directly or view it on GitHub
#96 (comment).

Cheers!

@ccoupe
Copy link

ccoupe commented Apr 6, 2015

What font/language settings are you using for Windows. I need to duplicate them to see if the bug happens here.

@ccoupe
Copy link

ccoupe commented Apr 6, 2015

Are you installing Shoes in the default locations c:\Program Files (x86)\Shoes ? I know its a lot of questions but I have to ask what I don't know.

@ccoupe
Copy link

ccoupe commented Apr 6, 2015

Luka, do you have both 3.2.21 and 3.2.22 installed? If so the env var may not be set properly

I need to know where your Shoes 3.2.22 is installed and what FONTCONFIG_FILE is set too.

C:\Users\Cecil>set FONTCONFIG_FILE
FONTCONFIG_FILE=C:\Program Files (x86)\Shoes\etc\fonts\fonts.conf

@ccoupe
Copy link

ccoupe commented Apr 6, 2015

Please see #106 (comment)

@ProvGANG
Copy link
Author

ProvGANG commented Apr 6, 2015

I had comma separated values in ENV variable, deleted it, changed it to FONTCONFIG_FILE=C:\Program Files (x86)\Shoes\etc\fonts\fonts.conf

And what actually the problem is that I had old version(from November 2014) of Shoes installed in different directory which I knew was there but totally forgot about it and shoes was running from there.

I'm not sure why it hasn't caused any problem prior to this release but now everything's okay.

@ccoupe
Copy link

ccoupe commented Apr 7, 2015

I'm going to close this issue since 1) the problem was fixed, 2) #106 is similar and open.

@ccoupe ccoupe closed this as completed Apr 7, 2015
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