]> granicus.if.org Git - libass/log
libass
16 years agoReindent.
eugeni [Mon, 23 Jun 2008 14:46:52 +0000 (14:46 +0000)]
Reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27127 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoOnly use application font dir if library->fonts_dir is not NULL.
eugeni [Mon, 23 Jun 2008 14:46:50 +0000 (14:46 +0000)]
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

16 years agoThe size of output buffer is stored in 'osize', not 'size'.
eugeni [Thu, 29 May 2008 18:35:22 +0000 (18:35 +0000)]
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

16 years agoClear iconv conversion state also in libass.
eugeni [Thu, 29 May 2008 18:35:21 +0000 (18:35 +0000)]
Clear iconv conversion state also in libass.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26923 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoOffset should be size_t.
eugeni [Thu, 29 May 2008 18:35:18 +0000 (18:35 +0000)]
Offset should be size_t.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26922 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCosmetics: reindent after the last commit.
eugeni [Thu, 22 May 2008 22:52:58 +0000 (22:52 +0000)]
Cosmetics: reindent after the last commit.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26857 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRead all faces of a memory font, not just the first one.
eugeni [Thu, 22 May 2008 22:52:57 +0000 (22:52 +0000)]
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

16 years agoFix compilation with FontConfig <= 2.2.96.
eugeni [Thu, 22 May 2008 08:58:06 +0000 (08:58 +0000)]
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

16 years agoIn case 2 styles have the same name, prefer the latest one.
eugeni [Mon, 19 May 2008 18:37:27 +0000 (18:37 +0000)]
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

16 years agocosmetics: Remove useless parentheses from return statements.
diego [Fri, 16 May 2008 09:42:28 +0000 (09:42 +0000)]
cosmetics: Remove useless parentheses from return statements.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSpeak of libass instead of MPlayer in the libass license headers.
diego [Wed, 14 May 2008 17:21:58 +0000 (17:21 +0000)]
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

16 years agoAdd standard license header.
diego [Tue, 13 May 2008 08:34:59 +0000 (08:34 +0000)]
Add standard license header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26757 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix one more license header wording detail for consistency.
diego [Tue, 13 May 2008 08:33:48 +0000 (08:33 +0000)]
Fix one more license header wording detail for consistency.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26756 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoUse standard license header.
diego [Tue, 13 May 2008 08:02:23 +0000 (08:02 +0000)]
Use standard license header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoWhen building font pattern, treat both ' ' and '-' as word separators.
eugeni [Sun, 11 May 2008 20:17:21 +0000 (20:17 +0000)]
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

16 years agoFix possible free of unallocated memory.
eugeni [Sun, 11 May 2008 19:49:57 +0000 (19:49 +0000)]
Fix possible free of unallocated memory.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26741 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoDefine FC_FULLNAME and FC_EMBOLDEN to fix compilation with ancient fontconfig.
eugeni [Thu, 8 May 2008 13:54:00 +0000 (13:54 +0000)]
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

16 years agoIf both full name and family are available, use the former in inexact match warning.
eugeni [Thu, 8 May 2008 13:53:58 +0000 (13:53 +0000)]
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

16 years agoRemove extra family names from the search pattern after FcFontSort and
eugeni [Thu, 8 May 2008 13:53:56 +0000 (13:53 +0000)]
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

16 years agoFix the second fontconfig_init function as the declaration in the .h file.
ulion [Sat, 3 May 2008 12:44:16 +0000 (12:44 +0000)]
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

16 years agoPrint more info about selected font.
eugeni [Fri, 2 May 2008 23:32:29 +0000 (23:32 +0000)]
Print more info about selected font.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26648 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRewrite font family check in a simpler way.
eugeni [Fri, 2 May 2008 23:32:28 +0000 (23:32 +0000)]
Rewrite font family check in a simpler way.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26647 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoMove font family check to the end of the list.
eugeni [Fri, 2 May 2008 23:32:26 +0000 (23:32 +0000)]
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

