summaryrefslogtreecommitdiff
path: root/include/freetype
Commit message (Collapse)AuthorAgeFilesLines
* * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update.Werner Lemberg2023-03-011-1/+1
| | | | | | This follows https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00200.html
* [truetype] Treat 38 as 40 without Infinality.Alexei Podtelezhnikov2023-02-271-1/+1
| | | | | * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Reinstate. * src/truetype/ttdriver.c (tt_property_set): Fallback from 38 to 40.
* * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update.Werner Lemberg2023-02-261-2/+5
| | | | | | This follows https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html
* [truetype] Hide Infinality.Alexei Podtelezhnikov2023-02-172-46/+10
| | | | | | | | Remove Infinality as an option before its complete extraction. * include/freetype/ftoption.h: Remove the Infinality option. * devel/ftoption.h: Ditto. * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Is 40 now.
* Documentation improvement for `FT_Bitmap`.Werner Lemberg2023-02-161-1/+7
| | | | Fixes #1205.
* [type1/MM] Round design coordinates.Alexei Podtelezhnikov2023-02-101-5/+5
| | | | | | | | | | The design coordinates for MM fonts were not rounded. For example, `FT_Get_Var_Design_Coordinates` returned values with fractional part. * src/type1/t1load.c (mm_axis_unmap): Refactor with rounding. * include/freetype/ftmm.h (FT_Var_Axis, FT_Set_Var_Design_Coordinates, FT_Get_Var_Design_Coordinates): Reword documentation.
* * Version 2.13 released.VER-2-13-0Werner Lemberg2023-02-092-3/+3
| | | | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-13-0'. * docs/VERSION.TXT: Add entry for version 2.13. * docs/CHANGES: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.12.1/2.13/, s/2121/2130/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 13. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 25:0:19. * CMakeLists.txt (VERSION_MINOR): Set to 13. (VERSION_PATCH): Set to 0.
* Comment on `FT_GlyphSlot_Slant'.Alexei Podtelezhnikov2023-02-091-1/+3
|
* Fix 'fall-through' warning messages.Werner Lemberg2023-02-081-0/+13
| | | | | | | Modern compilers get more insistent on that... * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Define. * src/*: Use it instead of `/* fall through */` comments.
* Avoid reserved identifiers that are globally defined.Werner Lemberg2023-02-082-10/+10
| | | | | | | | | | | This is mandated by the C99 standard, and clang 15 produces zillions of warnings otherwise. * devel/ftoption.h, include/freetype/config/ftoption.h, include/freetype/internal/ftmemory.h, src/autofit/afhints.h, src/autofit/afmodule.c, src/autofit/aftypes.h, src/base/ftadvanc.c, src/base/ftdbgmem.c, src/base/ftstream.c, src/bdf/bdflib.c, src/truetype/ttinterp.c: Replace identifiers of the form `_foo` with `foo_`.
* * src/base/ftsynth.c (FT_GlyphSlot_Slant): Add vertical slant.Alexei Podtelezhnikov2023-02-071-2/+4
| | | | * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Update it.
* Comment on optional ascender and descender.Alexei Podtelezhnikov2023-02-041-2/+2
|
* The 'COLR' v1 API will no longer be experimental in the next release.Werner Lemberg2023-01-191-90/+33
|
* Update all copyright notices.Werner Lemberg2023-01-1796-96/+96
|
* [sfnt] Remove temporary runtime flag for variable 'COLR' v1.Dominik Röttsches2023-01-161-46/+3
| | | | | | | | | | | | | | | Fixes #1187. * src/sfnt/ttcolr.c (top level, read_paint, tt_face_load_colr, tt_face_free_colr, get_deltas_for_var_index_base, tt_face_get_color_glyph_clipbox, tt_face_get_colorline_stops): Remove macro definition `VARIABLE_COLRV1_ENABLED` and its usage. * src/truetype/ttdriver.c (tt_property_set): Remove parsing of 'TEMPORARY-enable-variable-colrv1' property name. * src/truetype/ttobjs.h (TT_DriverRec): Remove `enable_variable_colrv1` flag.
* * include/freetype/internal/ftcalc.h (FT_MSB): Support Open Watcom 2.0.Jiří Malák2022-12-061-5/+5
| | | | Closes !232.
* Add `TT_CONFIG_OPTION_NO_BORING_EXPANSION` configuration macro.Dominik Röttsches2022-11-121-0/+18
| | | | | | | | | | | This gives users a possibility to deactivate new features not (yet) in the OpenType standard. * include/freetype/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_NO_BORING_EXPANSION): New macro. * src/truetype/ttgxvar.c (ft_var_load_avar): Use it to disable 'avar' version 2.0 support.
* [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.
* Replace '1/64th' (and similar entries) with '1/64' in docs and comments.Werner Lemberg2022-10-246-11/+11
|
* * include/freetype/*: Fix documentation typos.Ivan Panchenko2022-10-243-18/+17
|
* * src/base/ftsynth.c (FT_GlyphSlot_Slant): New API with custom slant.Liu Kunpeng(柳鲲鹏)2022-10-161-1/+6
| | | | * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Declare it.
* Note the lack of floating-point data types.Alexei Podtelezhnikov2022-10-142-2/+6
|
* [cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`.Werner Lemberg2022-10-101-8/+12
| | | | | | | | | This ancient option stayed completely undocumented. Given that the 'cff' driver requires the 'psnames' module, it makes no sense today to have this macro. * src/cff/cffdrivr.c (cff_services), src/cff/cffobjs.c (cff_face_init): Remove corresponding conditional code.
* Minor comment changes.Werner Lemberg2022-10-101-4/+4
|
* Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name.Alexei Podtelezhnikov2022-10-041-94/+96
|
* [base] FT_Attach_Stream: Make `parameters` argument constant.Ali Chraghi2022-09-291-2/+2
|
* [psaux] Remove unused structure field.Alexei Podtelezhnikov2022-07-311-4/+0
| | | | | * include/freetype/internal/psaux.h (PS_TableRec): Remove `num_elems`. * src/psaux/psobjs.c (ps_table_new): Remoove its initialization.
* * src/base/ftglyph.c (FT_Get_Glyph): Set `*aglyph` to NULL in case of error.Werner Lemberg2022-07-291-3/+3
|
* Fix clang14 compiler warnings.Werner Lemberg2022-07-291-2/+2
| | | | | | | | | * include/freetype/internal/ftstream.h (FT_GET_SHORT_LE, FT_GET_USHORT_LE): Fix type. * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Always return boolean value. (tt_face_get_colorline_stops): Fix type of `var_index_base`.
* [sfnt] Support variable 'COLR' v1 color lines.Dominik Röttsches2022-07-081-3/+10
| | | | | | | | | | | | * include/freetype/ftcolor.h (FT_ColorStopIterator): Add field `read_variable` to indicate whether a variation index base should be read. * src/sfnt/ttcolr.c: (FT_PaintFormat_Internal): New enumerations `FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT` `FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT`, and `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT`. (read_color_line): New parameter `read_variable`; update callers. (read_paint): Handle new enumerations.
* doc: Clarify description of `FT_Stream_IoFunc`.Stephen Holdaway2022-07-061-3/+9
| | | | | | | | | | The existing documentation comments on `FT_Stream_IoFunc` hinted at the dual seek/read behavior required for custom stream implementations to work, but it didn't explicitly explain it. Without looking at the internals of FreeType, it was easy for someone to assume their implementation should handle both seek and read operations all the time. If this is done, you get a variety of errors, but mostly just `Unknown_File_Format` (error code 0x02).
* include/freetype/ftmm.h: Improve documentation.Werner Lemberg2022-07-021-4/+13
|
* [truetype] Perform variation store delta computation with 64-bit precision.Dominik Röttsches2022-06-292-2/+2
| | | | | | | | | | | | * 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`.
* New function `FT_MulAddFix` to compute the sum of fixed-point products.Dominik Röttsches2022-06-291-0/+34
| | | | | | | | This function, based on the code of `FT_MulFix`, uses 64-bit precision internally for intermediate computations. * include/freetype/internal/ftcalc.h, base/ftcalc.c (FT_MulAddFix): Implement it.
* [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14Dominik Röttsches2022-06-221-2/+3
|
* s/fixed point/fixed-point/Werner Lemberg2022-06-212-2/+2
|
* Proposal: Feature control for variable COLRv1Dominik Röttsches2022-06-211-3/+45
| | | | | | | | * include/freetype/ftdriver.h (variable-color-v1 property): Add documentation for variable-colr-v1 property. * src/truetype/ttdriver.c (tt_property_set): Ingest variable-control property when called, set to enable_variable_colrv1 driver flag. * src/truetype/ttobjs.h (TT_DriverRec): Add enable_variable_colrv1 flag.
* [stream] Fix reading s32 when long is s64Ben Wagner2022-06-181-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FT_READ_LONG`, `FT_GET_LONG`, and related macros did not return negative values when `long` is more than 32 bits. `FT_Stream_ReadULong` would read four bytes into the LSB of an `FT_ULong` and return that. Since this can never set the MSb of the `FT_ULong` when `FT_ULong` is more than 32 bits the cast to `FT_Long` never resulted in a negative value. Fix this by modifying `FT_Stream_Read*` to return a type of the same size as the bytes it is reading and changing the `FT_READ_*` and `FT_GET_*` macros to cast to the same type returned by `FT_Stream_Read*` but with the correctly signed type (instead of casting to what is assumed to be the type of `var` which will happen automatically anyway). There exist a few cases like with the `OFF3` variants where there isn't generally a type with the correct size. `FT_PEEK_OFF3` works around this loading the bytes into the three most significant bits and then doing a signed shift down. `FT_NEXT_OFF3` also already worked correctly by casting this signed value to another signed type. `FT_Stream_GetUOffset` works correctly but one must be careful not to attempt to cast the returned value to a signed type. Fortunately there is only `FT_GET_UOFF3` and no `FT_GET_OFF3`. All of these cases are handled correctly when reading values through `FT_Stream_ReadFields` since it generically computes the signed value through an `FT_Int32`. This change is essentially doing the same for these macros. * include/freetype/internal/ftstream.h (FT_NEXT_*, FT_GET_*, FT_READ*): Update macros and return types to use fixed size types for fixed size values. * src/base/ftstream.c (FT_StreamGet*, FT_StreamRead*): Dito. Issue: #1161
* [svg] Set linear advances when loading SVG glyphsBen Wagner2022-06-061-2/+2
| | | | | | | | * include/freetype/freetype.h (FT_GlyphSlotRec_): update doc * src/cff/cffgload.c (cff_slot_load): do it * src/truetype/ttgload.c (TT_Load_Glyph): do it Fixes: #1156
* [truetype] Support reading 32bit/16bit VarStore deltasDominik Röttsches2022-05-231-6/+8
| | | | | | | | * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Define type to be used for delta arrays, upgrade to FT_long. * src/truetype/ttgxvar.c: Adhere to long_words bit and read either Short/Byte pairs or Long/Short pairs, as defined by spec. For better readability, define macro for repetitive read code.
* [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`.Dominik Röttsches2022-05-192-40/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * Version 2.12.1 released.VER-2-12-1Werner Lemberg2022-05-011-1/+1
| | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-12-1'. * docs/VERSION.TXT: Add entry for version 2.12.1. * docs/CHANGES, docs/release: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.12.0/2.12.1/, s/2120/2121/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 24:3:18. * CMakeLists.txt (VERSION_PATCH): Set to 1.
* [sfnt] Correct FT_ColorStopIterator documentation.Ben Wagner2022-04-041-3/+3
| | | | | | | * include/freetype/ftcolor.h (FT_ColorStopIterator): the user should not set `p` to NULL before calling `FT_Get_Colorline_Stops`. `p` and `num_color_stops` are set by `FT_Get_Paint`. `p` and `current_color_stop` are updated by `FT_Get_Colorline_Stops`.
* * Version 2.12.0 released.VER-2-12-0Werner Lemberg2022-03-311-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-12-0'. * docs/VERSION.TXT: Add entry for version 2.12.0. * docs/CHANGES, docs/release: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.11.1/2.12.0/, s/2111/2120/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 12. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 24:2:18. * CMakeLists.txt (VERSION_MINOR): Set to 12. (VERSION_PATCH): Set to 0. * builds/toplevel.mk (do-dist): Generate `ChangeLog` entries for all commits since version 2.11.0 (when we stopped creating this file manually).
* Add `FT_FACE_FLAG_SBIX_OVERLAY` and `FT_HAS_SBIX_OVERLAY`.Werner Lemberg2022-03-251-0/+92
| | | | | | | | * include/freetype/freetype.h (FT_FACE_FLAG_SBIX_OVERLAY, FT_HAS_SBIX_OVERLAY): New macro. * src/sfnt/ttsbit.c (tt_face_load_sbit): Handle `FT_FACE_FLAG_SBIX_OVERLAY`. Remove obsolete tracing message.
* Add `FT_PARAM_TAG_IGNORE_SBIX`.Werner Lemberg2022-03-251-0/+15
| | | | | | | | | | | | | This is another bit to handle 'sbix' tables as described in the OpenType specification. * include/freetype/ftparams.h (FT_PARAM_TAG_IGNORE_SBIX): New macro. * src/sfnt/sfobjc.c (is_apple_sbix): Rename to... (has_sbix): ... this. Check for more sbit tables. Handle `FT_PARAM_TAG_IGNORE_SBIX` to eventually control `has_sbix`. Only call sbit table loader if an sbit table is present.
* Add `FT_FACE_FLAG_SBIX` and `FT_HAS_SBIX`.Werner Lemberg2022-03-251-0/+25
| | | | | | | | | Fonts with 'sbix' tables need special handling by the application. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX, FT_HAS_SBIX): New macros. * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_SBIX` if 'sbix' table is present.
* * include/freetype/freetype.h (FT_LOAD_SBITS_ONLY): Tag macro as public.Werner Lemberg2022-03-251-1/+11
|
* [doc] FT_OUTLINE_OVERLAP was introduced in 2.10.3.Ben Wagner2022-03-191-5/+5
| | | | * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Document when added.
* * include/freetype/freetype.h: Improve SDF documentation.Anuj Verma2022-03-051-0/+38
|