okamibl / xy-vsfilter

Automatically exported from code.google.com/p/xy-vsfilter
0 stars 0 forks source link

Substituted non-unicode glyphs display as boxes in Wine #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, if you have a font which does not support unicode, vsfilter should 
substitute it to a font which does when rendering a unicode character.

Programs which *appear* to do this includes vlc, and mplayer.

Currently it places a block much like this "▯" in place of the unicode 
character. I believe fonts specify the unicode ranges it can handle, if you 
cache that it shouldn't be hard.

Original issue reported on code.google.com by GRMrGe...@gmail.com on 21 Apr 2012 at 2:20

GoogleCodeExporter commented 8 years ago
What operating system are you running? WinXP or older?

VSFilter does do font-fallback for missing glyphs, but it's handled 
automatically by the operating system via GDI. If you see a "▯" that suggests 
an operating system problem, as it basically means that GDI is unable to render 
the glyph. Common troubleshooting steps often include deleting FNTCACHE.DAT and 
letting Windows recreate it on reboot. If that doesn't work, you may have a 
font conflict, invalid/corrupt font installation, or you are just using WinXP 
or older.

WinXP has limited unicode support and is unable to fall-back to glyphs which 
are not contained in your native code-page. Win7 is much better in this regard 
and should work properly, most of the time. 

Related: "Q: I use Windows XP, why do I see boxes instead instead of Japanese 
hiragana/kanji?" under Troubleshooting Q&A on the front page.

The reason vlc and mplayer don't do this is because libass is presently unable 
to use GDI or the Windows Font Cache, and instead has to rely on fontconfig to 
handle system fonts. fontconfig needs to cache all of your operating system 
fonts each time your fonts change, and is the reason you occasionally need to 
wait a few minutes for this to occur when opening a video with mplayer. Unlike 
GDI, libass w/ fontconfig avoids operating system limitations related to 
rendering unicode and non-native codepage glyphs, with the downside of 
occasionally picking horrible fonts for missing glyphs compared to GDI.

If you believe the issue you're reporting is something different, you'll need 
to provide a sample test-case with steps to reproduce.

Original comment by cyber.sp...@gmail.com on 21 Apr 2012 at 5:12

GoogleCodeExporter commented 8 years ago
Now that you have gave me a lead on what the issue is, I have been able to 
figure it out.

I am using wine with vsfilter so the issue is with the default language in 
wine. I have fixed it by setting the environment variable "LANG=ja_JP.UTF-8" 
and now it does font substitution like it should. This may work if you do 
"LANG=en_US.UTF-8", but I haven't tested as ja_JP.UTF-8 works fine for me.

I'm glad to see that there is someone who sounds like they know what they are 
doing working on this project.

Thanks for the help,
Mr. Gecko

Original comment by GRMrGe...@gmail.com on 21 Apr 2012 at 1:55

GoogleCodeExporter commented 8 years ago

Original comment by cyber.sp...@gmail.com on 22 Apr 2012 at 12:03