summaryrefslogtreecommitdiff
path: root/include/freetype/internal/services/svmm.h
Commit message (Collapse)AuthorAgeFilesLines
* [build] fix for make multisuzuki toshiya2022-11-081-0/+1
| | | | | | | | Fix "make multi" by MR !223 * include/freetype/internal/services/svmm.h: include ftmm.h to define FT_Get_MM_Func. * src/truetype/ttgxvar.h: include ftmmtypes.h to use GX_AVarTable properly. * src/base/ftmac.c: include ftdebug.h to use FT_THROW() properly.
* [truetype] Perform variation store delta computation with 64-bit precision.Dominik Röttsches2022-06-291-1/+1
| | | | | | | | | | | | * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Make type explicitly 32-bit. * include/freetype/internal/services/svmm.h (FT_Var_Get_Item_Delta_Func): Change return type to `FT_ItemVarDelta` * truetype/ttgxvar.h (tt_var_get_item_delta): Change return type to `FT_ItemVarDelta`. * truetype/ttgxvar.c (tt_var_get_item_delta): Store scalars and deltas to intermediate array, perform computation using new method `FT_MulAddFix`.
* [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`.Dominik Röttsches2022-05-191-40/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be needed for 'COLR' v1 variation support. * src/truetype/ttgxvar.h (GX_ItemVarData, GX_AxisCoords, GX_VarRegion, GX_VarItemStore, GX_DeltaSetIdxMap): Move structures to... * include/freetype/internal/ftmmtypes.h: ... this new file. * include/freetype/internal/service/svmm.h (MultiMasters): Include `ftmmtypes.h`. (FT_Var_Load_Delta_Set_Idx_Map_Func, FT_Var_Load_Item_Var_Store_Func, FT_Var_Get_Item_Delta_Func, FT_Var_Done_Item_Var_Store_Func, FT_Var_Done_Delta_Set_Idx_Map_Func): New function typedefs. (MultiMasters): Add them. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cff/cffdrivr.c (cff_load_item_variation_store, cff_load_delta_set_index_mapping, cff_get_item_delta, cff_done_item_variation_store, cff_done_delta_set_index_map): New wrapper methods calling into mm service. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store, ft_var_load_delta_set_index_mapping, ft_var_get_item_delta, ft_var_done_item_variation_store, ft_var_done_delta_set_index_map): Renamed to ... (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, tt_var_get_item_delta, tt_var_done_item_variation_store, tt_var_done_delta_set_index_map): ... this for consistency. Mark them as non-static. * src/truetype/ttgxvar.h: Add corresponding prototypes. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* Update all copyright notices.Werner Lemberg2022-01-111-1/+1
|
* Update all copyright notices.Werner Lemberg2021-01-171-1/+1
|
* Make macros for header file names optional.David Turner2020-06-081-1/+1
| | | | | | | | | | | | | | | | | We no longer have to take care of the 8.3 file name limit; this allows us (a) to introduce longer, meaningful file names, and (b) to avoid macro names in `#include' lines altogether since some compilers (most notably Visual C++) doesn't support this properly. */*: Replace #include FOO_H with #include <freetype/foo.h> or something similar. Also update the documentation.
* Update all copyright notices.Werner Lemberg2020-01-191-1/+1
|
* Update all copyright notices.Werner Lemberg2019-02-231-1/+1
|
* Update copyright years.Werner Lemberg2019-01-221-1/+1
|
* [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.Chris Liddell2018-11-271-33/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For multiple master fonts, common usage (in Postscript) is to modify the WeightVector of an existing font instance, this addition supports that use. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector, FT_Get_MM_WeightVector): New API functions. * include/freetype/internalservices/svmm.h (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New function types. (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector' members. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cffcffdrivr.c (cff_set_mm_weightvector, cff_get_mm_weightvector): New functions. (cff_service_multi_masters): Register them. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. This driver doesn't use the new interface. * src/type1/t1load.c (T1_Set_MM_WeightVector, T1_Get_MM_WeightVector): New functions. * src/type1/t1driver.c (t1_service_multi_masters): Register them. * src/type1/t1load.h: Updated.
* [GSoC] include/*.*, devel/*.*: Convert block comments to `light' style.Werner Lemberg2018-06-031-18/+18
| | | | | | | | | | | This second and final monster commit was created by applying Nikhil's scripts `docconverter.py' and `markify.py' to all C header and source files, followed up by minor manual clean-up. No change in functionality, of course. I used commit f7419907bc6044b9b7057f9789866426c804ba82 from https://github.com/nikramakrishnan/freetype-docs.git.
* Remove FT_CONFIG_OPTION_PIC and related code.Werner Lemberg2018-05-021-32/+0
| | | | | | | | | | | | | | | | | */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this preprocessor symbol. */*: Replace `XXX_GET' macros (which could be either a function in PIC mode or an array in non-PIC mode) with `xxx' arrays. * include/freetype/internal/ftpic.h, src/autofit/afpic.c, src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h, src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h, src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c, src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h, src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c, src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h: Removed.
* Update copyright year.Werner Lemberg2018-01-021-1/+1
|
* Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.Werner Lemberg2017-12-201-0/+4
| | | | | | | | | | | | | | We exit early if the current design or blend coordinates are identical to the new ones. * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design): Implement it, returning internal error code -1 if there will be no variation change. * src/type1/t1load.c (t1_set_mm_blend): Ditto. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
* Add framework for setting named instance in MM service.Werner Lemberg2017-10-071-21/+30
| | | | | | | | | | | * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): New function typedef. (MultiMasters): Add `set_instance' member. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cff/cffdrivr.c (cff_service_multi_masters), src/truetype/ttdriver (tt_service_gx_multi_masters), src/type1/t1driver.c (t1_service_multi_masters): Updated.
* [truetype] Store and use design coordinates also.Werner Lemberg2017-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add `normalizedcoords' argument. * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store the design coordinates of the current instance. Updated. * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... (tt_set_mm_blend): ... New function. Convert data in `normalizedcoords' array to `coords' array on demand. (TT_Set_Var_Design): Store argument data in `coords' array. (TT_Get_Var_Design): Get data from `coords' array. (tt_get_var_blend): Updated. (tt_done_blend): Updated. * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/cff/cffobjs.c (cff_face_init): Updated.
* Update copyright year.Werner Lemberg2017-01-041-1/+1
|
* [truetype, cff] Extend `get_var_blend' function of MM service.Werner Lemberg2016-12-181-3/+4
| | | | | | | | | | | | | | | | In particular, we need access to named instance data. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add argument for `FT_MM_Var'. * src/cff/cffload.c (cff_get_var_blend): Updated. * src/cff/cffload.h: Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. Accept value `NULL' for arguments. * src/truetype/ttgxvar.h: Updated.
* [truetype, type1] Add `get_var_blend' to MM service.Werner Lemberg2016-12-111-0/+10
| | | | | | | | | | | | | | | | For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): New typedef. (MultiMasters): Add `get_var_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* [truetype, type1] Add `done_blend' to MM service.Werner Lemberg2016-12-101-3/+13
| | | | | | | | | | | | | | | | | | For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): New typedef. (MultiMasters): Add `done_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttobjs.c (TT_Face_Done): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* Add `FT_Get_Var_Design_Coordinates' function.Dave Arnold2016-12-061-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Note that the low-level functions aren't implemented yet. * include/freetype/ftmm.h: Declare. * include/freetype/internal/services/svmm.h (FT_Get_Var_Design_Func): New typedef. (MultiMasters): New MM service function `get_var_design'. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. Update all callers. * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. * src/truetype/ttdriver.c: Updated. * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to handle `get_var_design' service. * src/truetype/ttgxvar.h: Updated. * src/type1/t1driver.c: Updated. * src/type1/t1load.c (T1_Get_Var_Design): New dummp function to handle `get_var_design' service. * src/type1/t1load.h: Updated.
* Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.Werner Lemberg2016-10-261-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | * include/freetype/ftmm.h: Declare. * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): New typedef. (MultiMasters): New MM service function `get_mm_blend'. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. Update all callers. * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, FT_Get_Var_Blend_Coordinates): Implement. * src/truetype/ttdriver.c: Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle `get_mm_blend' service. * src/truetype/ttgxvar.h: Updated. * src/type1/t1driver.c: Updated. * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle `get_mm_blend' service. * src/type1/t1load.h: Updated. * docs/CHANGES: Document.
* Update copyright year.Werner Lemberg2016-01-131-1/+1
|
* Don't use macro names that contain `__' [1/2].Werner Lemberg2016-01-121-3/+3
| | | | | | Such macro names are reserved for both C and C++. */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
* Another adjustment to header locations.Werner Lemberg2015-06-261-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is a result of a discussion thread on freetype-devel http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html Re-introduce the `freetype2' subdirectory for all FreeType header files after installation, and rename the `freetype2' subdirectory in the git repository to `freetype'. * include/freetype2: Renamed to... * include/freetype: This. * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, PRIVATE_HEADERS): Updated. Update creation of `ftconfig.h'. Install generated `ftconfig.h'. * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. * builds/amiga/include/config/ftconfig.h, builds/freetype.mk (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), builds/unix/freetype2.in: Updated. * builds/unix/freetype-config.in: Updated. * builds/unix/configure.raw: Don't check for `rmdir'. * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable according to the autoconf info manual. * builds/unix/install.mk (install, uninstall, distclean_project_unix): Update and simplify. * builds/wince/*, builds/windows/*: Updated. * devel/ft2build.h, include/ft2build.h: Updated. * include/freetype2/config/ftheader.h, include/freetype2/internal/ftserv.h, include/freetype2/internal/internal.h: Update all header file macros. * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. * docs/*: Updated.
* Simplify header file hierarchy.Werner Lemberg2013-11-131-113/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This large patch changes the header file directory layout from `include/freetype/...' to `include/...', effectively removing one level. Since the file `ft2build.h' is also located in `include' (and it stays there even after installation), all FreeType header files are now in a single directory. Applications that use (a) `freetype-config' or FreeType's `pkg-config' file to get the include directory for the compiler, and (b) the documented way for header inclusion like #include <ft2build.h> #include FT_FREETYPE_H ... don't need any change to the source code. * include/freetype/*: Move up to... * include/*: ... this directory. * builds/amiga/include/freetype/*: Move up to... * builds/amiga/include/*: ... this directory. */*: Essentially do `s@/freetype/@/@' where appropriate. * CMakeList.txt: Simplify. * builds/unix/freetype-config.in, builds/unix/freetype2.in: For `--cflags', return a single directory. * builds/unix/install.mk (install): No longer try to remove `cache' and `internal' subdirectories; instead, remove the `freetype' subdirectory.
* Formatting, whitespace.Werner Lemberg2012-02-061-16/+25
|
* Remove trailing spaces.suzuki toshiya2012-01-171-3/+3
|
* Position Independent Code (PIC) support in truetype driver.Oran Agra2009-04-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/freetype/internal/services/svmm.h add macros to init instances of FT_Service_MultiMastersRec. * include/freetype/internal/services/svttglyf.h add macros to init instances of FT_Service_TTGlyfRec. * src/truetype/ttdriver.h declare tt_driver_class using macros from ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined the following structs: tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class and tt_services array, will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from ttpic.h in order to access them from the pic_container. * src/truetype/ttobjs.c change trick_names array to be PIC-compatible by being a two dimentional array rather than array of pointers. New Files: * src/truetype/ttpic.h declare struct to hold PIC globals for truetype driver and macros to access them. * src/truetype/ttpic.c implement functions to allocate, destroy and initialize PIC globals for truetype driver. * src/truetype/truetype.c add new file to build: ttpic.c. * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c.
* * src/pcf/pcfdrivr.c: Revert change from 2004-04-17.Werner Lemberg2004-04-251-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/pcf/pcfutil.c: Use FT_LOCAL_DEF. * src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H. Use FT_BEGIN_HEADER and FT_END_HEADER. Use FT_LOCAL. 2004-04-24 George Williams <gww@silcom.com> Add support for Apple's distortable font technology (in GX fonts). * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro. * include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style, FT_MM_Var): New structures. (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates, FT_Set_Var_Blend_Coordinates): New function declarations. * include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func, FT_Set_Var_Design_Func): New typedefs. Update MultiMasters service. * include/freetype/internal/tttypes.h [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H. (GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef. (TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend' and `blend'. * include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New macros. * include/freetype/internal/fttrace.h: Add `ttgxvar'. * src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates, FT_Set_Var_Blend_Coordinates): New functions. * src/sfnt/sfobjs.c (sfnt_load_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS flag for GX var fonts. * src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files. * src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.c. * src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h. (tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New service. (tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. * src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (TT_Process_Simple_Glyph, load_truetype_glyph) [TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts. * src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call tt_done_blend. * src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call tt_face_vary_cvt. * src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c. * src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var and T1_Set_Var_Design. * src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros. (T1_Get_MM_Var, T1_Set_Var_Design): New functions. * src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New function declarations.
* * include/freetype/internal/services/bdf.h: Renamed to...Werner Lemberg2003-09-161-0/+68
* include/freetype/internal/services/svbdf.h: This. Add copyright notice. * include/freetype/internal/services/glyfdict.h: Renamed to... * include/freetype/internal/services/svgldict.h: This. Add copyright notice. * include/freetype/internal/services/multmast.h: Renamed to... * include/freetype/internal/services/svmm.h: This. Add copyright notice. Add FT_BEGIN_HEADER and FT_END_HEADER. * include/freetype/internal/services/sfnt.h: Renamed to... * include/freetype/internal/services/svsfnt.h: This. Add copyright notice. * include/freetype/internal/services/postname.h: Renamed to... * include/freetype/internal/services/svpostnm.h: This. Add copyright notice. * include/freetype/internal/services/xf86name.h: Renamed to... * include/freetype/internal/services/svxf86nm.h: This. Add copyright notice. * include/freetype/internal/ftserv.h: Add FT_BEGIN_HEADER and FT_END_HEADER. Add copyright notice. Update macro names of services header files. * builds/freetype.mk (SERVICES_DIR): New variable. (BASE_H): Add services header files.