summaryrefslogtreecommitdiffstats
path: root/libass/ass_font.h
Commit message (Collapse)AuthorAgeFilesLines
* Use streamed access for memory fontsGrigori Goronzy2015-07-101-4/+4
| | | | | This is faster in many cases, and more suitable for Windows' GetFontData function.
* Memory font supportGrigori Goronzy2015-07-101-0/+6
| | | | | Allow memory fonts with the get_face_data callback. This feature is used for embedded fonts, but can be used by any font provider.
* Add glyph coverage map for embedded fontsGrigori Goronzy2015-07-101-0/+1
| | | | | | Introduce a simple glyph coverage map (created when the font is added) and use it for checking glyph coverage in font selection. This uses a simple linear search at the moment.
* Never add a face twice to an ASS_FontGrigori Goronzy2015-07-101-8/+9
| | | | | | Introduce a unique ID per font face and check it in add_face to make sure we never add a font face twice. This is useful in case the glyph coverage report is unreliable.
* Custom font matching and font sourcesGrigori Goronzy2015-07-101-5/+5
| | | | | | | Implement a simple font sorter (FontSelector) and an interface to deal with multiple font sources (FontProvider). Unfinished business, but works for the most part. Currently the only implemented FontProvider uses fontconfig.
* Replace FT_Outline with ASS_OutlineDr.Smile2014-11-231-3/+9
|
* Added ass_font_index_magic to fix char indexes in weird encodings11rcombs2013-12-061-0/+1
|
* harfbuzz: fix vertical advanceGrigori Goronzy2011-08-251-0/+2
| | | | | Make sure to use vertical advance under the right conditions - vertical font selected, requested glyph is non-latin.
* shaper: fix run-specific font sizeGrigori Goronzy2011-07-161-0/+1
| | | | | Make sure to set the font size for every run, as needed, to get metrics (advance/offset) for the right size.
* Cache HarfBuzz fontsGrigori Goronzy2011-07-151-0/+3
| | | | | | Add a new opaque data structure to store shaper-specific font data in an ASS_Font. At the moment, this is used for caching HarfBuzz fonts, to reduce allocation and font initialization overhead.
* Separate glyph font face matching and glyph loadingGrigori Goronzy2011-07-111-1/+4
| | | | | | | | | | | Split up ass_font_get_glyph into two functions: one function matches checks the fonts for support of the requested codepoint and returns a face_index and glyph_index to later load the glyph, with a second function. This approach is very useful for shaping, which needs to be done on runs with the same font face and font size and changes the glyph_index.
* Convert outline processing and caching from glyphs to bare outlinesGrigori Goronzy2011-06-201-0/+4
| | | | | | | | | This introduces functions to use and copy pointered outline objects easily and uses these instead of glyphs everywhere. Previously the glyph cache was abused for caching vector clipping masks, but this isn't possible anymore (nor desirable), thus vector clipping cache has been disabled for the moment.
* Stroker: process outlines directlyGrigori Goronzy2011-06-131-1/+1
|
* Much improved cache/hashmap implementationGrigori Goronzy2011-06-071-2/+3
| | | | | | | | - less code, cleaner - decoupled from ASS_Library - better data encapsulation - simpler interface - avoids a nasty hack
* Relicense to ISCGrigori Goronzy2010-09-281-12/+10
| | | | | | In hope to make libass as useful as possible, relicense libass to ISC, a simplified 2-clause BSD license. All contributors who provided non-trivial changes have granted their permission for this.
* Add fixups for various font defectsGrigori Goronzy2010-06-261-0/+1
| | | | | | | | Reverse "outside" contours with wrong winding correction, require that a contour is "inside" for considering its removal; Move this hack into ass_font.c, where it belongs. Initial patch by uau.
* Basic @font supportGrigori Goronzy2010-04-111-0/+1
| | | | | | Do not skip '@' at the start of a font name in styles; detect '@' at font name start and set a new attribute in ASS_Font accordingly. Rotate affected glyphs after loading and calculate a suitable advance.
* Rename typedefs (breaks API)Grigori Goronzy2009-08-061-14/+14
| | | | | | Rename all typedefs from the convention foo_bar_t, which can possibly conflict with POSIX types, to FooBar (and ASS_FooBar for public API typedefs). Fix formatting and stray comments while at it.
* Clean up typedefs/structsGrigori Goronzy2009-07-281-2/+2
| | | | | Remove useless _s suffix from struct names and remove struct name where not needed (only the typedef'd struct is used). Clean up API headers.
* Remove shift vector in ass_render_eventGrigori Goronzy2009-07-251-1/+1
| | | | | | | The shift is not calculated when fetching a glyph anymore. Instead, it is calculated right before rasterizing a glyph. Remove the shift vector and make get_outline_glyph, the glyph cache and ass_font_set_transform work without supplying a shift vector.
* Support for underline and strikethroughGrigori Goronzy2009-07-071-3/+5
| | | | | | | | | | | | | | | | | Add support for the underline (\u) and strikethrough/strikeout (\s) properties. This is a bit tricky, since FreeType doesn't offer any method of adding the lines, so you have to draw them yourself. libass uses various information from TrueType tables to get position and size of the lines, does a few simple consistency checks (some fonts might be broken) and if everything is alright, adds new contours for the lines. Sometimes, rendering errors can occur: - Currently, kerning isn't taken into account, which means the lines can overlap a little, leading to small optical glitches. - Some (broken) fonts use the wrong winding direction. In this case, the FreeType stroker will only consider the added lines to be "outside" and only stroke the line instead of the whole glyph.
* Reindent all source code.greg2009-06-201-22/+25
| | | | | | | | | | | | | | | Reindent complete source code (*.c, *.h) with indent, the exact command line being: indent -kr -i4 -bap -nut -l76 *.c *.h From now on, new code should use (more or less) K&R style, only spaces and no tabs, 4 spaces indent width. Avoid long lines. Fix function declaration pointer spacing. Remove spaces that were added to many function declarations by indent, like some_func(foo_t * bar). Fix indenting of macros in ass.c
* Remove cache globals; move cache data into a separate cache_store structgreg2009-06-191-1/+2
| | | | that is part of ass_renderer.
* Treat -font/-subfont as Fontconfig pattern in libass.eugeni2009-03-081-0/+1
| | | | | | Patch by Adrian Stutz (adrian sttz ch). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28895 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
* Add missing header #includes to fix 'make checkheaders'.diego2008-03-051-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26170 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently give all libass multiple inclusion guards a LIBASS_ prefix.diego2008-01-291-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25927 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out common code from ass_font_new and ass_font_reselect.eugeni2007-08-031-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24001 b3059339-0415-0410-9bf9-f77b7e298cf2
* More simple and correct font reselection.eugeni2007-08-031-7/+0
| | | | | | | | | 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
* Do not use leading underscores in multiple inclusion guards, they are reserved.diego2007-07-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support fractional font sizes.eugeni2007-05-141-2/+2
| | | | 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-2/+2
| | | | | | | | 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
* Add -ass-hinting option for setting font hinting method.eugeni2007-04-271-1/+1
| | | | | | | | | 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
* Keep reselected fonts in an array, adding new ones to the end. Glypheugeni2006-12-161-1/+4
| | | | | | | | | | | | 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-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21634 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ascender, descender, and kerning computation to ass_font.c.eugeni2006-12-161-0/+2
| | | | 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/+1
| | | | | | | | | 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
* If a glyph is not found in the current font, switch to another one.eugeni2006-11-281-0/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21367 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
* Don't include freetype headers in other headers.eugeni2006-11-271-5/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21339 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ass_font_desc_t and ass_font_t declarations to ass_font.h.eugeni2006-11-271-2/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21337 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ass_font_t allocation to ass_font.h.eugeni2006-11-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21333 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move fonts-related code to a separate file.eugeni2006-11-261-0/+38
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21293 b3059339-0415-0410-9bf9-f77b7e298cf2