16 years agoCosmetics: rename local variables to better reflect their contents.
eugeni [Fri, 2 May 2008 23:32:25 +0000 (23:32 +0000)]
Cosmetics: rename local variables to better reflect their contents.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26645 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSkip '@' at the beginning of the font name.
eugeni [Thu, 1 May 2008 11:06:16 +0000 (11:06 +0000)]
Skip '@' at the beginning of the font name.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26625 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoOnly warn if both font family and it's full name are different from requested.
eugeni [Thu, 1 May 2008 00:34:29 +0000 (00:34 +0000)]
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

16 years agoAllow inexact font family matching.
eugeni [Thu, 1 May 2008 00:34:26 +0000 (00:34 +0000)]
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

16 years agoRemove libass dependency on global font_fontconfig variable.
eugeni [Wed, 30 Apr 2008 14:16:22 +0000 (14:16 +0000)]
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

16 years agoMerge libass/Makefile into Makefile, one less recursive make directory.
diego [Tue, 8 Apr 2008 22:25:59 +0000 (22:25 +0000)]
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

16 years agoCase insensitive parsing of SSA/ASS section headers.
eugeni [Sun, 30 Mar 2008 17:42:19 +0000 (17:42 +0000)]
Case insensitive parsing of SSA/ASS section headers.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26303 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSkip BOM at the beginning of text in ASS parser.
eugeni [Sun, 30 Mar 2008 17:42:17 +0000 (17:42 +0000)]
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

16 years agoAdd missing header #includes to fix 'make checkheaders'.
diego [Wed, 5 Mar 2008 08:24:09 +0000 (08:24 +0000)]
Add missing header #includes to fix 'make checkheaders'.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26170 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoComment out dump_glyph(): it is unused and, as it is now, breaks compilation.
eugeni [Fri, 22 Feb 2008 21:24:35 +0000 (21:24 +0000)]
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

16 years agoCheck glyph bounding box before rasterizing and complain if it is too large.
eugeni [Fri, 22 Feb 2008 19:31:53 +0000 (19:31 +0000)]
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

16 years agoSome debugging routines.
eugeni [Fri, 22 Feb 2008 19:31:51 +0000 (19:31 +0000)]
Some debugging routines.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26066 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoBetter handling of behind-the-camera objects.
eugeni [Fri, 22 Feb 2008 19:31:49 +0000 (19:31 +0000)]
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

16 years agoPrint FreeType version in libass init. Makes error logs slightly more helpful.
eugeni [Fri, 22 Feb 2008 19:31:47 +0000 (19:31 +0000)]
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

16 years agoConsistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego [Tue, 29 Jan 2008 23:25:11 +0000 (23:25 +0000)]
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

16 years agoConsistently use uppercase filename as multiple inclusion guard.
diego [Mon, 28 Jan 2008 01:32:52 +0000 (01:32 +0000)]
Consistently use uppercase filename as multiple inclusion guard.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25897 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoAdd global ass_force_reload flag.
eugeni [Wed, 23 Jan 2008 21:18:30 +0000 (21:18 +0000)]
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

16 years agoDo not try to guess font metrics based on its bounding box.
eugeni [Sat, 12 Jan 2008 02:27:01 +0000 (02:27 +0000)]
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

16 years agoFix ass_clear_fonts not deallocating fontdata.
eugeni [Tue, 8 Jan 2008 12:45:41 +0000 (12:45 +0000)]
Fix ass_clear_fonts not deallocating fontdata.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25649 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoNo need to reinvent strdup...
eugeni [Mon, 7 Jan 2008 21:06:50 +0000 (21:06 +0000)]
No need to reinvent strdup...

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25644 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCopy font data to ass_library instead of referencing demuxer-owned memory.
eugeni [Mon, 7 Jan 2008 14:02:06 +0000 (14:02 +0000)]
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

16 years agoAllow overriding [Script Info] parameters with -ass-force-style option.
eugeni [Sat, 5 Jan 2008 15:38:46 +0000 (15:38 +0000)]
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

16 years agoAdd explanatory comments to the #endif part of multiple inclusion guards.
diego [Mon, 31 Dec 2007 16:15:50 +0000 (16:15 +0000)]
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

