[gstreamer-bugs] [Bug 575878] assrender searches entire current working directory when searching for fonts to use

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Feb 1 16:25:18 PST 2010


https://bugzilla.gnome.org/show_bug.cgi?id=575878
  GStreamer | gst-plugins-bad | git

Grigori <greg> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greg at chown.ath.cx

--- Comment #1 from Grigori <greg at chown.ath.cx> 2010-02-02 00:25:15 UTC ---
Hi, a few comments from the current libass maintainer.

The directory set by ass_set_fonts_dir is added to the fontconfig search path.
fontconfig recursively scans the directory later on. Also, embedded fonts,
either added by ass_add_font or found in the track data, are extracted to the
specified directory if an ancient (< 2.4.2) fontconfig version is used [1].
Very old versions of fontconfig weren't capable of dealing with fonts only
stored in memory.

However, nowadays this isn't relevant anymore and the only purpose of the
directory specified by ass_set_fonts_dir is to make additional fonts that are
stored in the file system somewhere available to libass.
As the directory is *recursively* scanned, simply setting this to "./", i.e.
the working directory, as assrender does at the moment, is downright harmful in
some situations. Imagine playing a file from $HOME and having fontconfig scan
your complete home directory with all subdirs and files -- this takes a long
time.

It's safe to simply not call ass_set_fonts_dir. The only side effect is that
libass will not be able to use embedded fonts if an ancient fontconfig version
is used.

No patch attached since it's trivial. :)

[1] Also, precisely because of this the documentation in ass.h states the
directory needs to be private for libass. If libass needs to extract fonts, it
will overwrite files without mercy.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list