1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:42:17 +00:00
Commit Graph

320 Commits

Author SHA1 Message Date
eugeni
026f3a4d0d The size of output buffer is stored in 'osize', not 'size'.
This is just for readability, the code behaviour is not changed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26924 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-29 18:35:22 +00:00
eugeni
db616d5222 Clear iconv conversion state also in libass.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26923 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-29 18:35:21 +00:00
eugeni
d3e1f76cac Offset should be size_t.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26922 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-29 18:35:18 +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
eugeni
bbfb156539 In case 2 styles have the same name, prefer the latest one.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26839 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-19 18:37:27 +00:00
diego
5423c418c2 cosmetics: Remove useless parentheses from return statements.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-16 09:42:28 +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
f025ffda0b Add standard license header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26757 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-13 08:34:59 +00:00
diego
1c0dcbce19 Fix one more license header wording detail for consistency.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26756 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-13 08:33:48 +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
76e851e4ee Skip '@' at the beginning of the font name.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26625 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-01 11:06:16 +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
diego
32824f5eca Merge libass/Makefile into Makefile, one less recursive make directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26356 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-08 22:25:59 +00:00
eugeni
3a1a54fab4 Case insensitive parsing of SSA/ASS section headers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26303 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-30 17:42:19 +00:00
eugeni
994b2022c3 Skip BOM at the beginning of text in ASS parser.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26302 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-30 17:42:17 +00:00
diego
d5f21cd6cb Add missing header #includes to fix 'make checkheaders'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26170 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-05 08:24:09 +00:00
eugeni
5f2b3c6c67 Comment out dump_glyph(): it is unused and, as it is now, breaks compilation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26068 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 21:24:35 +00:00
eugeni
fc6600af48 Check glyph bounding box before rasterizing and complain if it is too large.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26067 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 19:31:53 +00:00
eugeni
b803331d0c Some debugging routines.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26066 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 19:31:51 +00:00
eugeni
dd8c7c9e2c Better handling of behind-the-camera objects.
Every point that is behind the camera is moved to the clipping plane by
orthographic projection. It is obviously incorrect, but this is a very rare
case, and proper clipping of Bezier curves is not that easy.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26065 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 19:31:49 +00:00
eugeni
59f43e8231 Print FreeType version in libass init. Makes error logs slightly more helpful.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26064 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 19:31:47 +00:00
diego
a022eca50c Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25927 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-29 23:25:11 +00:00
diego
fe9ec3ffdd Consistently use uppercase filename as multiple inclusion guard.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25897 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-28 01:32:52 +00:00
eugeni
00cce8eb30 Add global ass_force_reload flag.
If it is set, renderer is reconfigured before the next frame.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25841 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-23 21:18:30 +00:00
eugeni
eb96cc741e Do not try to guess font metrics based on its bounding box.
It was originally a workaround for fonts with bad ascender/descender values,
but it breaks display of some otherwise valid fonts (bugzilla 987), so
reverted.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25688 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-12 02:27:01 +00:00
eugeni
e779ddad56 Fix ass_clear_fonts not deallocating fontdata.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25649 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-08 12:45:41 +00:00
eugeni
169e65afd9 No need to reinvent strdup...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25644 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-07 21:06:50 +00:00
eugeni
d2a07a1270 Copy font data to ass_library instead of referencing demuxer-owned memory.
This fixes segfault when fonts are accessed after demuxer has been closed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25641 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-07 14:02:06 +00:00
eugeni
518f4e003c Allow overriding [Script Info] parameters with -ass-force-style option.
Patch by Anton Khirnov, wyskas gmail com.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25610 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-05 15:38:46 +00:00
diego
fba0b66ff9 Add explanatory comments to the #endif part of multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-31 16:15:50 +00:00
diego
82ee453947 typo
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25543 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-30 03:17:04 +00:00
eugeni
e6839faa8d Improve comments for ass_process_* functions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25542 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-30 02:17:16 +00:00
eugeni
bf22a172e7 Return from ass_start_frame immediately if the track is empty.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25541 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-30 01:03:05 +00:00
ben
1abce87cbe make libass use sub_font_name whenever it's possible
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25420 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-16 11:13:24 +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
b43c16f8b6 Our enca code uses strdup() on the input encoding name, as we don't modify it we can use the original constant string.
Uses less memory, code is simpler and faster.
Fixes memory leak (noticed by ulion).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24879 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-28 14:26:05 +00:00