16 years agotypo
diego [Sun, 30 Dec 2007 03:17:04 +0000 (03:17 +0000)]
typo

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25543 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoImprove comments for ass_process_* functions.
eugeni [Sun, 30 Dec 2007 02:17:16 +0000 (02:17 +0000)]
Improve comments for ass_process_* functions.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25542 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoReturn from ass_start_frame immediately if the track is empty.
eugeni [Sun, 30 Dec 2007 01:03:05 +0000 (01:03 +0000)]
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

16 years agomake libass use sub_font_name whenever it's possible
ben [Sun, 16 Dec 2007 11:13:24 +0000 (11:13 +0000)]
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

16 years agoFix libass to support -nofontconfig.
ulion [Wed, 12 Dec 2007 10:00:34 +0000 (10:00 +0000)]
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

16 years agoOur enca code uses strdup() on the input encoding name, as we don't modify it we...
iive [Sun, 28 Oct 2007 14:26:05 +0000 (14:26 +0000)]
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

16 years agoCosmetics: fix indentation after last commit.
eugeni [Thu, 25 Oct 2007 21:20:28 +0000 (21:20 +0000)]
Cosmetics: fix indentation after last commit.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24856 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCheck return value of add_face.
eugeni [Thu, 25 Oct 2007 21:19:20 +0000 (21:19 +0000)]
Check return value of add_face.

This fixes segfault when reselecting fonts and the new font could not be
loaded (because of a bad font file, or too many font faces already loaded).
Patch by Glen Nakamura, glen at imodulo dot com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24855 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoAvoid text deformation and subtitles moving outside the screen in pan-and-scan
eugeni [Fri, 19 Oct 2007 18:16:23 +0000 (18:16 +0000)]
Avoid text deformation and subtitles moving outside the screen in pan-and-scan
mode.

For this, crop amounts are passed from vo_gl as negative margins sizes. They
are used to calculate aspect ratio. They are ignored when calculating subtitle
 positions, so subtitles will stay on screen most of the time.
