You are not logged in.
Hi!
Installing mplayer2-20130126-1 and testing/fontconfig-2.10.92-4 breaks special characters (seeking bar, play/pause icon, ...) in the OSD. They are replaced by squares and I get a lot of those in the console:
[ass] Glyph 0xE013 not found, selecting one more font for (OSD, 80, 0)
Installing either mplayer-35920-1 or fontconfig-2.10.2-1 (the version currently in extra) makes the OSD work as expected. This is x86_64, and any -vo I tried gives the same results. Can anyone confirm this or even guess what is going wrong?
Offline
Yep, there's bug somewhere. I'm guessing libass will need to be updated to support fontconfig-2.10.92
mplayer2 bug report (though like I said, I suspect libass is the problem, not mplayer2): http://devel.mplayer2.org/ticket/230
Edit: Do you have any files that contain ASS/SSA subtitles? I don't think I do. If you do, check if you get the same issue as here: http://code.google.com/p/libass/issues/detail?id=92
Last edited by Gusar (2013-04-13 21:22:02)
Offline
I've been trouble shooting this problem with mpv-git. This is a bug with fontconfig 2.10.92-4 -- rolling back to version 2.10.2-1 results in glyphs being properly rendered.
Offline
Nope. The font used for OSD in mplayer2 is badly mapped to appropriate Unicode array (should start somewhere at E101, while it does at E000). I've been playing with it for a while and once the symbols are mapped correctly, everything is fine.
Therefore I'm not sure if this is fontconfig's bug, or if the new version of fontconfig simply revealed the error in osd_font.pfb.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
OK, here is an easy, temporary workaround. Download mplayer2 source code, as used for the Arch package, and copy mplayer2-20130126/sub/osd_font.pfb somewhere to you /usr/share/fonts (I think it's wise to create a separate directory, say, OSD, just to remember where the creature lives and remove it when its time comes). Then do the usual:
mkfontdir /usr/share/fonts/OSD
mkfontscale /usr/share/fonts/OSD
fc-cache -f -v
Your mplayer2's OSD should work just as it did last week, till the arrival of a proper fix. At least, mine does.
Edit: Just for the record: the mapping of the font inherits characters present in the fonts you have in your system. It should use the ones from osd_font.pfb, but unfortunately it doesn't. I suspect that the fix for mplayer2 may require something like forcing the use of the array in osd_font.pfb for given symbols and ignoring those available in the external fonts. What's happening now is quite the opposite.
Last edited by bohoomil (2013-04-14 01:00:28)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Thank you all for your quick and helpful responses!
This probably affects everyone running mplayer2 and fontconfig from [testing] - at least I could just reproduce it on yet another installation.
As I wrote, downgrading fontconfig makes the problem disappear. What bohoomil suggested also makes the problem disappear. I also came up with a simpler fix: Extract the osd_font.pfb from the mplayer2 source and copy it to .mplayer/subfont.ttf (or /etc/mplayer/subfont.ttf).
Offline
Extract the osd_font.pfb from the mplayer2 source and copy it to .mplayer/subfont.ttf (or /etc/mplayer/subfont.ttf).
this not working
Last edited by sl1pkn07 (2013-04-14 22:53:50)
Offline
Just some info:
This same fontconfig upgrade broke firefox web font rendering (as well as mplayer2) for me.
I googled around (for firefox), and I found this: https://bugzilla.mozilla.org/show_bug.cgi?id=857922
Basically, this is the commit that breaks things: http://cgit.freedesktop.org/fontconfig/ … a6500e8f32
I did a git bisect, and I can confirm this exact same commit breaks both firefox and mplayer2.
It seems like an API breaking change that the programs using fontconfig will have to adapt to. Read the bugzilla discussion for details.
Last edited by SneakySnake (2013-04-14 16:27:44)
Offline
It seems like an API breaking change that the programs using fontconfig will have to adapt to.
Not necessarily. From here:
that said I'm working on supporting such case in fontconfig now.
Patch is here: http://pkgs.fedoraproject.org/cgit/font … 81ec2276de
I haven't tested yet if it fixes only Firefox or mplayer2 too. I'll re-compile fontconfig with the patch later today.
Edit: Silly me, the patch is already applied in Arch's fontconfig-2.10.92-4. And it does not fix mplayer2. bohoomil's suggestion works for the OSD, but fonts embedded in MKVs are highly likely still broken. So libass will indeed need to adapt to the new fontconfig.
Last edited by Gusar (2013-04-14 17:56:33)
Offline
bohoomil's suggestion works for the OSD, but fonts embedded in MKVs are highly likely still broken. So libass will indeed need to adapt to the new fontconfig.
for me bohoomil's method not work, how you made make it work?
Last edited by sl1pkn07 (2013-04-14 22:52:31)
Offline
fonts embedded in MKVs are highly likely still broken.
I've just checked a Matroska file with embedded subs and it seems to be working just fine. If possible, could anyone check how it works for you?
for me bohoomil's method not work, how you made make it work?
Did you issue the commands as root?
Last edited by bohoomil (2013-04-14 20:00:20)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
I've just checked a Matroska file with embedded subs and it seems to be working just fine.
Not embedded subs. Embedded fonts. What I think is that the embedded font won't load (considering the same mechanism is used to load them as for the OSD), but fontconfig will find a substitute and display the subs with one of the system fonts.
Edit: Hmm, the libass dev considers the issue resolved: http://code.google.com/p/libass/issues/detail?id=92#c2. I'm recompiling mplayer right now to see if it'll help, this will take a while (damn those crappy Atom CPUs ).
Edit2: Nope, didn't help. And I get this playing a MKV with embedded subs (no embedded fonts, just srt subs):
[ass] FcFreeTypeQueryFace failed
Last edited by Gusar (2013-04-14 20:45:54)
Offline
yes.
sudo mkdir /usr/share/fonts/OSD
sudo makefont /usr/share/fonts/OSD
sudo mkfontscale /usr/share/fonts/OSD
sudo cp /home/sl1pkn07/aplicaciones/mplayer2-build-git/src/mplayer2-build/mplayer/sub/osd_font.pfb /usr/share/fonts/osd_font.pfb
sudo fc-cache -f -v
no?
with
sudo cp /home/sl1pkn07/aplicaciones/mplayer2-build-git/src/mplayer2-build/mplayer/sub/osd_font.pfb /usr/share/fonts/OSD/osd_font.pfb
sudo fc-cache -f -v
same result
Last edited by sl1pkn07 (2013-04-14 22:52:03)
Offline
bohoomil wrote:I've just checked a Matroska file with embedded subs and it seems to be working just fine.
Not embedded subs. Embedded fonts. What I think is that the embedded font won't load (considering the same mechanism is used to load them as for the OSD), but fontconfig will find a substitute and display the subs with one of the system fonts.
Right: embedded subtitles & fonts, of course. I tested just this sort of configuration. Sorry for not stating that clear.
Edit: I can provide screenshots if they can help in any way.
Last edited by bohoomil (2013-04-14 21:12:49)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Does the OSD work for you without the workaround of copying the font into /usr/share/fonts? If embedded fonts work for you, the OSD should too. And do you get any [ass] messages in mplayer's output, like the one I mention above?
Offline
No, the OSD doesn't work without the workaround. The [ass] messages are different for OSD and subs, too: without the workaround, the OSD messages were exactly like the one mentioned by the OP (the whole range of numbers passed through the screen depending on an activated function), while for subs I get
[ass] PlayResX undefined, setting to 384
However, both embedded and srt subtitles still are displayed correctly. The srt ones are rendered as well as any other TTF/OTF/T1 font in my system.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
shit. yes. working ><
fail to make install link in pkgbuild
Offline
little question: howto undo "makefont /usr/share/fonts/OSD" and "mkfontscale /usr/share/fonts/OSD"? only remove these directories works? no keep these entries when execute fc-cache -f -v?
Offline
little question: howto undo "makefont /usr/share/fonts/OSD" and "mkfontscale /usr/share/fonts/OSD"? only remove these directories works? no keep these entries when execute fc-cache -f -v?
sudo rm -r /usr/share/fonts/OSD
sudo fc-cache -f -v
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
ok, only remover dir...
thanks
Offline
Extract the osd_font.pfb from the mplayer2 source and copy it to .mplayer/subfont.ttf (or /etc/mplayer/subfont.ttf).
This worked for me and its less intrusive. Thanks
Last edited by gordoleon (2013-04-22 20:41:04)
Offline
https://github.com/kax4/mpv/raw/master/sub/osd_font.pfb
direct download of the pfb file
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
https://github.com/kax4/mpv/raw/master/sub/osd_font.pfb
direct download of the pfb file
then
mv osd_font.pfb ~/.mplayer/subfont.ttf
worked for me too.
Thank you, guys!
Offline
Rasi wrote:https://github.com/kax4/mpv/raw/master/sub/osd_font.pfb
direct download of the pfb file
then
mv osd_font.pfb ~/.mplayer/subfont.ttf
worked for me too.
Thank you, guys!
Are you talking about subtitles or the osd? I don't have subtitels to test, but the osd is still broken. This is what the output looks like:
[ass] FcFreeTypeQueryFace failed
Offline
It's most definitely related to this bug: https://bugzil.la/857922
(And fwiw, it is not fixed in fontconfig-git, webfonts are, not mpv/mplayer/libass)
So here's a bit of an update. The offending line in libass which produces "[ass] FcFreeTypeQueryFace failed" is located in `libass/libass/ass_fontconfig.c:384'
const char *name = library->fontdata[idx].name;
…
pattern =
FcFreeTypeQueryFace(face, (unsigned char *) name, face_index,
FcConfigGetBlanks(priv->config));
if (!pattern) {
ass_msg(library, MSGL_WARN, "%s failed", "FcFreeTypeQueryFace");
FT_Done_Face(face);
return;
}
The "(unsigned char *) name" looks like the culprit when reading the official documentation: http://www.freedesktop.org/software/fon … yface.html
FcPattern * FcFreeTypeQueryFace(const FT_Face face, const FcChar8 *file, int id, FcBlanks *blanks);
But beyond that I have no idea how to fix anything.
Last edited by Earnestly (2013-04-24 13:02:10)
Offline