summaryrefslogtreecommitdiffstats
path: root/libass/ass_font.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove internal libass treeUoti Urpala2009-07-261-371/+0
| | | | | Remove the libass/ directory and use the newest standalone version of the library instead.
* Add a missing check for a NULL return value.eugeni2009-06-161-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29367 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Treat -font/-subfont as Fontconfig pattern in libass.eugeni2009-03-081-1/+2
| | | | | | Patch by Adrian Stutz (adrian sttz ch). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28895 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename font-related preprocessor directives.diego2008-08-071-1/+1
| | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
* Speak of libass instead of MPlayer in the libass license headers.diego2008-05-141-4/+4
| | | | | | | | 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
* Use standard license header.diego2008-05-131-16/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not try to guess font metrics based on its bounding box.eugeni2008-01-121-8/+2
| | | | | | | | | 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
* Cosmetics: fix indentation after last commit.eugeni2007-10-251-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24856 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check return value of add_face.eugeni2007-10-251-0/+2
| | | | | | | | | 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
* Don't apply windows-like font scaling if hhea or os2 tables contain invalideugeni2007-08-031-2/+6
| | | | | | | metrics. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24003 b3059339-0415-0410-9bf9-f77b7e298cf2
* Workaround for fonts with zero ascender/descender in horizontal header.eugeni2007-08-031-0/+20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24002 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out common code from ass_font_new and ass_font_reselect.eugeni2007-08-031-58/+46
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24001 b3059339-0415-0410-9bf9-f77b7e298cf2
* More simple and correct font reselection.eugeni2007-08-031-11/+3
| | | | | | | | | 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
* Fix #if condition.eugeni2007-05-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23358 b3059339-0415-0410-9bf9-f77b7e298cf2
* FT_Request_Size does not exist in FreeType 2.1.*. Fallback to FT_Set_Char_Size.eugeni2007-05-201-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23357 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct font size in libass.eugeni2007-05-191-5/+26
| | | | | | | | | 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
* Support fractional font sizes.eugeni2007-05-141-6/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23318 b3059339-0415-0410-9bf9-f77b7e298cf2
* Limit ass_font_set_transform to nonrotating transformations.eugeni2007-05-141-12/+18
| | | | | | | | 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
* In ass_font_new, allocate temporary ass_font_t on stack and return the pointereugeni2007-05-031-19/+17
| | | | | | | | | | | 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
* Add -ass-hinting option for setting font hinting method.eugeni2007-04-271-2/+10
| | | | | | | | | 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
* Select the first charmap in the font, if FreeType did not autoselect any.eugeni2007-02-151-1/+11
| | | | | | | This happens, for example, with fonts only having an Apple Roman charmap. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22228 b3059339-0415-0410-9bf9-f77b7e298cf2
* Update some comments.eugeni2006-12-171-0/+31
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21646 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: fix indentation.eugeni2006-12-161-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21636 b3059339-0415-0410-9bf9-f77b7e298cf2
* Keep reselected fonts in an array, adding new ones to the end. Glypheugeni2006-12-161-26/+54
| | | | | | | | | | | | lookup prefers earlier opened fonts. This way glyph lookup is stable, which means that: - cache cleanup is never required after font reselecting; - a single unrecognized char won't change the appearance of all the others. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21635 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid storing font file path and index in ass_font_t.eugeni2006-12-161-12/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21634 b3059339-0415-0410-9bf9-f77b7e298cf2
* FT_Set_Transform is fast enough to be called once for each glyph.eugeni2006-12-161-15/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21632 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid "pointer targets differ in signedness" warnings.eugeni2006-12-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21631 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ascender, descender, and kerning computation to ass_font.c.eugeni2006-12-161-0/+32
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21630 b3059339-0415-0410-9bf9-f77b7e298cf2
* Open embedded fonts directly from memory.eugeni2006-12-031-1/+21
| | | | | | | | | 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
* Keep embedded fonts in ass_library_t and perform actual disk writeeugeni2006-12-031-0/+2
| | | | | | | | 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
* If a glyph is not found in the current font, switch to another one.eugeni2006-11-281-0/+55
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21367 b3059339-0415-0410-9bf9-f77b7e298cf2
* Skip glyphs with char code < 0x20.eugeni2006-11-281-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21366 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add FT_Library to ass_font_t.eugeni2006-11-281-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21365 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ass_font_desc_t and ass_font_t declarations to ass_font.h.eugeni2006-11-271-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21337 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: reindent.eugeni2006-11-271-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21336 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't call FT_Set_Transform/FT_Set_Pixel_Sizes if values have not changed.eugeni2006-11-271-0/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21335 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ass_font_t allocation to ass_font.h.eugeni2006-11-271-3/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21333 b3059339-0415-0410-9bf9-f77b7e298cf2
* Initialize font size with 0.eugeni2006-11-271-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21330 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove obsolete "no_more_font_messages" hack.eugeni2006-11-261-5/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21295 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move fonts-related code to a separate file.eugeni2006-11-261-0/+139
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21293 b3059339-0415-0410-9bf9-f77b7e298cf2