src/autofit/afloader.h


Log

Author Commit Date CI Message
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg 37412ff9 2016-01-12T21:37:13 Don't use macro names that contain `__' [1/2]. Such macro names are reserved for both C and C++. */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Nikolaus Waxweiler bf2ba9e3 2015-11-02T13:12:34 [autofit] Implement darkening computation function. This is a crude adaption of the original `cf2_computeDarkening' function. * src/autofit/afloader.c (af_intToFixed, af_fixedToInt, af_floatToFixed): New macros, taken from `cf2fixed.h'. (af_loader_compute_darkening): New function. * src/autofit/afloader.h: Updated.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Behdad Esfahbod c2733656 2015-01-14T19:16:12 [autofit] Allocate hints object on the stack. This avoids one malloc per load. * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to `AF_GlyphHints'. Update prototype. * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' parameter instead of `FT_Memory'. (af_loader_done): Directly reset `load_hints'. (af_loader_load_g): Updated. * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local `hints' object.
Behdad Esfahbod a4117fbd 2015-01-14T19:07:54 [autofit] Reuse slot glyph loader. No need to create a new glyph loader; we can reuse the one from `slot->internal->loader'. It's hard to tell why it was written that way originally, but new code looks sound and correct to me, and avoids lots of allocations. * src/autofit/afloader.c (af_loader_init): Change return type to `void'. Don't call `FT_GlyphLoader_New'. (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. (af_loader_load_g): Update code to use `internal->loader', which doesn't need copying of data. * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. Update prototype. * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
Behdad Esfahbod 89bc8d4d 2015-01-14T16:01:19 [autofit] Allocate AF_Loader on the stack instead of AF_Module. Stop sharing a global `AF_Loader'. Allocate one on the stack during glyph load. Right now this results in about 25% slowdown, to be fixed in a following commit. With this patch loading glyphs from different faces from different threads doesn't immediately crash in the autohinting loader code. Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1164941 * src/autofit/afloader.c (af_loader_init): Pass `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. (af_loader_reset, af_loader_load_glyph): Also pass `loader' as argument. (af_loader_done): Use `AF_Loader' instead of `AF_Module' as argument. * src/autofit/afmodule.c (af_autofitter_init): Don't call `af_loader_init'. (af_autofitter_done): Don't call `af_loader_done'. (af_autofitter_load_glyph): Use a local `AF_Loader' object. * src/autofit/afloader.h: Include `afmodule.h'. Update prototypes. Move typedef for `AF_Module' to... * src/autofit/afmodule.h: ... this place. No longer include `afloader.h'.
Werner Lemberg 3f91cb33 2013-12-18T12:59:35 [autofit] s/ScriptMetrics/StyleMetrics/.
Werner Lemberg 95dae1c4 2012-09-14T12:26:57 [autofit] Pass `AF_Module' instead of `AF_Loader'. We want to access the (not yet existing) module's global data later on. * src/autofit/afloader.c: Include `afmodule.h'. (af_loader_init, af_loader_reset, af_loader_done, af_loader_load_glyph): Change accordingly. * src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'. Updated. * src/autofit/afmodule.h: Include `afloader.h'. (AF_ModuleRec): Define here. * src/autofit/afloader.h (AF_Module): Define here. Updated.
Werner Lemberg 44481daf 2012-09-11T19:45:36 [autofitter] Add some comments.
Werner Lemberg e343e87d 2012-02-07T09:40:11 [autofit] Harmonize function arguments. * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for `load_flags'.
Werner Lemberg 90f0487f 2011-03-28T15:41:49 Cosmetics.
Werner Lemberg f13516c8 2005-03-03T17:09:08 Various fixes for C and C++ compiling. * src/autofit/*: Add copyright messages. Formatting. * src/autofit/afhints.c (af_glyph_hints_done): Don't use `AF_Dimension' but `int' for loop counter. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use `AF_Dimension' but `int' for loop counter. Use proper enumeration value for `render_mode'. (af_latin_metrics_scale_dim): Don't shadow variables. (af_latin_hints_compute_segments): Use proper cast for `major_dir' and `segment_dir'. (af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to `af_latin_compute_stem_width'. (af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop counter. * src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use proper cast for memory allocation. * src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for initialization of `sfnt'. * src/sfnt/sfdriver.c: Include `ttkern.h'. * src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables. * src/truetype/ttgload.c: Include `ttpload.h'. * src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]: Remove redundant variable.
Werner Lemberg 8bb07e63 2004-03-27T08:43:17 Add vertical phantom points. * include/freetype/internal/tttypes.h (TT_LoaderRec): Add `top_bearing', `vadvance', `pp3, and `pp4'. * src/autofit/afloader.c (af_loader_load_g): Handle two more points. * src/autohint/ahhint.c (ah_hinter_load): Handle two more points. * src/truetype/ttgload.c (Get_VMetrics): New function. (TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more points. (load_truetype_glyph): Use Get_VMetrics. Handle two more points. (compute_glyph_metrics): Thanks to vertical phantom points we now can always compute `advance_height' and `top_bearing'. * src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom points. * src/autohint/ahglyph.c (ah_outline_load): Fix allocation of `news'. Converting some files to Unix end-of-line convention.
Werner Lemberg 6b3d00e1 2004-02-03T21:34:29 * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands outside of /Subrs or /CharStrings. This can happen if there is additional code manipulating those two arrays so that FreeType doesn't recognize them properly. (T1_Open_Face): Improve an error message. Remove CR/LF on many files.
David Turner f546bacd 2004-02-01T16:59:06 * src/sfnt/Jamfile: removing "ttcmap" from the list of sources * src/cache/*, include/freetype/cache/*: fixing a bug after heavy testing. The current sources are now "release candidates" for the final version of the cache sub-system * Jamfile: updating "refdoc" target, and adding "autohint" to the list of modules to build. Both the autohinter and autofitter will be built by default. But which one will be used is determined by the content of "ftmodule.h" * src/autofit/*: much updates, but the code is still buggy as hell. Aargh..
David Turner 8ccb4552 2004-01-16T09:51:00 updates