Commit Graph

84 Commits

Author SHA1 Message Date
Moazin Khatti ce64d9cbf1 Adds the functionality to load SVG documents.
SVG document corresponding to a glyphID is fetched and stored
in an `FT_SVG_Document' structure which is referenced in the
glyphslot.

* include/freetype/config/ftheader.h: Adds `FT_OTSVG_H'.

* include/freetype/ftimage.h: Adds `FT_GLYPH_FORMAT_SVG'.

* include/freetype/internal/ftobjs.h: Adds `FT_GLYPH_OWN_GZIP_SVG'.

* include/freetype/internal/sfnt.h: Adds `load_svg_doc' and its
function type `TT_Load_Svg_Doc_Func'.

* include/freetype/otsvg.h: Adds `FT_SVG_Document' and its struct.

* src/base/ftobjs.c: Adds code to allocate and free memory for
`FT_SVG_Document' in `slot->other'.

* src/cff/cffgload.c: Adds code to load SVG glyph if it's present.

* src/truetype/ttgload.c: Ditto.

* src/sfnt/sfdriver.c: Adds `tt_face_load_svg_doc'.

* src/sfnt/ttsvg.h: Ditto.

* src/sfnt/ttsvg.c: Adds implementation of `tt_face_load_svg_doc'
and its helper functions.
2019-08-10 16:11:07 +05:00
Moazin Khatti 92eeba75c4 [sfnt] Adds the functionality to load `SVG' table.
Adds code to load the SVG table data into an `svg'
structure and set the flag `FT_FACE_FLAG_SVG'.

* include/freetype/freetype.h: Adds `FT_FACE_FLAG_SVG'.

* include/freetype/internal/sfnt.h: Adds the fields
`load_svg' and `free_svg' to `SFNT_Interface'.

* include/freetype/internal/tttypes.h: Adds a void
pointer field `svg' to hold info from `SVG' table.

* include/freetype/internal/tttags.h: Adds the tag
`TTAG_SVG'.

* src/sfnt/ttsvg.c: Writes the functions
`tt_face_load_svg' and `tt_face_free_svg'

* src/sfnt/ttsvg.h: Writes header declarations for
`tt_face_load_svg' and `tt_face_free_svg'.

* src/sfnt/sfdriver.c: Adds the functions
`tt_face_load_svg' and `tt_face_free_svg' to
`sfnt_interface'.

* src/sfnt/sfnt.c: Includes `ttsvg.c'.

* src/sfnt/sfobjs.c: (sfnt_load_face) Adds code to
load `svg' table struct. (sfnt_done_face) Adds code
to free `svg' table struct.
2019-08-05 22:48:16 +05:00
Nikhil Ramakrishnan 7b275a5af1 [sfnt] Separate WOFF sources and headers.
Move WOFF sources and headers to separate files.

* include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
src/sfnt/sfwoff.h: New files.

* include/freetype/internal/fttrace.h: Register `sfwoff.c'.

* include/freetype/internal/internal.h: Define
FT_INTERNAL_WOFF_TYPES_H.

* include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.

* include/freetype/internal/tttypes.h: Move out WOFF structures.

* src/sfnt/rules.mk: Add `sfwoff.c'.

* src/sfnt/sfnt.c: Include `sfwoff.c'.

* src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
2019-05-30 23:57:34 +05:30
Werner Lemberg 7585997024 Update all copyright notices. 2019-02-23 10:07:09 +01:00
Werner Lemberg 8de11f3def s/NULL/`NULL`/ in documentation. 2019-02-20 16:19:19 +01:00
Werner Lemberg f92fa39341 Minor documentation fixes. 2019-02-20 16:04:48 +01:00
Werner Lemberg f686ad46a3 Update copyright years. 2019-01-22 20:31:44 +01:00
Nikhil Ramakrishnan ae5d1a4cec * include/*.*: Convert comments to markdown.
This commit was created by applying scripts `markify.py' and
`markdown-format.bash' to all C header files, followed by minor
clean-up.

No change in functionality, of course.

Scripts used:
https://github.com/nikramakrishnan/freetype-docs.git: Commit dfce31e.

http://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00013.html:
With patches applied.
2018-08-25 16:16:56 +05:30
Werner Lemberg 7edc937fe6 s/palette_types/palette_flags/.
Suggested by Behdad.
2018-07-02 11:50:04 +02:00
Werner Lemberg 4e3b2473d8 Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
* include/freetype/freetype.h, src/base/ftobjs.c
(FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.

* include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
Updated.
2018-07-02 11:41:44 +02:00
Werner Lemberg 9027233f75 s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
* include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
src/sfnt/ttcolr.c: Do it.
2018-06-21 00:21:09 +02:00
Nikhil Ramakrishnan e13599a036 Change documentation markup tags to lowercase.
Implemented as per discussion in

  http://lists.nongnu.org/archive/html/freetype-devel/2018-06/msg00073.html

No change in functionality, of course.
2018-06-18 03:40:29 +05:30
Werner Lemberg 19d8687f0b Fix documentation indentation; s/@const/@enum/; harmonize doc keywords. 2018-06-17 11:22:37 +02:00
Werner Lemberg 9b31c44620 Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
This avoids any additional allocation of COLR related structures in
a glyph slot.

* include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
FT_Get_GlyphLayers): Removed.

* include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
(FT_Slot_InternalRec): Remove `color_layers'.

* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
Removed.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
`load_colr_layer'.

* src/base/ftobjs.c (ft_glyph_slot_done): Updated.
(FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
(FT_Get_GlyphLayers): Removed.

* src/sfnt/sfdriver.c (sfnt_interface): Updated.

* src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
* src/sfnt/ttcolr.h: Updated.

* src/truetype/ttgload.c (TT_Load_Glyph): Updated.
2018-06-14 21:30:43 +02:00
Werner Lemberg f9d05eb326 Provide iterative API to access `COLR' data.
This solution doesn't store any data in an `FT_GlyphSlot' object.

* include/freetype/freetype.h (FT_LayerIterator): New structure.
(FT_Get_Color_Glyph_Layer): New function.

* include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
function type.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.

* src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.

* src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
* src/sfnt/ttcolr.h: Updated.

* src/sfnt/sfdriver.c (sfnt_interface): Updated.
2018-06-14 21:17:17 +02:00
Werner Lemberg 54b332aaf9 [sfnt] Separate `CPAL' and `COLR' table handling.
Later on we want to support the `SVG' table also, which needs `CPAL'
(but not `COLR').

* include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
and `free_cpal' fields.
(FT_DEFINE_SFNT_INTERFACE): Updated.

* include/freetype/internal/tttypes.h (TT_FaceRec): Replace
`colr_and_cpal' fields with `cpal' and `colr'.

* src/sfnt/sfdriver.c (sfnt_interface): Updated.

* src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.

* src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
(ColrCpal): Removed.
(tt_face_load_colr): Split off CPAL handling into...
(tt_face_load_cpal): ... this new function.
(tt_face_free_colr): Split off CPAL handling into...
(tt_face_free_cpal): ... this new function.
(tt_face_load_colr_layers, tt_face_palette_set): Updated.

* src/sfnt/ttcolr.h: Updated.

* src/truetype/ttgload.c (TT_Load_Glyph): Updated.
2018-06-13 08:46:27 +02:00
Werner Lemberg 45145d348f Finish CPAL/COLR support (3/4).
* src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
(FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
functions.
2018-06-13 06:11:28 +02:00
Werner Lemberg b85d4e8f04 Finish CPAL/COLR support (2/4).
* src/sfnt/ttcolr.c (tt_face_palette_set): New function.
(tt_face_load_colr): Allocate `face->palette' and call
`tt_face_palette_set'.
Adjust return error code in case of error.

* src/sfnt/ttcolr.h: Updated.

* include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
function type.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.

* src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
(sfnt_done_face): Updated.
2018-06-13 06:11:28 +02:00
Werner Lemberg f999375a9a [GSoC] include/*.*, devel/*.*: Convert block comments to `light' style.
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.
2018-06-03 22:00:42 +02:00
Werner Lemberg ae2cd1b749 Various minor color fixes.
* include/freetype/config/ftheader.h (FT_COLOR_H): New macro.

* include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
type of `load_flags' to `FT_Int32'.

* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
type of `idx' to `FT_UInt'.
(TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.

* src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
`load_flags' to `FT_Int32'.

* src/sfnt/ttcolr.c (find_base_glyph_record,
tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
(tt_face_find_color, tt_face_colr_blend_layer): Change type of
`color_index' to `FT_UInt'.
Fix signedness and type issues.

* src/sfnt/ttcolr.h: Updated.
2018-05-30 09:34:57 +02:00
Werner Lemberg 583dabf291 Add function `FT_Get_GlyphLayers' to access `COLR' table data.
* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
structure to...
* include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
header file.
(FT_Glyph_Layer): New typedef.
Update code to use it where appropriate.

* src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
2018-05-16 21:21:18 +02:00
Shao Yu Zhang f04d81751a [sfnt] Preliminary support of coloured layer outlines.
This commit enables OpenType's COLR/CPAL table handling; a typical
application are color emojis that can be scaled to any size.

If the color palette does not exist or is invalid, the rendering
step rasterizes the outline instead.  The current implementation
assumes that the foreground is black.

Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.

There are still some issues with metrics; additionally, an API to
fetch color layers is missing.

* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_COLOR_LAYERS): New macro.

* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
FT_Colr_InternalRec): New structures.
(FT_Slot_InternalRec): Add `color_layers' field.

* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
TT_Blend_Colr_Func): New function types.
(SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
and `colr_blend' fields.

* include/freetype/internal/tttypes.h (TT_FaceRec): Add
`colr_and_cpal' field.

* include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
macros.

* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.

* src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
Handle glyph color layers.

* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
`ttcolr.c'.

* src/sfnt/sfdriver.c: Include `ttcolr.h'.
(PUT_COLOR_LAYERS): New macro.
Update call to `FT_DEFINE_SFNT_INTERFACE'.

* src/sfnt/sfnt.c: Include `ttcolr.c'.

* src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
(sfnt_done_face): Updated.

* src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
2018-05-13 03:25:09 +02:00
Werner Lemberg 9514959241 Remove FT_CONFIG_OPTION_PIC and related code.
*/* [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.
2018-05-02 20:27:48 +02:00
Werner Lemberg 0a0c22569d Update copyright year. 2018-01-02 09:33:57 +01:00
Werner Lemberg 0c7fb43d05 [sfnt] Add `get_name_id' service.
* include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New
typedef.
(SFNT_Interface): Add `get_name_id' field.
(FT_DEFINE_SFNT_INTERFACE): Updated.

* src/sfnt/sfdriver.c (search_name_id): Rename to...
(sfnt_get_name_id): ... this.
(sfnt_get_ps_name, sfnt_interface): Udpated.
2017-03-05 19:06:41 +01:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 3205a44d01 [sfnt] Revert change from 2016-12-08.
I missed the functionality of `ft_module_get_service', which makes
the change unnecessary.
2016-12-09 06:55:34 +01:00
Werner Lemberg 29aa957767 [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
CFF2 fonts will need access to those two functions.

* include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
(SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
(FT_DEFINE_SFNT_INTERFACE): Updated.

* src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
Fix signatures to exactly correspond to the glyph dict service
function typedefs.
(sfnt_interface): Updated.
2016-12-08 08:59:34 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 37412ff9f4 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_'.
2016-01-12 21:37:13 +01:00
Werner Lemberg 14d6b5d748 [truetype] Introduce named instance access to GX fonts.
For functions querying a face, bits 16-30 of the face index can hold
the named instance index if we have a GX font.  The indices start
with value 1; value 0 indicates font access without GX variation
data.

* include/freetype/freetype.h (FT_FaceRec): Update documentation.
* include/freetype/internal/sfnt.h: Ditto.

* src/sfnt/sfobjs.c (sfnt_init_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
do argument checks.
(sfnt_load_face): Updated.

* src/truetype/ttobjs.c (tt_face_init)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
the style name.

* src/base/ftobjs.c (open_face_from_buffer,
open_face_PS_from_sfnt_stream): Updated.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
* src/cff/cffload.c (cff_font_load): Updated.

* src/cff/cffobjs.c (cff_face_init): Make function exit early for
pure CFF fonts if `font_index < 0'.
Updated.

* src/cid/cidobjs.c (cid_face_init): Updated.
* src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
* src/pfr/pfrobjs.c (pfr_face_init): Updated.
* src/type1/t1objs.c (T1_Face_Init): Updated.
* src/type42/t42objs.c (T42_Face_Init): Updated.
* src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
Updated.

* docs/CHANGES: Updated.
2015-08-13 15:22:17 +02:00
Werner Lemberg 1cdac10d3a [sfnt] Make `tt_face_get_name' member of the SFNT interface.
* include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
prototype.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.

* src/sfnt/sfdriver.c (sfnt_interface): Updated.

* src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
* src/sfnt/sfobjs.h: Add prototype for it.
2015-07-07 14:04:44 +02:00
Werner Lemberg 392cf22f8a Another adjustment to header locations.
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.
2015-06-26 06:48:00 +02:00
Werner Lemberg fae3820764 Simplify header file hierarchy.
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.
2013-11-13 08:55:46 +01:00
Werner Lemberg f6aa089f12 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. 2013-05-10 07:58:47 +02:00
Werner Lemberg 5987445073 Formatting, comment fixes. 2012-07-29 13:15:53 +02:00
suzuki toshiya 1749d8bc6a Remove trailing spaces. 2012-01-17 02:00:24 +09:00
Oran Agra fb429ec409 Position Independent Code (PIC) support in sfnt driver.
* include/freetype/internal/services/svbdf.h add macros to init
instances of FT_Service_BDFRec.
* include/freetype/internal/services/svgldict.h add macros to init
instances of FT_Service_GlyphDictRec.
* include/freetype/internal/services/svpostnm.h add macros to init
instances of FT_Service_PsFontNameRec.
* include/freetype/internal/services/svsfnt.h add macros to init
instances of FT_Service_SFNT_TableRec.
* include/freetype/internal/services/svttcmap.h add macros to init
instances of FT_Service_TTCMapsRec.
* include/freetype/internal/sfnt.h add macros to init
instances of SFNT_Interface.

* src/sfnt/sfdriver.h declare sfnt_module_class using macros from
ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name
tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface,
sfnt_module_class, and sfnt_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 sfntpic.h in order to access them
from the pic_container.

* src/sfnt/ttcmap.h add macros to init
instances of TT_CMap_ClassRec.
* src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec
tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec,
tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes 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 sfntpic.h in order to access them
from the pic_container.
The content of tt_cmap_classes is now described in the
new file 'ttcmapc.h'.

New Files:
* src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt
driver and macros to access them.
* src/sfnt/sfntpic.c implement functions to allocate, destroy and
initialize PIC globals for sfnt driver.
* src/sfnt/ttcmapc.h describing the content of
tt_cmap_classes allocated in ttcmap.c

* src/sfnt/sfnt.c add new file to build: sfntpic.c.
* src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
2009-04-05 18:08:32 +03:00
Werner Lemberg 9b774e2822 Remove trailing whitespace. From Alexei. 2007-01-16 06:11:27 +00:00
Werner Lemberg d41aecdbc0 formatting, doc improvements 2006-02-21 08:08:14 +00:00
David Turner dd0f3609d7 * include/freetype/internal/sfnt.h, src/sfnt/sfdriver.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit.c: moving the definition
        of 'set_sbit_strike' and 'load_sbit_metrics' to their 2.1.8
        location. This is used to support binary compatibility with
        the X.Org server's libXfont library.

        note that this disables memory optimizations for the embedded
        bitmap loader.Sigh....
2006-02-20 23:50:21 +00:00
Werner Lemberg 8e6f8c4d79 Formatting, copyright years, documentation improvements. 2006-02-17 08:07:09 +00:00
David Turner cda2d957dc * builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
      include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
      include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
      include/freetype/internal/ftdriver.h,
      include/freetype/internal/ftmemory.h,
      include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
      include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
      include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
      src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
      src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
      src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
      src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
      src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
      src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
      src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:

    massive changes to the internals to respect the internal object layouts
    and exported functions of FreeType 2.1.7. Note that the cache sub-system
    cannot be fully retrofitted, unfortunately.
2006-02-16 22:45:31 +00:00
Werner Lemberg 5225402a52 * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in
documentation that negative strength values are possible.
Give an example call.

* include/freetype/freetype.h (FT_GlyphSlotRec): Improve
documentation of `outline' field.

* src/sfnt/sfobjc.s: Inckude FT_INTERNAL_DEBUG_H.
* src/sfnt/sfdriver.c: Include ttmtx.h.

* src/autofit/afcjk.c: Include aftypes.h and aflatin.h.
2006-02-15 06:05:52 +00:00
Wu, Chia-I (吳佳一) 35222ff7bb Clean up the SFNT_Interface. In this final pass, `load_hmtx' is
splitted from `load_hhea'.

* include/freetype/internal/sfnt.h, src/sfnt/sfdriver.c,
src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Split `hmtx' from `hhea'.

* src/sfnt/sfobjs.c (sfnt_load_face): Update.
2006-02-14 07:25:57 +00:00
Wu, Chia-I (吳佳一) 65863a5712 Clean up the SFNT_Interface. In this pass, we want to treat the font
directory (offset table and table directory) as a normal table like
the others.  This also means that TTC is no longer recognized there,
but in `init_face'.

* include/freetype/internal/sfnt.h (SFNT_Interface),
src/sfnt/sfdriver.c: `load_sfnt_header' and `load_directory' are
combined and renamed to `load_font_dir'.

* src/sfnt/ttload.h, src/sfnt/ttload.c:
s/sfnt_dir_check/check_table_dir/.
`sfnt_init' is moved to sfobjs.c and renamed to `sfnt_open_font'.
`tt_face_load_sfnt_header' and `tt_face_load_directory' are combined
and renamed to `tt_face_load_font_dir'.

* src/sfnt/sfobjs.c (sfnt_init_face): Recognize TTC here.
2006-02-14 07:01:29 +00:00
Wu, Chia-I (吳佳一) f5aa47beb0 Clean up the SFNT_Interface. Table loading functions are now named
after the tables' tags;  `hdmx' is TrueType-specific and thus the code
is moved to the truetype module; `get_metrics' is moved here from the
truetype module so that the code can be shared with the cff module.

This pass involves no real changes.  That is, the code is moved
verbatim mostly.  The only exception is the return value of
`tt_face_get_metrics'.

* include/freetype/internal/sfnt.h, src/sfnt/rules.mk,
src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.

* src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Metrics-related tables' loading
and parsing code is moved here.
Move `tt_face_get_metrics' here from the truetype module.  The return
value is changed from `void' to `FT_Error'.

* include/freetype/internal/fttrace.h: New trace: ttmtx.

* src/truetype/ttpload.c, src/truetype/ttpload.h: `hdmx' loading and
parsing code is moved here.
New function `tt_face_load_prep' splitted from `tt_face_load_fpgm'.
`tt_face_load_fpgm' returns `FT_Err_Ok' if `fpgm' doesn't exist.

* src/cff/cffgload.c, src/cff/cffobjs.c: Update.

* src/truetype/ttgload.c, src/truetype/ttobjs.c: Update.
2006-02-14 06:40:10 +00:00
Werner Lemberg f1c2b91e14 Formatting, copyright year updates.
Decorate long constants with `L' and `UL' where appropriate.
2006-01-13 14:53:28 +00:00
Wu, Chia-I (吳佳一) fa7d6ab217 * include/freetype/internal/sfnt.h (SFNT_Interface): New method
`load_strike_metrics' used to load the strike's metrics.

* src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'.

* src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly.

* src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for
nominal size unless it is obviously incorrect.

* include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on
FNT driver.


Introduce new size selection interface.

* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_):
Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
`select_size'.

* include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type,
FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c
(FT_Select_Size, FT_Request_Size): API additions to export the new
size selection interface.

* src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use
`FT_Request_Size'.

* include/freetype/internal/ftobjs.h (FT_Match_Size),
src/base/ftobjs.c (FT_Match_Size): New function to match a size
request against `available_sizes'.  Drivers supporting bitmap strikes
can use this function to implement `request_size'.

* src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c,
src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c:
Update to new size selection interface.

* src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c,
src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size
selection interface.
Make `strike_index' FT_ULong and always defined.
Use `load_strike_metrics' provided by SFNT interface.
2006-01-13 12:21:31 +00:00
Werner Lemberg e793092d0a Formatting.
* src/truetype/ttpload.c (tt_face_load_loca): Fix typo.

* src/sfnt/ttkern.c: Include `ttkern.h'.
(FT_COMPONENT): Updated.

* include/freetype/internal/fttrace.h: Add entry for `ttkern'.

* src/sfnt/ttsbit0.c: s/FT_Err_/SFNT_Err_/.
Decorate constants with `U' and `L' where necessary.

* src/sfnt/ttcmap.c (tt_cmap4_next): Remove unused variable.
2005-03-01 02:13:50 +00:00