Based on a patch by Jindrich Makovicka [makovick gmail com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24815 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMore precise line spacing.
eugeni [Tue, 18 Sep 2007 19:51:22 +0000 (19:51 +0000)]
More precise line spacing.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24577 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFix text height calculation. It depends on line spacing.
eugeni [Tue, 18 Sep 2007 18:41:38 +0000 (18:41 +0000)]
Fix text height calculation. It depends on line spacing.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24576 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFix an obviously incorrect comment.
eugeni [Tue, 18 Sep 2007 18:36:54 +0000 (18:36 +0000)]
Fix an obviously incorrect comment.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24575 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoEnable ass_line_spacing option.
eugeni [Tue, 18 Sep 2007 18:34:52 +0000 (18:34 +0000)]
Enable ass_line_spacing option.
Patch by Thomas Reitmayr (treitmayr devbase at).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24574 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoClean up the way get_path is handled: Compile get_path.c to an object to link
diego [Tue, 28 Aug 2007 11:20:24 +0000 (11:20 +0000)]
Clean up the way get_path is handled: Compile get_path.c to an object to link
against instead of directly #including the C file and replace the many extern
declarations by a proper header file.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFix compilation of ass_fontconfig.c when fontconfig is disabled.
iive [Sat, 4 Aug 2007 10:46:14 +0000 (10:46 +0000)]
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

17 years agoDon't apply windows-like font scaling if hhea or os2 tables contain invalid
eugeni [Fri, 3 Aug 2007 15:39:38 +0000 (15:39 +0000)]
Don't apply windows-like font scaling if hhea or os2 tables contain invalid
metrics.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24003 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoWorkaround for fonts with zero ascender/descender in horizontal header.
eugeni [Fri, 3 Aug 2007 15:22:55 +0000 (15:22 +0000)]
Workaround for fonts with zero ascender/descender in horizontal header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24002 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFactor out common code from ass_font_new and ass_font_reselect.
eugeni [Fri, 3 Aug 2007 14:10:53 +0000 (14:10 +0000)]
Factor out common code from ass_font_new and ass_font_reselect.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24001 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMore simple and correct font reselection.
eugeni [Fri, 3 Aug 2007 13:43:11 +0000 (13:43 +0000)]
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

17 years agoDo not use leading underscores in multiple inclusion guards, they are reserved.
diego [Mon, 2 Jul 2007 22:34:45 +0000 (22:34 +0000)]
Do not use leading underscores in multiple inclusion guards, they are reserved.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoConsistently use filename as multiple inclusion guard.
diego [Mon, 2 Jul 2007 21:34:39 +0000 (21:34 +0000)]
Consistently use filename as multiple inclusion guard.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23707 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoWhen parsing ass-force-style arguments, search for '=' and '.' characters with
eugeni [Fri, 15 Jun 2007 22:22:16 +0000 (22:22 +0000)]
When parsing ass-force-style arguments, search for '=' and '.' characters with
strrchr. This allows using it for styles whose name contains those characters.
Patch by Бранко Мајић <branko majic at gmail com>.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23560 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMake sure there is at least one style in ass_track when parsing events.
eugeni [Fri, 15 Jun 2007 22:15:27 +0000 (22:15 +0000)]
Make sure there is at least one style in ass_track when parsing events.
Before it was only checked for embedded subtitles.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23559 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMove code for reading a file and recoding it to utf-8 to a separate function.
eugeni [Fri, 1 Jun 2007 19:56:44 +0000 (19:56 +0000)]
Move code for reading a file and recoding it to utf-8 to a separate function.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23442 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFix #if condition.
eugeni [Sun, 20 May 2007 17:56:39 +0000 (17:56 +0000)]
Fix #if condition.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23358 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFT_Request_Size does not exist in FreeType 2.1.*. Fallback to FT_Set_Char_Size.
eugeni [Sun, 20 May 2007 17:04:12 +0000 (17:04 +0000)]
FT_Request_Size does not exist in FreeType 2.1.*. Fallback to FT_Set_Char_Size.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23357 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoCorrect font size in libass.
eugeni [Sat, 19 May 2007 14:11:41 +0000 (14:11 +0000)]
Correct font size in libass.

Values from TrueType OS/2 table are used to reproduce VSFilter behaviour.
Magic 0.8 multiplier and scaling for the fractional part of font size are not
needed anymore.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23346 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoRevert y-axis rotation. Change order of rotations.
eugeni [Fri, 18 May 2007 18:58:34 +0000 (18:58 +0000)]
Revert y-axis rotation. Change order of rotations.

Now rotations are performed in the following order: X, Y, Z. Before this, it
was the other way around. Also, in FreeType Y axis is directed upwards, so the
corresponding rotation must be reverted.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23340 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoSupport fractional font sizes.
eugeni [Mon, 14 May 2007 20:41:14 +0000 (20:41 +0000)]
Support fractional font sizes.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23318 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoLimit ass_font_set_transform to nonrotating transformations.
eugeni [Mon, 14 May 2007 20:24:53 +0000 (20:24 +0000)]
Limit ass_font_set_transform to nonrotating transformations.
Rotations are not needed here (they are performed in transform3d) and they
disable autohinter.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23317 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoDon't deallocate font data if it will be used later.
eugeni [Wed, 9 May 2007 21:38:28 +0000 (21:38 +0000)]
Don't deallocate font data if it will be used later.
It produced either segfault or "Error opening memory font" with any script
that contains embedded fonts.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23282 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMove variables and a function under #ifdef FC_VERSION to avoid warnings.
eugeni [Thu, 3 May 2007 20:10:14 +0000 (20:10 +0000)]
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

17 years agoDeallocate FontConfig objects.
eugeni [Thu, 3 May 2007 19:52:46 +0000 (19:52 +0000)]
Deallocate FontConfig objects.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23233 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFix stupid bug in r23229.
eugeni [Thu, 3 May 2007 19:47:34 +0000 (19:47 +0000)]
Fix stupid bug in r23229.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23232 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoDeallocate string.
eugeni [Thu, 3 May 2007 19:33:35 +0000 (19:33 +0000)]
Deallocate string.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23231 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoIn ass_font_new, allocate temporary ass_font_t on stack and return the pointer
eugeni [Thu, 3 May 2007 19:26:43 +0000 (19:26 +0000)]
In ass_font_new, allocate temporary ass_font_t on stack and return the pointer
to cache-owned copy. This fixes leaked ass_font_t struct.

Without this, font pointers obtained from ass_font_new() and
ass_font_cache_find() were different, and bitmaps rendered with the first one
could not be located in the cache later.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23230 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMake cache_*_add functions return the pointer to new (copied) value.
eugeni [Thu, 3 May 2007 19:13:54 +0000 (19:13 +0000)]
Make cache_*_add functions return the pointer to new (copied) value.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23229 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoAlways deallocate glyphs. Fixes memory leak.
eugeni [Wed, 2 May 2007 10:15:12 +0000 (10:15 +0000)]
Always deallocate glyphs. Fixes memory leak.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23208 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoUpdate comments.
eugeni [Tue, 1 May 2007 15:54:00 +0000 (15:54 +0000)]
Update comments.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23197 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoCosmetics.
eugeni [Tue, 1 May 2007 15:34:08 +0000 (15:34 +0000)]
Cosmetics.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23196 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMove glyph_to_bitmap() call and outline glyph deallocation to
eugeni [Tue, 1 May 2007 15:33:06 +0000 (15:33 +0000)]
Move glyph_to_bitmap() call and outline glyph deallocation to
get_bitmap_glyph().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23195 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMinor code simplification.
eugeni [Tue, 1 May 2007 15:21:34 +0000 (15:21 +0000)]
Minor code simplification.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23193 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMove get_bitmap_glyph() call to a separate loop.
eugeni [Tue, 1 May 2007 15:14:22 +0000 (15:14 +0000)]
Move get_bitmap_glyph() call to a separate loop.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23192 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMove transform_3d() call to get_bitmap_glyph().
eugeni [Tue, 1 May 2007 15:12:36 +0000 (15:12 +0000)]
Move transform_3d() call to get_bitmap_glyph().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23191 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoMake a function static.
eugeni [Tue, 1 May 2007 15:07:41 +0000 (15:07 +0000)]
Make a function static.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23190 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoDon't recalculate rotation radius.
eugeni [Tue, 1 May 2007 15:05:20 +0000 (15:05 +0000)]
Don't recalculate rotation radius.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23189 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoBugfix: glyph cache depends on border width, because it contains outline_glyph
eugeni [Tue, 1 May 2007 14:29:28 +0000 (14:29 +0000)]
Bugfix: glyph cache depends on border width, because it contains outline_glyph
(glyph border obtained with FT_Glyph_StrokeBorder) since r23043.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23188 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoAdd -ass-hinting option for setting font hinting method.
eugeni [Fri, 27 Apr 2007 14:25:36 +0000 (14:25 +0000)]
Add -ass-hinting option for setting font hinting method.
It is possible to separately configure hinting for scaled and unscaled osd.
The default is native hinter for unscaled osd (only vo_gl at this point),
no hinting for vf_ass.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23152 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoFix division by zero in "\t" parsing.
eugeni [Fri, 27 Apr 2007 14:18:44 +0000 (14:18 +0000)]
Fix division by zero in "\t" parsing.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23151 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoDo not use FT_Glyph_Copy with NULL glyphs.
eugeni [Tue, 24 Apr 2007 17:36:03 +0000 (17:36 +0000)]
Do not use FT_Glyph_Copy with NULL glyphs.
Contrary to the docs, it leaves garbage in *target.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23104 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoDeallocate glyphs in a separate loop.
eugeni [Sat, 21 Apr 2007 11:02:49 +0000 (11:02 +0000)]
Deallocate glyphs in a separate loop.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23054 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoAlways deallocate glyphs. Fixes a memory leak.
eugeni [Sat, 21 Apr 2007 10:56:28 +0000 (10:56 +0000)]
Always deallocate glyphs. Fixes a memory leak.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23053 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoReset outline glyph cache when configuration changes.
eugeni [Sat, 21 Apr 2007 10:43:19 +0000 (10:43 +0000)]
Reset outline glyph cache when configuration changes.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23052 b3059339-0415-0410-9bf9-f77b7e298cf2

17 years agoScale camera distance.
eugeni [Sat, 21 Apr 2007 10:42:10 +0000 (10:42 +0000)]
Scale camera distance.
Otherwise perspective does not look the same in fullscreen.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23051 b3059339-0415-0410-9bf9-f77b7e298cf2