reimar
c1c59ce8cd
Consistently use NULL for pointers instead of 0.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27876 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-11-02 11:48:20 +00:00
reimar
1ae7149c08
Fallback to non-fontconfig behaviour when fontconfig initialization fails.
...
Also fixes a memleak in that case, bug #1313 .
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27875 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-11-02 09:57:22 +00:00
diego
091d352d06
Rename font-related preprocessor directives.
...
Switch them from a HAVE_ to a CONFIG_ prefix.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 10:36:07 +00:00
eugeni
88a0442765
Check if the font set returned from FcFontSort in not NULL.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27128 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-23 14:46:55 +00:00
eugeni
a2bd32e4de
Reindent.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27127 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-23 14:46:52 +00:00
eugeni
839c865ad8
Only use application font dir if library->fonts_dir is not NULL.
...
This can be the case if ass_set_fonts_dir() call is omitted, results in
segfault. Never happens in the current MPlayer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27126 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-23 14:46:50 +00:00
eugeni
c134dd4c8d
Cosmetics: reindent after the last commit.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26857 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-22 22:52:58 +00:00
eugeni
72170ac108
Read all faces of a memory font, not just the first one.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26856 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-22 22:52:57 +00:00
eugeni
6ead8919a9
Fix compilation with FontConfig <= 2.2.96.
...
It lacks FcPatternRemove function. The code will work fine, but produce an
incorrect "Selected font is not the requested one" warning in rare cases.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26851 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-22 08:58:06 +00:00
diego
ce01f2052c
Speak of libass instead of MPlayer in the libass license headers.
...
We already use LIBASS_ prefixes for the multiple inclusion guards.
Thus libass can be considered separate enough to warrant this.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26770 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-14 17:21:58 +00:00
diego
256060a3ae
Use standard license header.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-13 08:02:23 +00:00
eugeni
8a5ba8d99c
When building font pattern, treat both ' ' and '-' as word separators.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26742 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-11 20:17:21 +00:00
eugeni
38836c7837
Fix possible free of unallocated memory.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26741 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-11 19:49:57 +00:00
eugeni
2c9139be84
Define FC_FULLNAME and FC_EMBOLDEN to fix compilation with ancient fontconfig.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26692 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-08 13:54:00 +00:00
eugeni
263c691380
If both full name and family are available, use the former in inexact match warning.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26691 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-08 13:53:58 +00:00
eugeni
4805407960
Remove extra family names from the search pattern after FcFontSort and
...
call FcFontRenderPrepare to select the best family name for the font in case
there are several of them.
This does not affect font matching results, but helps to avoid warning about
inexact match.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26690 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-08 13:53:56 +00:00
ulion
fbf6dafd00
Fix the second fontconfig_init function as the declaration in the .h file.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26652 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-03 12:44:16 +00:00
eugeni
479b726386
Print more info about selected font.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26648 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-02 23:32:29 +00:00
eugeni
cbf77e3e9f
Rewrite font family check in a simpler way.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26647 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-02 23:32:28 +00:00
eugeni
9a20a76b06
Move font family check to the end of the list.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26646 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-02 23:32:26 +00:00
eugeni
97972596e8
Cosmetics: rename local variables to better reflect their contents.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26645 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-02 23:32:25 +00:00
eugeni
19c9e0aceb
Only warn if both font family and it's full name are different from requested.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26624 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-01 00:34:29 +00:00
eugeni
54d3bcce0b
Allow inexact font family matching.
...
In SSA/ASS fonts are sometimes referenced by their "full name",
which is usually a concatenation of family name and font
style (ex. Ottawa Bold). Full name is available from
FontConfig pattern element FC_FULLNAME, but it is never
used for font matching.
Therefore, I'm removing words from the end of the name one
by one, and adding shortened names to the pattern. It seems
that the first value (full name in this case) has
precedence in matching.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26623 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-01 00:34:26 +00:00
eugeni
f1e8cbf643
Remove libass dependency on global font_fontconfig variable.
...
A new function (ass_set_fonts_nofc) is introduced instead of an extra argument
to existing ass_set_fonts to keep binary compatibility with older versions of
the library.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26614 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-30 14:16:22 +00:00
ulion
4f4c08415c
Fix libass to support -nofontconfig.
...
For history reason, fontconfig is auto-enabled when ass is enabled,
we keep this behavior and document it clearly.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25379 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-12 10:00:34 +00:00
iive
8051b919a7
Fix compilation of ass_fontconfig.c when fontconfig is disabled.
...
Add missing parameter to the function in the #else case
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24008 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-04 10:46:14 +00:00
eugeni
10cd4a7e5a
More simple and correct font reselection.
...
Since ass_font_t contains a list of font faces, there is no need to select the
face with maximum charset coverage each time. It is enough to select any face
with the required glyph.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24000 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-03 13:43:11 +00:00
eugeni
7a3a0a3225
Move variables and a function under #ifdef FC_VERSION to avoid warnings.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23234 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-03 20:10:14 +00:00
eugeni
ef3fb052c2
Deallocate FontConfig objects.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23233 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-03 19:52:46 +00:00
eugeni
82072cfec5
Don't check if user-supplied default font path exists.
...
It is checked in FT_New_Face anyway.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22964 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-10 17:53:41 +00:00
eugeni
f2daf2d930
Add some missing includes.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22310 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-22 15:48:37 +00:00
eugeni
dd1a5a82c1
Update some comments.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21646 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-17 12:00:55 +00:00
eugeni
2875decdc4
Avoid "pointer targets differ in signedness" warnings.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21631 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-16 19:19:27 +00:00
eugeni
92256c07d1
Open embedded fonts directly from memory.
...
FontConfig 2.4.2 (released yesterday) supports scanning fonts with
FcFreeTypeQueryFace without writing them to disk. With earlier FontConfig
versions, the old mechanism is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21476 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-03 18:24:11 +00:00
eugeni
7db61d9736
Keep embedded fonts in ass_library_t and perform actual disk write
...
in fontconfig initialization. This is required for some fontconfig-related
improvements.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21474 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-03 17:59:13 +00:00
eugeni
9fdb13fd53
If a glyph is not found in the current font, switch to another one.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21367 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-28 22:50:02 +00:00
eugeni
b11cd1d856
Remove obsolete "no_more_font_messages" hack.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21295 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-26 22:53:52 +00:00
kraymer
598d5be3ad
MSGTRs for libass
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21082 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-19 22:35:17 +00:00
eugeni
8856d67d40
Collect all includes of mplayer headers in libass in a single file (mputils.h).
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21042 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-19 00:41:00 +00:00
eugeni
6fef7a200f
Introduce MSGT_ASS, use it for all libass messages.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20645 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-03 18:15:33 +00:00
reimar
b7971e6a40
Avoid crash with fontconfig 2.3.9x (as shipped with SuSE 10.1, FcDirScan is broken)
...
and warn that these are beta versions and not supported.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20111 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-08 13:01:14 +00:00
eugeni
50ca7a4f72
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20014 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-01 17:09:04 +00:00
eugeni
9cfbc0fd80
Cosmetics: fix indentation after last commit.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19908 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-19 13:07:45 +00:00
eugeni
61d45a940d
Don't call FcDirScan/FcDirSave with FontConfig >= 2.4.
...
Font cache is updated automatically in FcConfigAppFontAddDir.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19907 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-19 13:06:44 +00:00
rfelker
748d139e19
no c++ decls!
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19487 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-21 21:46:59 +00:00
eugeni
5415ba27e4
Use FontConfig cache to speedup mplayer startup.
...
Patch by Zealot <zealot0630 at gmail dot com>.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19346 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-06 17:56:01 +00:00
eugeni
feaf4bf603
Cosmetics.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19069 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-13 18:52:16 +00:00
eugeni
8e9ac90c48
Use FcPatternAdd-Type instead of FcNameParse. The latter, as it turns out, requires escaping of some characters ('-', maybe more).
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19068 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-13 18:49:06 +00:00
eugeni
6127b2c08f
Only match outline fonts.
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19006 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-10 23:55:40 +00:00
eugeni
e15ae9a600
Initial libass release (without mencoder support).
...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18942 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-07 18:26:51 +00:00