1999-12-17 00:11:37 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* freetype.h */
|
|
|
|
/* */
|
|
|
|
/* FreeType high-level API and common types (specification only). */
|
|
|
|
/* */
|
2014-02-03 11:07:55 +01:00
|
|
|
/* Copyright 1996-2014 by */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2012-03-10 07:31:58 +01:00
|
|
|
#ifndef __FREETYPE_H__
|
|
|
|
#define __FREETYPE_H__
|
|
|
|
|
|
|
|
|
2003-11-03 21:12:39 +01:00
|
|
|
#ifndef FT_FREETYPE_H
|
2003-11-02 09:58:53 +01:00
|
|
|
#error "`ft2build.h' hasn't been included yet!"
|
|
|
|
#error "Please always use macros to include FreeType header files."
|
|
|
|
#error "Example:"
|
|
|
|
#error " #include <ft2build.h>"
|
|
|
|
#error " #include FT_FREETYPE_H"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-12-04 23:53:55 +01:00
|
|
|
#include <ft2build.h>
|
2000-12-01 00:12:33 +01:00
|
|
|
#include FT_CONFIG_CONFIG_H
|
|
|
|
#include FT_TYPES_H
|
2013-03-14 15:49:49 +01:00
|
|
|
#include FT_ERRORS_H
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_BEGIN_HEADER
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2006-05-12 10:00:13 +02:00
|
|
|
|
2013-12-11 07:48:51 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* header_inclusion */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* FreeType's header inclusion scheme */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* How client applications should include FreeType header files. */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* To be as flexible as possible (and for historical reasons), */
|
|
|
|
/* FreeType uses a very special inclusion scheme to load header */
|
|
|
|
/* files, for example */
|
|
|
|
/* */
|
|
|
|
/* { */
|
|
|
|
/* #include <ft2build.h> */
|
|
|
|
/* */
|
|
|
|
/* #include FT_FREETYPE_H */
|
|
|
|
/* #include FT_OUTLINE_H */
|
|
|
|
/* } */
|
|
|
|
/* */
|
|
|
|
/* A compiler and its preprocessor only needs an include path to find */
|
|
|
|
/* the file `ft2build.h'; the exact locations and names of the other */
|
|
|
|
/* FreeType header files are hidden by preprocessor macro names, */
|
|
|
|
/* loaded by `ft2build.h'. The API documentation always gives the */
|
|
|
|
/* header macro name needed for a particular function. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* user_allocation */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* User allocation */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* How client applications should allocate FreeType data structures. */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* FreeType assumes that structures allocated by the user and passed */
|
2008-10-05 07:46:14 +02:00
|
|
|
/* as arguments are zeroed out except for the actual data. In other */
|
|
|
|
/* words, it is recommended to use `calloc' (or variants of it) */
|
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.
* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.
* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 02:22:46 +02:00
|
|
|
/* instead of `malloc' for allocation. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
2006-05-12 10:00:13 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* B A S I C T Y P E S */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2001-03-04 22:53:08 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* base_interface */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* Base Interface */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The FreeType~2 base font interface. */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2014-11-29 20:07:56 +01:00
|
|
|
/* This section describes the most important public high-level API */
|
|
|
|
/* functions of FreeType~2. */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
|
|
|
/* <Order> */
|
|
|
|
/* FT_Library */
|
|
|
|
/* FT_Face */
|
|
|
|
/* FT_Size */
|
|
|
|
/* FT_GlyphSlot */
|
|
|
|
/* FT_CharMap */
|
|
|
|
/* FT_Encoding */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_ENC_TAG */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
|
|
|
/* FT_FaceRec */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_SCALABLE */
|
|
|
|
/* FT_FACE_FLAG_FIXED_SIZES */
|
|
|
|
/* FT_FACE_FLAG_FIXED_WIDTH */
|
|
|
|
/* FT_FACE_FLAG_HORIZONTAL */
|
|
|
|
/* FT_FACE_FLAG_VERTICAL */
|
2013-07-25 21:53:18 +02:00
|
|
|
/* FT_FACE_FLAG_COLOR */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_FACE_FLAG_SFNT */
|
2013-07-25 21:53:18 +02:00
|
|
|
/* FT_FACE_FLAG_CID_KEYED */
|
|
|
|
/* FT_FACE_FLAG_TRICKY */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_FACE_FLAG_KERNING */
|
|
|
|
/* FT_FACE_FLAG_MULTIPLE_MASTERS */
|
|
|
|
/* FT_FACE_FLAG_GLYPH_NAMES */
|
|
|
|
/* FT_FACE_FLAG_EXTERNAL_STREAM */
|
2005-10-05 17:18:29 +02:00
|
|
|
/* FT_FACE_FLAG_HINTER */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_FACE_FLAG_TRICKY */
|
|
|
|
/* */
|
|
|
|
/* FT_HAS_HORIZONTAL */
|
|
|
|
/* FT_HAS_VERTICAL */
|
|
|
|
/* FT_HAS_KERNING */
|
|
|
|
/* FT_HAS_FIXED_SIZES */
|
|
|
|
/* FT_HAS_GLYPH_NAMES */
|
|
|
|
/* FT_HAS_MULTIPLE_MASTERS */
|
|
|
|
/* FT_HAS_COLOR */
|
|
|
|
/* */
|
|
|
|
/* FT_IS_SFNT */
|
|
|
|
/* FT_IS_SCALABLE */
|
|
|
|
/* FT_IS_FIXED_WIDTH */
|
|
|
|
/* FT_IS_CID_KEYED */
|
|
|
|
/* FT_IS_TRICKY */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
|
|
|
/* FT_STYLE_FLAG_BOLD */
|
|
|
|
/* FT_STYLE_FLAG_ITALIC */
|
|
|
|
/* */
|
|
|
|
/* FT_SizeRec */
|
|
|
|
/* FT_Size_Metrics */
|
|
|
|
/* */
|
|
|
|
/* FT_GlyphSlotRec */
|
|
|
|
/* FT_Glyph_Metrics */
|
|
|
|
/* FT_SubGlyph */
|
|
|
|
/* */
|
|
|
|
/* FT_Bitmap_Size */
|
|
|
|
/* */
|
|
|
|
/* FT_Init_FreeType */
|
|
|
|
/* FT_Done_FreeType */
|
|
|
|
/* */
|
|
|
|
/* FT_New_Face */
|
|
|
|
/* FT_Done_Face */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_Reference_Face */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_New_Memory_Face */
|
|
|
|
/* FT_Open_Face */
|
|
|
|
/* FT_Open_Args */
|
|
|
|
/* FT_Parameter */
|
|
|
|
/* FT_Attach_File */
|
|
|
|
/* FT_Attach_Stream */
|
|
|
|
/* */
|
|
|
|
/* FT_Set_Char_Size */
|
|
|
|
/* FT_Set_Pixel_Sizes */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* FT_Request_Size */
|
|
|
|
/* FT_Select_Size */
|
|
|
|
/* FT_Size_Request_Type */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_Size_RequestRec */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* FT_Size_Request */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_Set_Transform */
|
|
|
|
/* FT_Load_Glyph */
|
|
|
|
/* FT_Get_Char_Index */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_Get_First_Char */
|
|
|
|
/* FT_Get_Next_Char */
|
2001-08-08 13:08:58 +02:00
|
|
|
/* FT_Get_Name_Index */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_Load_Char */
|
|
|
|
/* */
|
2003-06-18 08:59:57 +02:00
|
|
|
/* FT_OPEN_MEMORY */
|
|
|
|
/* FT_OPEN_STREAM */
|
|
|
|
/* FT_OPEN_PATHNAME */
|
|
|
|
/* FT_OPEN_DRIVER */
|
|
|
|
/* FT_OPEN_PARAMS */
|
|
|
|
/* */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_LOAD_DEFAULT */
|
|
|
|
/* FT_LOAD_RENDER */
|
|
|
|
/* FT_LOAD_MONOCHROME */
|
|
|
|
/* FT_LOAD_LINEAR_DESIGN */
|
|
|
|
/* FT_LOAD_NO_SCALE */
|
|
|
|
/* FT_LOAD_NO_HINTING */
|
|
|
|
/* FT_LOAD_NO_BITMAP */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_LOAD_NO_AUTOHINT */
|
|
|
|
/* FT_LOAD_COLOR */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
|
|
|
/* FT_LOAD_VERTICAL_LAYOUT */
|
|
|
|
/* FT_LOAD_IGNORE_TRANSFORM */
|
|
|
|
/* FT_LOAD_FORCE_AUTOHINT */
|
|
|
|
/* FT_LOAD_NO_RECURSE */
|
|
|
|
/* FT_LOAD_PEDANTIC */
|
|
|
|
/* */
|
2003-07-25 07:57:21 +02:00
|
|
|
/* FT_LOAD_TARGET_NORMAL */
|
|
|
|
/* FT_LOAD_TARGET_LIGHT */
|
|
|
|
/* FT_LOAD_TARGET_MONO */
|
|
|
|
/* FT_LOAD_TARGET_LCD */
|
|
|
|
/* FT_LOAD_TARGET_LCD_V */
|
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_LOAD_TARGET_MODE */
|
|
|
|
/* */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_Render_Glyph */
|
|
|
|
/* FT_Render_Mode */
|
|
|
|
/* FT_Get_Kerning */
|
|
|
|
/* FT_Kerning_Mode */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/* FT_Get_Track_Kerning */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_Get_Glyph_Name */
|
2001-12-05 02:22:05 +01:00
|
|
|
/* FT_Get_Postscript_Name */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
|
|
|
/* FT_CharMapRec */
|
|
|
|
/* FT_Select_Charmap */
|
2001-06-28 19:49:10 +02:00
|
|
|
/* FT_Set_Charmap */
|
2004-04-24 16:43:37 +02:00
|
|
|
/* FT_Get_Charmap_Index */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* */
|
2008-12-18 07:32:10 +01:00
|
|
|
/* FT_Get_FSType_Flags */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* FT_Get_SubGlyph_Info */
|
|
|
|
/* */
|
|
|
|
/* FT_Face_Internal */
|
|
|
|
/* FT_Size_Internal */
|
|
|
|
/* FT_Slot_Internal */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_XXX */
|
|
|
|
/* FT_STYLE_FLAG_XXX */
|
|
|
|
/* FT_OPEN_XXX */
|
|
|
|
/* FT_LOAD_XXX */
|
|
|
|
/* FT_LOAD_TARGET_XXX */
|
|
|
|
/* FT_SUBGLYPH_FLAG_XXX */
|
|
|
|
/* FT_FSTYPE_XXX */
|
|
|
|
/* */
|
|
|
|
/* FT_HAS_FAST_GLYPHS */
|
2008-12-18 07:32:10 +01:00
|
|
|
/* */
|
2001-03-04 22:53:08 +01:00
|
|
|
/*************************************************************************/
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Glyph_Metrics */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2003-07-03 15:56:28 +02:00
|
|
|
/* A structure used to model the metrics of a single glyph. The */
|
|
|
|
/* values are expressed in 26.6 fractional pixel format; if the flag */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */
|
|
|
|
/* are expressed in font units instead. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* width :: */
|
|
|
|
/* The glyph's width. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* height :: */
|
|
|
|
/* The glyph's height. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* horiBearingX :: */
|
|
|
|
/* Left side bearing for horizontal layout. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* horiBearingY :: */
|
|
|
|
/* Top side bearing for horizontal layout. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* horiAdvance :: */
|
|
|
|
/* Advance width for horizontal layout. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* vertBearingX :: */
|
|
|
|
/* Left side bearing for vertical layout. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* vertBearingY :: */
|
2011-05-24 06:10:47 +02:00
|
|
|
/* Top side bearing for vertical layout. Larger positive values */
|
|
|
|
/* mean further below the vertical glyph origin. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* vertAdvance :: */
|
2011-05-24 06:10:47 +02:00
|
|
|
/* Advance height for vertical layout. Positive values mean the */
|
|
|
|
/* glyph has a positive advance downward. */
|
2004-06-05 00:30:10 +02:00
|
|
|
/* */
|
2009-11-02 08:12:45 +01:00
|
|
|
/* <Note> */
|
|
|
|
/* If not disabled with @FT_LOAD_NO_HINTING, the values represent */
|
|
|
|
/* dimensions of the hinted glyph (in case hinting is applicable). */
|
|
|
|
/* */
|
2012-05-24 07:05:03 +02:00
|
|
|
/* Stroking a glyph with an outside border does not increase */
|
|
|
|
/* `horiAdvance' or `vertAdvance'; you have to manually adjust these */
|
|
|
|
/* values to account for the added width and height. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_Glyph_Metrics_
|
|
|
|
{
|
2004-06-05 00:30:10 +02:00
|
|
|
FT_Pos width;
|
|
|
|
FT_Pos height;
|
|
|
|
|
|
|
|
FT_Pos horiBearingX;
|
|
|
|
FT_Pos horiBearingY;
|
|
|
|
FT_Pos horiAdvance;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2004-06-05 00:30:10 +02:00
|
|
|
FT_Pos vertBearingX;
|
|
|
|
FT_Pos vertBearingY;
|
|
|
|
FT_Pos vertAdvance;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
} FT_Glyph_Metrics;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Bitmap_Size */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* This structure models the metrics of a bitmap strike (i.e., a set */
|
|
|
|
/* of glyphs for a given point size and resolution) in a bitmap font. */
|
|
|
|
/* It is used for the `available_sizes' field of @FT_Face. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* height :: The vertical distance, in pixels, between two */
|
|
|
|
/* consecutive baselines. It is always positive. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* width :: The average width, in pixels, of all glyphs in the */
|
|
|
|
/* strike. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* size :: The nominal size of the strike in 26.6 fractional */
|
|
|
|
/* points. This field is not very useful. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */
|
|
|
|
/* pixels. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */
|
|
|
|
/* pixels. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* Windows FNT: */
|
* 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 13:21:31 +01:00
|
|
|
/* The nominal size given in a FNT font is not reliable. Thus when */
|
|
|
|
/* the driver finds it incorrect, it sets `size' to some calculated */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* values and sets `x_ppem' and `y_ppem' to the pixel width and */
|
|
|
|
/* height given in the font, respectively. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
|
|
|
/* TrueType embedded bitmaps: */
|
|
|
|
/* `size', `width', and `height' values are not contained in the */
|
|
|
|
/* bitmap strike itself. They are computed from the global font */
|
|
|
|
/* parameters. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_Bitmap_Size_
|
|
|
|
{
|
|
|
|
FT_Short height;
|
|
|
|
FT_Short width;
|
|
|
|
|
2003-07-01 09:28:55 +02:00
|
|
|
FT_Pos size;
|
|
|
|
|
|
|
|
FT_Pos x_ppem;
|
|
|
|
FT_Pos y_ppem;
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} FT_Bitmap_Size;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* O B J E C T C L A S S E S */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Library */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a FreeType library instance. Each `library' is */
|
|
|
|
/* completely independent from the others; it is the `root' of a set */
|
|
|
|
/* of objects like fonts, faces, sizes, etc. */
|
|
|
|
/* */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* It also embeds a memory manager (see @FT_Memory), as well as a */
|
|
|
|
/* scan-line converter object (see @FT_Raster). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2013-06-13 10:45:56 +02:00
|
|
|
/* In multi-threaded applications, make sure that the same FT_Library */
|
|
|
|
/* object or any of its children doesn't get accessed in parallel. */
|
2005-10-12 07:56:01 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* <Note> */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* Library objects are normally created by @FT_Init_FreeType, and */
|
2013-06-11 16:24:13 +02:00
|
|
|
/* destroyed with @FT_Done_FreeType. If you need reference-counting */
|
|
|
|
/* (cf. @FT_Reference_Library), use @FT_New_Library and */
|
|
|
|
/* @FT_Done_Library. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_LibraryRec_ *FT_Library;
|
|
|
|
|
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* module_management */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Module */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* A handle to a given FreeType module object. Each module can be a */
|
|
|
|
/* font driver, a renderer, or anything else that provides services */
|
|
|
|
/* to the formers. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
typedef struct FT_ModuleRec_* FT_Module;
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Driver */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a given FreeType font driver object. Each font driver */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* is a special module capable of creating faces from font files. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_DriverRec_* FT_Driver;
|
|
|
|
|
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Renderer */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* A handle to a given FreeType renderer. A renderer is a special */
|
|
|
|
/* module in charge of converting a glyph image to a bitmap, when */
|
|
|
|
/* necessary. Each renderer supports a given glyph image format, and */
|
|
|
|
/* one or more target surface depths. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
typedef struct FT_RendererRec_* FT_Renderer;
|
|
|
|
|
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* base_interface */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* A handle to a given typographic face object. A face object models */
|
|
|
|
/* a given typeface, in a given style. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* Each face object also owns a single @FT_GlyphSlot object, as well */
|
|
|
|
/* as one or more @FT_Size objects. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* Use @FT_New_Face or @FT_Open_Face to create a new face object from */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* a given filepathname or a custom input stream. */
|
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
|
|
|
/* <Also> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* See @FT_FaceRec for the publicly accessible fields of a given face */
|
|
|
|
/* object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_FaceRec_* FT_Face;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Size */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* A handle to an object used to model a face scaled to a given */
|
|
|
|
/* character size. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* <Note> */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* Each @FT_Face has an _active_ @FT_Size object that is used by */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* functions like @FT_Load_Glyph to determine the scaling */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* transformation that in turn is used to load and hint glyphs and */
|
|
|
|
/* metrics. */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */
|
|
|
|
/* @FT_Request_Size or even @FT_Select_Size to change the content */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* (i.e., the scaling values) of the active @FT_Size. */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* You can use @FT_New_Size to create additional size objects for a */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* given @FT_Face, but they won't be used by other functions until */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* you activate it through @FT_Activate_Size. Only one size can be */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* activated at any given time per face. */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
|
|
|
/* <Also> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* See @FT_SizeRec for the publicly accessible fields of a given size */
|
|
|
|
/* object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_SizeRec_* FT_Size;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_GlyphSlot */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a given `glyph slot'. A slot is a container where it */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* is possible to load any of the glyphs contained in its parent */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* face. */
|
|
|
|
/* */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* In other words, each time you call @FT_Load_Glyph or */
|
|
|
|
/* @FT_Load_Char, the slot's content is erased by the new glyph data, */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* i.e., the glyph's metrics, its image (bitmap or outline), and */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* other control information. */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
|
|
|
/* <Also> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_GlyphSlotRec_* FT_GlyphSlot;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_CharMap */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a given character map. A charmap is used to translate */
|
|
|
|
/* character codes in a given encoding into glyph indexes for its */
|
|
|
|
/* parent's face. Some font formats may provide several charmaps per */
|
|
|
|
/* font. */
|
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* Each face object owns zero or more charmaps, but only one of them */
|
2006-03-24 13:46:49 +01:00
|
|
|
/* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
|
|
|
/* The list of available charmaps in a face is available through the */
|
2006-03-24 13:46:49 +01:00
|
|
|
/* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
2006-03-24 13:46:49 +01:00
|
|
|
/* The currently active charmap is available as `face->charmap'. */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* You should call @FT_Set_Charmap to change it. */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* When a new face is created (either through @FT_New_Face or */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* @FT_Open_Face), the library looks for a Unicode charmap within */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* the list and automatically activates it. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2003-07-09 17:20:32 +02:00
|
|
|
/* <Also> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* See @FT_CharMapRec for the publicly accessible fields of a given */
|
|
|
|
/* character map. */
|
2003-07-09 17:20:32 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_CharMapRec_* FT_CharMap;
|
|
|
|
|
|
|
|
|
2001-06-16 13:20:41 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_ENC_TAG */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* This macro converts four-letter tags into an unsigned long. It is */
|
2006-03-24 13:46:49 +01:00
|
|
|
/* used to define `encoding' identifiers (see @FT_Encoding). */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* */
|
2002-08-18 09:15:52 +02:00
|
|
|
/* <Note> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* Since many 16-bit compilers don't like 32-bit enumerations, you */
|
2002-08-18 09:15:52 +02:00
|
|
|
/* should redefine this macro in case of problems to something like */
|
|
|
|
/* this: */
|
|
|
|
/* */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* { */
|
2004-04-13 23:08:17 +02:00
|
|
|
/* #define FT_ENC_TAG( value, a, b, c, d ) value */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* } */
|
2002-08-18 09:15:52 +02:00
|
|
|
/* */
|
|
|
|
/* to get a simple enumeration without assigning special numbers. */
|
2001-06-16 13:20:41 +02:00
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2001-06-16 13:20:41 +02:00
|
|
|
#ifndef FT_ENC_TAG
|
2002-09-05 17:10:54 +02:00
|
|
|
#define FT_ENC_TAG( value, a, b, c, d ) \
|
|
|
|
value = ( ( (FT_UInt32)(a) << 24 ) | \
|
|
|
|
( (FT_UInt32)(b) << 16 ) | \
|
|
|
|
( (FT_UInt32)(c) << 8 ) | \
|
|
|
|
(FT_UInt32)(d) )
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2001-06-16 13:20:41 +02:00
|
|
|
#endif /* FT_ENC_TAG */
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* FT_Encoding */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* An enumeration used to specify character sets supported by */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* charmaps. Used in the @FT_Select_Charmap API function. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* Despite the name, this enumeration lists specific character */
|
|
|
|
/* repertories (i.e., charsets), and not text encoding methods (e.g., */
|
2009-03-31 18:06:19 +02:00
|
|
|
/* UTF-8, UTF-16, etc.). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-08-27 09:12:40 +02:00
|
|
|
/* Other encodings might be defined in the future. */
|
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* <Values> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_NONE :: */
|
|
|
|
/* The encoding value~0 is reserved. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_UNICODE :: */
|
|
|
|
/* Corresponds to the Unicode character set. This value covers */
|
|
|
|
/* all versions of the Unicode repertoire, including ASCII and */
|
|
|
|
/* Latin-1. Most fonts include a Unicode charmap, but not all */
|
|
|
|
/* of them. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-03-31 18:06:19 +02:00
|
|
|
/* For example, if you want to access Unicode value U+1F028 (and */
|
|
|
|
/* the font contains it), use value 0x1F028 as the input value for */
|
2009-03-31 18:11:55 +02:00
|
|
|
/* @FT_Get_Char_Index. */
|
2009-03-31 18:06:19 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_MS_SYMBOL :: */
|
|
|
|
/* Corresponds to the Microsoft Symbol encoding, used to encode */
|
|
|
|
/* mathematical symbols in the 32..255 character code range. For */
|
2013-06-25 07:48:38 +02:00
|
|
|
/* more information, see */
|
|
|
|
/* `http://www.kostis.net/charsets/symbol.htm'. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_SJIS :: */
|
|
|
|
/* Corresponds to Japanese SJIS encoding. More info at */
|
2013-06-25 07:48:38 +02:00
|
|
|
/* at `http://en.wikipedia.org/wiki/Shift_JIS'. */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* See note on multi-byte encodings below. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_GB2312 :: */
|
|
|
|
/* Corresponds to an encoding system for Simplified Chinese as used */
|
|
|
|
/* used in mainland China. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_BIG5 :: */
|
|
|
|
/* Corresponds to an encoding system for Traditional Chinese as */
|
|
|
|
/* used in Taiwan and Hong Kong. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_WANSUNG :: */
|
|
|
|
/* Corresponds to the Korean encoding system known as Wansung. */
|
|
|
|
/* For more information see */
|
2013-06-25 07:48:38 +02:00
|
|
|
/* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_JOHAB :: */
|
|
|
|
/* The Korean standard character set (KS~C 5601-1992), which */
|
|
|
|
/* corresponds to MS Windows code page 1361. This character set */
|
|
|
|
/* includes all possible Hangeul character combinations. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_ADOBE_LATIN_1 :: */
|
|
|
|
/* Corresponds to a Latin-1 encoding as defined in a Type~1 */
|
|
|
|
/* PostScript font. It is limited to 256 character codes. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_ADOBE_STANDARD :: */
|
|
|
|
/* Corresponds to the Adobe Standard encoding, as found in Type~1, */
|
|
|
|
/* CFF, and OpenType/CFF fonts. It is limited to 256 character */
|
|
|
|
/* codes. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_ADOBE_EXPERT :: */
|
|
|
|
/* Corresponds to the Adobe Expert encoding, as found in Type~1, */
|
|
|
|
/* CFF, and OpenType/CFF fonts. It is limited to 256 character */
|
|
|
|
/* codes. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_ADOBE_CUSTOM :: */
|
|
|
|
/* Corresponds to a custom encoding, as found in Type~1, CFF, and */
|
|
|
|
/* OpenType/CFF fonts. It is limited to 256 character codes. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_APPLE_ROMAN :: */
|
|
|
|
/* Corresponds to the 8-bit Apple roman encoding. Many TrueType */
|
|
|
|
/* and OpenType fonts contain a charmap for this encoding, since */
|
|
|
|
/* older versions of Mac OS are able to use it. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_OLD_LATIN_2 :: */
|
|
|
|
/* This value is deprecated and was never used nor reported by */
|
|
|
|
/* FreeType. Don't use or test for it. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_MS_SJIS :: */
|
|
|
|
/* Same as FT_ENCODING_SJIS. Deprecated. */
|
2003-09-01 09:06:06 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_MS_GB2312 :: */
|
|
|
|
/* Same as FT_ENCODING_GB2312. Deprecated. */
|
2003-09-01 09:06:06 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_MS_BIG5 :: */
|
|
|
|
/* Same as FT_ENCODING_BIG5. Deprecated. */
|
2003-09-01 09:06:06 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_MS_WANSUNG :: */
|
|
|
|
/* Same as FT_ENCODING_WANSUNG. Deprecated. */
|
2003-09-01 09:06:06 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_ENCODING_MS_JOHAB :: */
|
|
|
|
/* Same as FT_ENCODING_JOHAB. Deprecated. */
|
2003-09-01 09:06:06 +02:00
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* <Note> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* By default, FreeType automatically synthesizes a Unicode charmap */
|
|
|
|
/* for PostScript fonts, using their glyph names dictionaries. */
|
|
|
|
/* However, it also reports the encodings defined explicitly in the */
|
|
|
|
/* font file, for the cases when they are needed, with the Adobe */
|
|
|
|
/* values as well. */
|
|
|
|
/* */
|
|
|
|
/* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
|
|
|
|
/* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
|
|
|
|
/* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */
|
|
|
|
/* which encoding is really present. If, for example, the */
|
|
|
|
/* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */
|
|
|
|
/* the font is encoded in KOI8-R. */
|
|
|
|
/* */
|
|
|
|
/* FT_ENCODING_NONE is always set (with a single exception) by the */
|
|
|
|
/* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */
|
|
|
|
/* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */
|
|
|
|
/* which encoding is really present. For example, */
|
|
|
|
/* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */
|
|
|
|
/* Russian). */
|
|
|
|
/* */
|
|
|
|
/* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */
|
|
|
|
/* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */
|
|
|
|
/* FT_ENCODING_APPLE_ROMAN). */
|
|
|
|
/* */
|
|
|
|
/* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* @FT_Get_CMap_Language_ID to query the Mac language ID that may */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* be needed to be able to distinguish Apple encoding variants. See */
|
|
|
|
/* */
|
2013-06-25 07:48:38 +02:00
|
|
|
/* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* */
|
|
|
|
/* to get an idea how to do that. Basically, if the language ID */
|
|
|
|
/* is~0, don't use it, otherwise subtract 1 from the language ID. */
|
|
|
|
/* Then examine `encoding_id'. If, for example, `encoding_id' is */
|
|
|
|
/* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */
|
|
|
|
/* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */
|
|
|
|
/* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */
|
|
|
|
/* variant the Arabic encoding. */
|
2003-12-23 00:01:20 +01:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef enum FT_Encoding_
|
|
|
|
{
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
|
|
|
|
|
2007-05-05 08:26:09 +02:00
|
|
|
FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2003-09-01 09:06:06 +02:00
|
|
|
FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
|
|
|
|
|
|
|
|
/* for backwards compatibility */
|
|
|
|
FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
|
|
|
|
FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312,
|
|
|
|
FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
|
|
|
|
FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
|
|
|
|
FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
|
2001-06-20 10:06:50 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
|
|
|
|
FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
|
2001-06-20 10:06:50 +02:00
|
|
|
|
2002-10-23 11:24:23 +02:00
|
|
|
FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
|
2001-06-20 10:06:50 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
} FT_Encoding;
|
|
|
|
|
2002-09-05 17:10:54 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* these constants are deprecated; use the corresponding `FT_Encoding' */
|
|
|
|
/* values instead */
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
#define ft_encoding_none FT_ENCODING_NONE
|
|
|
|
#define ft_encoding_unicode FT_ENCODING_UNICODE
|
|
|
|
#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
|
|
|
|
#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
|
|
|
|
#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
|
2003-09-01 09:06:06 +02:00
|
|
|
#define ft_encoding_sjis FT_ENCODING_SJIS
|
|
|
|
#define ft_encoding_gb2312 FT_ENCODING_GB2312
|
|
|
|
#define ft_encoding_big5 FT_ENCODING_BIG5
|
|
|
|
#define ft_encoding_wansung FT_ENCODING_WANSUNG
|
|
|
|
#define ft_encoding_johab FT_ENCODING_JOHAB
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
|
|
|
|
#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
|
|
|
|
#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
|
|
|
|
#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
|
|
|
|
#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2002-09-05 17:10:54 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_CharMapRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* The base charmap structure. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* face :: A handle to the parent face object. */
|
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* encoding :: An @FT_Encoding tag identifying the charmap. Use */
|
|
|
|
/* this with @FT_Select_Charmap. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* platform_id :: An ID number describing the platform for the */
|
|
|
|
/* following encoding ID. This comes directly from */
|
|
|
|
/* the TrueType specification and should be emulated */
|
|
|
|
/* for other formats. */
|
|
|
|
/* */
|
|
|
|
/* encoding_id :: A platform specific encoding number. This also */
|
|
|
|
/* comes from the TrueType specification and should be */
|
|
|
|
/* emulated similarly. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_CharMapRec_
|
|
|
|
{
|
|
|
|
FT_Face face;
|
|
|
|
FT_Encoding encoding;
|
|
|
|
FT_UShort platform_id;
|
|
|
|
FT_UShort encoding_id;
|
|
|
|
|
|
|
|
} FT_CharMapRec;
|
|
|
|
|
2002-07-18 17:03:11 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* B A S E O B J E C T C L A S S E S */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Face_Internal */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* An opaque handle to an `FT_Face_InternalRec' structure, used to */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* model private data of a given @FT_Face object. */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* This structure might change between releases of FreeType~2 and is */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* not generally available to client applications. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_Face_InternalRec_* FT_Face_Internal;
|
|
|
|
|
2000-11-04 03:52:02 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_FaceRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* FreeType root face class structure. A face object models a */
|
|
|
|
/* typeface in a font file. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* num_faces :: The number of faces in the font file. Some */
|
|
|
|
/* font formats can have multiple faces in */
|
|
|
|
/* a font file. */
|
|
|
|
/* */
|
|
|
|
/* face_index :: The index of the face in the font file. It */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* is set to~0 if there is only one face in */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* the font file. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* face_flags :: A set of bit flags that give important */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* information about the face; see */
|
|
|
|
/* @FT_FACE_FLAG_XXX for the details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* style_flags :: A set of bit flags indicating the style of */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* the face; see @FT_STYLE_FLAG_XXX for the */
|
|
|
|
/* details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* num_glyphs :: The number of glyphs in the face. If the */
|
|
|
|
/* face is scalable and has sbits (see */
|
|
|
|
/* `num_fixed_sizes'), it is set to the number */
|
|
|
|
/* of outline glyphs. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2008-06-25 23:12:14 +02:00
|
|
|
/* For CID-keyed fonts, this value gives the */
|
|
|
|
/* highest CID used in the font. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* family_name :: The face's family name. This is an ASCII */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* string, usually in English, that describes */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* the typeface's family (like `Times New */
|
|
|
|
/* Roman', `Bodoni', `Garamond', etc). This */
|
|
|
|
/* is a least common denominator used to list */
|
|
|
|
/* fonts. Some formats (TrueType & OpenType) */
|
|
|
|
/* provide localized and Unicode versions of */
|
|
|
|
/* this string. Applications should use the */
|
|
|
|
/* format specific interface to access them. */
|
2008-01-10 11:33:47 +01:00
|
|
|
/* Can be NULL (e.g., in fonts embedded in a */
|
|
|
|
/* PDF file). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* style_name :: The face's style name. This is an ASCII */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* string, usually in English, that describes */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* the typeface's style (like `Italic', */
|
|
|
|
/* `Bold', `Condensed', etc). Not all font */
|
|
|
|
/* formats provide a style name, so this field */
|
|
|
|
/* is optional, and can be set to NULL. As */
|
|
|
|
/* for `family_name', some formats provide */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* localized and Unicode versions of this */
|
|
|
|
/* string. Applications should use the format */
|
|
|
|
/* specific interface to access them. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* num_fixed_sizes :: The number of bitmap strikes in the face. */
|
|
|
|
/* Even if the face is scalable, there might */
|
|
|
|
/* still be bitmap strikes, which are called */
|
|
|
|
/* `sbits' in that case. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */
|
|
|
|
/* strikes in the face. It is set to NULL if */
|
|
|
|
/* there is no bitmap strike. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* num_charmaps :: The number of charmaps in the face. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
2006-01-31 08:01:24 +01:00
|
|
|
/* charmaps :: An array of the charmaps of the face. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
|
|
|
/* generic :: A field reserved for client uses. See the */
|
2002-06-23 12:57:31 +02:00
|
|
|
/* @FT_Generic type description. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* bbox :: The font bounding box. Coordinates are */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* expressed in font units (see */
|
|
|
|
/* `units_per_EM'). The box is large enough */
|
|
|
|
/* to contain any glyph from the font. Thus, */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* `bbox.yMax' can be seen as the `maximum */
|
|
|
|
/* ascender', and `bbox.yMin' as the `minimum */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* descender'. Only relevant for scalable */
|
|
|
|
/* formats. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2008-06-16 07:33:51 +02:00
|
|
|
/* Note that the bounding box might be off by */
|
|
|
|
/* (at least) one pixel for hinted fonts. See */
|
|
|
|
/* @FT_Size_Metrics for further discussion. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* units_per_EM :: The number of font units per EM square for */
|
|
|
|
/* this face. This is typically 2048 for */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* TrueType fonts, and 1000 for Type~1 fonts. */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Only relevant for scalable formats. */
|
|
|
|
/* */
|
|
|
|
/* ascender :: The typographic ascender of the face, */
|
|
|
|
/* expressed in font units. For font formats */
|
|
|
|
/* not having this information, it is set to */
|
|
|
|
/* `bbox.yMax'. Only relevant for scalable */
|
|
|
|
/* formats. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* descender :: The typographic descender of the face, */
|
|
|
|
/* expressed in font units. For font formats */
|
|
|
|
/* not having this information, it is set to */
|
|
|
|
/* `bbox.yMin'. Note that this field is */
|
|
|
|
/* usually negative. Only relevant for */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* scalable formats. */
|
|
|
|
/* */
|
2013-01-24 08:45:29 +01:00
|
|
|
/* height :: This value is the vertical distance */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* between two consecutive baselines, */
|
|
|
|
/* expressed in font units. It is always */
|
|
|
|
/* positive. Only relevant for scalable */
|
|
|
|
/* formats. */
|
|
|
|
/* */
|
2013-01-24 08:45:29 +01:00
|
|
|
/* If you want the global glyph height, use */
|
|
|
|
/* `ascender - descender'. */
|
|
|
|
/* */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* max_advance_width :: The maximum advance width, in font units, */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* for all glyphs in this face. This can be */
|
|
|
|
/* used to make word wrapping computations */
|
|
|
|
/* faster. Only relevant for scalable */
|
|
|
|
/* formats. */
|
|
|
|
/* */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* max_advance_height :: The maximum advance height, in font units, */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* for all glyphs in this face. This is only */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* relevant for vertical layouts, and is set */
|
|
|
|
/* to `height' for fonts that do not provide */
|
|
|
|
/* vertical metrics. Only relevant for */
|
|
|
|
/* scalable formats. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* underline_position :: The position, in font units, of the */
|
2008-10-12 13:47:29 +02:00
|
|
|
/* underline line for this face. It is the */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* center of the underlining stem. Only */
|
|
|
|
/* relevant for scalable formats. */
|
|
|
|
/* */
|
|
|
|
/* underline_thickness :: The thickness, in font units, of the */
|
|
|
|
/* underline for this face. Only relevant for */
|
|
|
|
/* scalable formats. */
|
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* glyph :: The face's associated glyph slot(s). */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* size :: The current active size for this face. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* charmap :: The current active charmap for this face. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
2006-01-31 08:01:24 +01:00
|
|
|
/* <Note> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* Fields may be changed after a call to @FT_Attach_File or */
|
|
|
|
/* @FT_Attach_Stream. */
|
2006-01-31 08:01:24 +01:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_FaceRec_
|
|
|
|
{
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Long num_faces;
|
|
|
|
FT_Long face_index;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Long face_flags;
|
|
|
|
FT_Long style_flags;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Long num_glyphs;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_String* family_name;
|
|
|
|
FT_String* style_name;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Int num_fixed_sizes;
|
|
|
|
FT_Bitmap_Size* available_sizes;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Int num_charmaps;
|
|
|
|
FT_CharMap* charmaps;
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Generic generic;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2006-07-03 14:36:46 +02:00
|
|
|
/*# The following member variables (down to `underline_thickness') */
|
|
|
|
/*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */
|
|
|
|
/*# for bitmap fonts. */
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_BBox bbox;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_UShort units_per_EM;
|
|
|
|
FT_Short ascender;
|
|
|
|
FT_Short descender;
|
|
|
|
FT_Short height;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Short max_advance_width;
|
|
|
|
FT_Short max_advance_height;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Short underline_position;
|
|
|
|
FT_Short underline_thickness;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_GlyphSlot glyph;
|
|
|
|
FT_Size size;
|
|
|
|
FT_CharMap charmap;
|
2000-06-07 22:22:44 +02:00
|
|
|
|
2000-10-23 20:33:30 +02:00
|
|
|
/*@private begin */
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Driver driver;
|
|
|
|
FT_Memory memory;
|
|
|
|
FT_Stream stream;
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_ListRec sizes_list;
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2012-02-11 14:34:05 +01:00
|
|
|
FT_Generic autohint; /* face-specific auto-hinter data */
|
|
|
|
void* extensions; /* unused */
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
FT_Face_Internal internal;
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-10-23 20:33:30 +02:00
|
|
|
/*@private end */
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} FT_FaceRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* <Enum> */
|
|
|
|
/* FT_FACE_FLAG_XXX */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2003-12-13 19:42:31 +01:00
|
|
|
/* A list of bit flags used in the `face_flags' field of the */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* @FT_FaceRec structure. They inform client applications of */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* properties of the corresponding face. */
|
|
|
|
/* */
|
|
|
|
/* <Values> */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_FACE_FLAG_SCALABLE :: */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Indicates that the face contains outline glyphs. This doesn't */
|
|
|
|
/* prevent bitmap strikes, i.e., a face can have both this and */
|
|
|
|
/* and @FT_FACE_FLAG_FIXED_SIZES set. */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_FIXED_SIZES :: */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Indicates that the face contains bitmap strikes. See also the */
|
|
|
|
/* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_FIXED_WIDTH :: */
|
|
|
|
/* Indicates that the face contains fixed-width characters (like */
|
|
|
|
/* Courier, Lucido, MonoType, etc.). */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_SFNT :: */
|
|
|
|
/* Indicates that the face uses the `sfnt' storage scheme. For */
|
|
|
|
/* now, this means TrueType and OpenType. */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_HORIZONTAL :: */
|
|
|
|
/* Indicates that the face contains horizontal glyph metrics. This */
|
|
|
|
/* should be set for all common formats. */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_VERTICAL :: */
|
|
|
|
/* Indicates that the face contains vertical glyph metrics. This */
|
|
|
|
/* is only available in some formats, not all of them. */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_KERNING :: */
|
|
|
|
/* Indicates that the face contains kerning information. If set, */
|
|
|
|
/* the kerning distance can be retrieved through the function */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* @FT_Get_Kerning. Otherwise the function always return the */
|
|
|
|
/* vector (0,0). Note that FreeType doesn't handle kerning data */
|
|
|
|
/* from the `GPOS' table (as present in some OpenType fonts). */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_FAST_GLYPHS :: */
|
|
|
|
/* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_MULTIPLE_MASTERS :: */
|
|
|
|
/* Indicates that the font contains multiple masters and is capable */
|
|
|
|
/* of interpolating between them. See the multiple-masters */
|
|
|
|
/* specific API for details. */
|
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_GLYPH_NAMES :: */
|
|
|
|
/* Indicates that the font contains glyph names that can be */
|
* src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in
computation of glyph_index.
(FNT_Size_Set_Pixels): To find a strike, first check pixel_height
only, then try to find a better hit by comparing pixel_width also.
Without this fix it isn't possible to access all strikes.
Also compute metrics.max_advance to be in sync with other bitmap
drivers.
* src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
(FT_Set_Pixel_Size): Assign value to `metrics' after validation of
arguments.
Synchronize computation of height and width for bitmap strikes. The
`width' field in the FT_Bitmap_Size structure is now only useful to
enumerate different strikes. The `max_advance' field of the
FT_Size_Metrics structure should be used to get the (maximum) width
of a strike.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.
* src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.
* src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single
argument to function.
* src/psnames/psmodule.c (ps_unicode_value): Handle `.' after
`uniXXXX' and `uXXXX[X[X]]'.
* src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/.
* src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c:
s/FT_Err_/FTC_Err_/.
* src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/.
* src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/.
* src/psaux/t1cmap.c: Include psauxerr.h.
s/FT_Err_/PSaux_Err_/.
* src/pshinter/pshnterr.h: New file.
* src/pshinter/rules.mk: Updated.
* src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h.
s/FT_Err_/PSH_Err_/.
* src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c:
s/FT_Err_/PFR_Err_/.
* src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/.
* src/truetype/ttgload.c: s/FT_Err_/TT_Err_/.
* src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define
FT_ERR_PREFIX and FT_ERR_BASE.
s/FT_Err_/Gzip_Err_/.
2003-06-22 17:33:53 +02:00
|
|
|
/* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* fonts contain broken glyph name tables. Use the function */
|
2003-07-25 07:57:21 +02:00
|
|
|
/* @FT_Has_PS_Glyph_Names when needed. */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* */
|
|
|
|
/* FT_FACE_FLAG_EXTERNAL_STREAM :: */
|
|
|
|
/* Used internally by FreeType to indicate that a face's stream was */
|
|
|
|
/* provided by the client application and should not be destroyed */
|
|
|
|
/* when @FT_Done_Face is called. Don't read or test this flag. */
|
|
|
|
/* */
|
2005-10-05 17:18:29 +02:00
|
|
|
/* FT_FACE_FLAG_HINTER :: */
|
|
|
|
/* Set if the font driver has a hinting machine of its own. For */
|
|
|
|
/* example, with TrueType fonts, it makes sense to use data from */
|
|
|
|
/* the SFNT `gasp' table only if the native TrueType hinting engine */
|
|
|
|
/* (with the bytecode interpreter) is available and active. */
|
|
|
|
/* */
|
2008-04-01 07:55:48 +02:00
|
|
|
/* FT_FACE_FLAG_CID_KEYED :: */
|
|
|
|
/* Set if the font is CID-keyed. In that case, the font is not */
|
|
|
|
/* accessed by glyph indices but by CID values. For subsetted */
|
|
|
|
/* CID-keyed fonts this has the consequence that not all index */
|
|
|
|
/* values are a valid argument to FT_Load_Glyph. Only the CID */
|
|
|
|
/* values for which corresponding glyphs in the subsetted font */
|
|
|
|
/* exist make FT_Load_Glyph return successfully; in all other cases */
|
|
|
|
/* you get an `FT_Err_Invalid_Argument' error. */
|
|
|
|
/* */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* Note that CID-keyed fonts that are in an SFNT wrapper don't */
|
2008-07-16 09:05:11 +02:00
|
|
|
/* have this flag set since the glyphs are accessed in the normal */
|
|
|
|
/* way (using contiguous indices); the `CID-ness' isn't visible to */
|
|
|
|
/* the application. */
|
|
|
|
/* */
|
2008-12-11 09:55:48 +01:00
|
|
|
/* FT_FACE_FLAG_TRICKY :: */
|
|
|
|
/* Set if the font is `tricky', this is, it always needs the */
|
|
|
|
/* font format's native hinting engine to get a reasonable result. */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* A typical example is the Chinese font `mingli.ttf' that uses */
|
2008-12-11 09:55:48 +01:00
|
|
|
/* TrueType bytecode instructions to move and scale all of its */
|
|
|
|
/* subglyphs. */
|
|
|
|
/* */
|
|
|
|
/* It is not possible to autohint such fonts using */
|
|
|
|
/* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
|
2011-04-13 00:29:41 +02:00
|
|
|
/* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */
|
2008-12-11 09:55:48 +01:00
|
|
|
/* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
|
|
|
|
/* probably never want this except for demonstration purposes. */
|
|
|
|
/* */
|
2011-06-30 06:20:30 +02:00
|
|
|
/* Currently, there are about a dozen TrueType fonts in the list of */
|
|
|
|
/* tricky fonts; they are hard-coded in file `ttobjs.c'. */
|
2008-12-11 09:55:48 +01:00
|
|
|
/* */
|
2013-07-25 21:53:18 +02:00
|
|
|
/* FT_FACE_FLAG_COLOR :: */
|
|
|
|
/* Set if the font has color glyph tables. To access color glyphs */
|
|
|
|
/* use @FT_LOAD_COLOR. */
|
|
|
|
/* */
|
2002-09-05 17:10:54 +02:00
|
|
|
#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
|
|
|
|
#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
|
|
|
|
#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
|
|
|
|
#define FT_FACE_FLAG_SFNT ( 1L << 3 )
|
|
|
|
#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 )
|
|
|
|
#define FT_FACE_FLAG_VERTICAL ( 1L << 5 )
|
|
|
|
#define FT_FACE_FLAG_KERNING ( 1L << 6 )
|
|
|
|
#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 )
|
|
|
|
#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 )
|
|
|
|
#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 )
|
|
|
|
#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 )
|
2005-10-05 17:18:29 +02:00
|
|
|
#define FT_FACE_FLAG_HINTER ( 1L << 11 )
|
2008-04-01 07:55:48 +02:00
|
|
|
#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
|
2008-12-11 09:55:48 +01:00
|
|
|
#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
|
2013-07-25 21:53:18 +02:00
|
|
|
#define FT_FACE_FLAG_COLOR ( 1L << 14 )
|
2001-04-02 23:30:06 +02:00
|
|
|
|
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_HORIZONTAL( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains
|
|
|
|
* horizontal metrics (this is true for all font formats though).
|
|
|
|
*
|
|
|
|
* @also:
|
|
|
|
* @FT_HAS_VERTICAL can be used to check for vertical metrics.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_HAS_HORIZONTAL( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_VERTICAL( face )
|
|
|
|
*
|
|
|
|
* @description:
|
2012-10-07 22:36:46 +02:00
|
|
|
* A macro that returns true whenever a face object contains real
|
|
|
|
* vertical metrics (and not only synthesized ones).
|
2005-10-27 23:28:35 +02:00
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_HAS_VERTICAL( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_VERTICAL )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_KERNING( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains kerning
|
|
|
|
* data that can be accessed with @FT_Get_Kerning.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_HAS_KERNING( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_KERNING )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_IS_SCALABLE( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains a scalable
|
2008-06-26 21:56:51 +02:00
|
|
|
* font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,
|
2005-11-30 22:05:32 +01:00
|
|
|
* and PFR font formats.
|
2005-10-27 23:28:35 +02:00
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_IS_SCALABLE( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_SCALABLE )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-03-23 19:19:04 +01:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_IS_SFNT( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains a font
|
|
|
|
* whose format is based on the SFNT storage scheme. This usually
|
|
|
|
* means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded
|
|
|
|
* bitmap fonts.
|
|
|
|
*
|
|
|
|
* If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
|
|
|
|
* @FT_TRUETYPE_TABLES_H are available.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_IS_SFNT( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_SFNT )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_IS_FIXED_WIDTH( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains a font face
|
|
|
|
* that contains fixed-width (or `monospace', `fixed-pitch', etc.)
|
|
|
|
* glyphs.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_IS_FIXED_WIDTH( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-03-23 19:19:04 +01:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_FIXED_SIZES( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains some
|
|
|
|
* embedded bitmaps. See the `available_sizes' field of the
|
|
|
|
* @FT_FaceRec structure.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_HAS_FIXED_SIZES( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_FAST_GLYPHS( face )
|
|
|
|
*
|
|
|
|
* @description:
|
2006-04-22 14:24:52 +02:00
|
|
|
* Deprecated.
|
2005-10-27 23:28:35 +02:00
|
|
|
*
|
|
|
|
*/
|
2006-04-22 14:24:52 +02:00
|
|
|
#define FT_HAS_FAST_GLYPHS( face ) 0
|
2000-10-23 20:33:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_GLYPH_NAMES( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains some glyph
|
|
|
|
* names that can be accessed through @FT_Get_Glyph_Name.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-19 19:13:03 +02:00
|
|
|
#define FT_HAS_GLYPH_NAMES( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2001-04-02 23:30:06 +02:00
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_MULTIPLE_MASTERS( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains some
|
|
|
|
* multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H
|
|
|
|
* are then available to choose the exact design you want.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-09 21:15:30 +02:00
|
|
|
#define FT_HAS_MULTIPLE_MASTERS( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2008-04-01 07:55:48 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_IS_CID_KEYED( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains a CID-keyed
|
|
|
|
* font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more
|
|
|
|
* details.
|
|
|
|
*
|
|
|
|
* If this macro is true, all functions defined in @FT_CID_H are
|
|
|
|
* available.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define FT_IS_CID_KEYED( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_CID_KEYED )
|
|
|
|
|
|
|
|
|
2008-12-11 09:55:48 +01:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_IS_TRICKY( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face represents a `tricky' font.
|
|
|
|
* See the discussion of @FT_FACE_FLAG_TRICKY for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define FT_IS_TRICKY( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_TRICKY )
|
|
|
|
|
|
|
|
|
2013-07-25 21:53:18 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_HAS_COLOR( face )
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A macro that returns true whenever a face object contains
|
|
|
|
* tables for color glyphs.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define FT_HAS_COLOR( face ) \
|
|
|
|
( face->face_flags & FT_FACE_FLAG_COLOR )
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2008-09-12 18:27:48 +02:00
|
|
|
/* <Const> */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* FT_STYLE_FLAG_XXX */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* A list of bit-flags used to indicate the style of a given face. */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* These are used in the `style_flags' field of @FT_FaceRec. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* <Values> */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_STYLE_FLAG_ITALIC :: */
|
2007-10-21 10:12:30 +02:00
|
|
|
/* Indicates that a given face style is italic or oblique. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_STYLE_FLAG_BOLD :: */
|
|
|
|
/* Indicates that a given face is bold. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
2007-10-21 10:12:30 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* The style information as provided by FreeType is very basic. More */
|
|
|
|
/* details are beyond the scope and should be done on a higher level */
|
|
|
|
/* (for example, by analyzing various fields of the `OS/2' table in */
|
|
|
|
/* SFNT based fonts). */
|
|
|
|
/* */
|
2002-09-05 17:10:54 +02:00
|
|
|
#define FT_STYLE_FLAG_ITALIC ( 1 << 0 )
|
|
|
|
#define FT_STYLE_FLAG_BOLD ( 1 << 1 )
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Size_Internal */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* An opaque handle to an `FT_Size_InternalRec' structure, used to */
|
2008-05-31 09:03:30 +02:00
|
|
|
/* model private data of a given @FT_Size object. */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_Size_InternalRec_* FT_Size_Internal;
|
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Size_Metrics */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The size metrics structure gives the metrics of a size object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* x_ppem :: The width of the scaled EM square in pixels, hence */
|
|
|
|
/* the term `ppem' (pixels per EM). It is also */
|
|
|
|
/* referred to as `nominal width'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* y_ppem :: The height of the scaled EM square in pixels, */
|
|
|
|
/* hence the term `ppem' (pixels per EM). It is also */
|
2006-01-15 08:30:32 +01:00
|
|
|
/* referred to as `nominal height'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* x_scale :: A 16.16 fractional scaling value used to convert */
|
2006-01-15 07:00:49 +01:00
|
|
|
/* horizontal metrics from font units to 26.6 */
|
|
|
|
/* fractional pixels. Only relevant for scalable */
|
2006-01-15 08:30:32 +01:00
|
|
|
/* font formats. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* y_scale :: A 16.16 fractional scaling value used to convert */
|
|
|
|
/* vertical metrics from font units to 26.6 */
|
|
|
|
/* fractional pixels. Only relevant for scalable */
|
|
|
|
/* font formats. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* ascender :: The ascender in 26.6 fractional pixels. See */
|
|
|
|
/* @FT_FaceRec for the details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* descender :: The descender in 26.6 fractional pixels. See */
|
|
|
|
/* @FT_FaceRec for the details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* height :: The height in 26.6 fractional pixels. See */
|
|
|
|
/* @FT_FaceRec for the details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* max_advance :: The maximum advance width in 26.6 fractional */
|
2006-01-15 07:00:49 +01:00
|
|
|
/* pixels. See @FT_FaceRec for the details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* The scaling values, if relevant, are determined first during a */
|
|
|
|
/* size changing operation. The remaining fields are then set by the */
|
2006-01-15 08:30:32 +01:00
|
|
|
/* driver. For scalable formats, they are usually set to scaled */
|
|
|
|
/* values of the corresponding fields in @FT_FaceRec. */
|
2000-06-01 08:01:59 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Note that due to glyph hinting, these values might not be exact */
|
|
|
|
/* for certain fonts. Thus they must be treated as unreliable */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* with an error margin of at least one pixel! */
|
2000-06-01 08:01:59 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Indeed, the only way to get the exact metrics is to render _all_ */
|
|
|
|
/* glyphs. As this would be a definite performance hit, it is up to */
|
|
|
|
/* client applications to perform such computations. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-07-03 11:40:15 +02:00
|
|
|
/* The FT_Size_Metrics structure is valid for bitmap fonts also. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_Size_Metrics_
|
|
|
|
{
|
2000-11-04 03:52:02 +01:00
|
|
|
FT_UShort x_ppem; /* horizontal pixels per EM */
|
|
|
|
FT_UShort y_ppem; /* vertical pixels per EM */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2006-05-12 06:00:44 +02:00
|
|
|
FT_Fixed x_scale; /* scaling values used to convert font */
|
|
|
|
FT_Fixed y_scale; /* units to 26.6 fractional pixels */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-04 03:52:02 +01:00
|
|
|
FT_Pos ascender; /* ascender in 26.6 frac. pixels */
|
|
|
|
FT_Pos descender; /* descender in 26.6 frac. pixels */
|
|
|
|
FT_Pos height; /* text height in 26.6 frac. pixels */
|
|
|
|
FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
} FT_Size_Metrics;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_SizeRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* FreeType root size class structure. A size object models a face */
|
|
|
|
/* object at a given size. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* face :: Handle to the parent face object. */
|
|
|
|
/* */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* generic :: A typeless pointer, unused by the FreeType library or */
|
|
|
|
/* any of its drivers. It can be used by client */
|
|
|
|
/* applications to link their own data to each size */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* object. */
|
|
|
|
/* */
|
|
|
|
/* metrics :: Metrics for this size object. This field is read-only. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_SizeRec_
|
|
|
|
{
|
2000-11-04 03:52:02 +01:00
|
|
|
FT_Face face; /* parent face object */
|
|
|
|
FT_Generic generic; /* generic pointer for client uses */
|
|
|
|
FT_Size_Metrics metrics; /* size metrics */
|
|
|
|
FT_Size_Internal internal;
|
2001-06-28 19:49:10 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} FT_SizeRec;
|
|
|
|
|
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_SubGlyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The subglyph structure is an internal object used to describe */
|
|
|
|
/* subglyphs (for example, in the case of composites). */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* The subglyph implementation is not part of the high-level API, */
|
|
|
|
/* hence the forward structure declaration. */
|
|
|
|
/* */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* You can however retrieve subglyph information with */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* @FT_Get_SubGlyph_Info. */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* */
|
2002-03-14 13:56:35 +01:00
|
|
|
typedef struct FT_SubGlyphRec_* FT_SubGlyph;
|
2000-04-04 18:46:12 +02:00
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Slot_Internal */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* An opaque handle to an `FT_Slot_InternalRec' structure, used to */
|
2008-05-31 09:03:30 +02:00
|
|
|
/* model private data of a given @FT_GlyphSlot object. */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_Slot_InternalRec_* FT_Slot_Internal;
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-10 16:24:26 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_GlyphSlotRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* FreeType root glyph slot class structure. A glyph slot is a */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* container where individual glyphs can be loaded, be they in */
|
|
|
|
/* outline or bitmap format. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* library :: A handle to the FreeType library instance */
|
|
|
|
/* this slot belongs to. */
|
2000-07-01 01:12:55 +02:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* face :: A handle to the parent face object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* next :: In some cases (like some font tools), several */
|
|
|
|
/* glyph slots per face object can be a good */
|
|
|
|
/* thing. As this is rare, the glyph slots are */
|
|
|
|
/* listed through a direct, single-linked list */
|
|
|
|
/* using its `next' field. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* generic :: A typeless pointer unused by the FreeType */
|
|
|
|
/* library or any of its drivers. It can be */
|
|
|
|
/* used by client applications to link their own */
|
|
|
|
/* data to each glyph slot object. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* metrics :: The metrics of the last loaded glyph in the */
|
|
|
|
/* slot. The returned values depend on the last */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* load flags (see the @FT_Load_Glyph API */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* function) and can be expressed either in 26.6 */
|
|
|
|
/* fractional pixels or font units. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* Note that even when the glyph image is */
|
|
|
|
/* transformed, the metrics are not. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2006-01-15 07:00:49 +01:00
|
|
|
/* linearHoriAdvance :: The advance width of the unhinted glyph. */
|
|
|
|
/* Its value is expressed in 16.16 fractional */
|
|
|
|
/* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */
|
|
|
|
/* when loading the glyph. This field can be */
|
2000-10-07 17:51:50 +02:00
|
|
|
/* important to perform correct WYSIWYG layout. */
|
2006-01-15 07:00:49 +01:00
|
|
|
/* Only relevant for outline glyphs. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2006-01-15 07:00:49 +01:00
|
|
|
/* linearVertAdvance :: The advance height of the unhinted glyph. */
|
|
|
|
/* Its value is expressed in 16.16 fractional */
|
|
|
|
/* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */
|
|
|
|
/* when loading the glyph. This field can be */
|
|
|
|
/* important to perform correct WYSIWYG layout. */
|
|
|
|
/* Only relevant for outline glyphs. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2009-11-02 08:12:45 +01:00
|
|
|
/* advance :: This shorthand is, depending on */
|
|
|
|
/* @FT_LOAD_IGNORE_TRANSFORM, the transformed */
|
2013-10-22 10:42:38 +02:00
|
|
|
/* (hinted) advance width for the glyph, in 26.6 */
|
|
|
|
/* fractional pixel format. As specified with */
|
2009-11-02 08:12:45 +01:00
|
|
|
/* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */
|
|
|
|
/* `horiAdvance' or the `vertAdvance' value of */
|
|
|
|
/* `metrics' field. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* format :: This field indicates the format of the image */
|
|
|
|
/* contained in the glyph slot. Typically */
|
2006-03-24 12:54:53 +01:00
|
|
|
/* @FT_GLYPH_FORMAT_BITMAP, */
|
|
|
|
/* @FT_GLYPH_FORMAT_OUTLINE, or */
|
|
|
|
/* @FT_GLYPH_FORMAT_COMPOSITE, but others are */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* possible. */
|
|
|
|
/* */
|
|
|
|
/* bitmap :: This field is used as a bitmap descriptor */
|
|
|
|
/* when the slot format is */
|
2006-03-24 12:54:53 +01:00
|
|
|
/* @FT_GLYPH_FORMAT_BITMAP. Note that the */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* address and content of the bitmap buffer can */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* change between calls of @FT_Load_Glyph and a */
|
|
|
|
/* few other functions. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2014-10-16 23:32:42 +02:00
|
|
|
/* bitmap_left :: The bitmap's left bearing expressed in */
|
|
|
|
/* integer pixels. Only valid if the format is */
|
|
|
|
/* @FT_GLYPH_FORMAT_BITMAP, this is, if the */
|
|
|
|
/* glyph slot contains a bitmap. */
|
|
|
|
/* */
|
|
|
|
/* bitmap_top :: The bitmap's top bearing expressed in integer */
|
|
|
|
/* pixels. Remember that this is the distance */
|
|
|
|
/* from the baseline to the top-most glyph */
|
|
|
|
/* scanline, upwards y~coordinates being */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* *positive*. */
|
|
|
|
/* */
|
|
|
|
/* outline :: The outline descriptor for the current glyph */
|
|
|
|
/* image if its format is */
|
2006-03-24 12:54:53 +01:00
|
|
|
/* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */
|
2006-02-15 07:05:52 +01:00
|
|
|
/* loaded, `outline' can be transformed, */
|
|
|
|
/* distorted, embolded, etc. However, it must */
|
|
|
|
/* not be freed. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* num_subglyphs :: The number of subglyphs in a composite glyph. */
|
2003-07-03 15:56:28 +02:00
|
|
|
/* This field is only valid for the composite */
|
|
|
|
/* glyph format that should normally only be */
|
2003-07-25 07:57:21 +02:00
|
|
|
/* loaded with the @FT_LOAD_NO_RECURSE flag. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* subglyphs :: An array of subglyph descriptors for */
|
|
|
|
/* composite glyphs. There are `num_subglyphs' */
|
2003-07-03 15:56:28 +02:00
|
|
|
/* elements in there. Currently internal to */
|
|
|
|
/* FreeType. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* control_data :: Certain font drivers can also return the */
|
|
|
|
/* control data for a given glyph image (e.g. */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* TrueType bytecode, Type~1 charstrings, etc.). */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* This field is a pointer to such data. */
|
|
|
|
/* */
|
|
|
|
/* control_len :: This is the length in bytes of the control */
|
|
|
|
/* data. */
|
|
|
|
/* */
|
|
|
|
/* other :: Really wicked formats can use this pointer to */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* present their own glyph image to client */
|
|
|
|
/* applications. Note that the application */
|
|
|
|
/* needs to know about the image format. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* lsb_delta :: The difference between hinted and unhinted */
|
|
|
|
/* left side bearing while autohinting is */
|
|
|
|
/* active. Zero otherwise. */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* rsb_delta :: The difference between hinted and unhinted */
|
|
|
|
/* right side bearing while autohinting is */
|
|
|
|
/* active. Zero otherwise. */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* <Note> */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* If @FT_Load_Glyph is called with default flags (see */
|
|
|
|
/* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* its native format (e.g., an outline glyph for TrueType and Type~1 */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* formats). */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
/* This image can later be converted into a bitmap by calling */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* @FT_Render_Glyph. This function finds the current renderer for */
|
2008-12-16 14:12:18 +01:00
|
|
|
/* the native image's format, then invokes it. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
/* The renderer is in charge of transforming the native image through */
|
2008-12-16 14:12:18 +01:00
|
|
|
/* the slot's face transformation fields, then converting it into a */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* bitmap that is returned in `slot->bitmap'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
|
|
|
|
/* to specify the position of the bitmap relative to the current pen */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* position (e.g., coordinates (0,0) on the baseline). Of course, */
|
2006-03-24 12:54:53 +01:00
|
|
|
/* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* <Note> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* Here a small pseudo code fragment that shows how to use */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* `lsb_delta' and `rsb_delta': */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* { */
|
|
|
|
/* FT_Pos origin_x = 0; */
|
|
|
|
/* FT_Pos prev_rsb_delta = 0; */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* for all glyphs do */
|
|
|
|
/* <compute kern between current and previous glyph and add it to */
|
|
|
|
/* `origin_x'> */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* <load glyph with `FT_Load_Glyph'> */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */
|
|
|
|
/* origin_x -= 64; */
|
|
|
|
/* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */
|
|
|
|
/* origin_x += 64; */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* prev_rsb_delta = face->glyph->rsb_delta; */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
2004-06-12 15:21:20 +02:00
|
|
|
/* <save glyph image, or render glyph, or ...> */
|
|
|
|
/* */
|
|
|
|
/* origin_x += face->glyph->advance.x; */
|
|
|
|
/* endfor */
|
|
|
|
/* } */
|
2004-06-09 22:18:35 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_GlyphSlotRec_
|
|
|
|
{
|
2000-07-01 01:12:55 +02:00
|
|
|
FT_Library library;
|
1999-12-17 00:11:37 +01:00
|
|
|
FT_Face face;
|
|
|
|
FT_GlyphSlot next;
|
2003-07-26 08:08:14 +02:00
|
|
|
FT_UInt reserved; /* retained for binary compatibility */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
FT_Generic generic;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
FT_Glyph_Metrics metrics;
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
FT_Fixed linearHoriAdvance;
|
|
|
|
FT_Fixed linearVertAdvance;
|
|
|
|
FT_Vector advance;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-03-28 13:22:31 +02:00
|
|
|
FT_Glyph_Format format;
|
2000-07-10 16:24:26 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
FT_Bitmap bitmap;
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
FT_Int bitmap_left;
|
|
|
|
FT_Int bitmap_top;
|
2000-07-10 16:24:26 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
FT_Outline outline;
|
2000-04-04 18:46:12 +02:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
FT_UInt num_subglyphs;
|
2002-03-14 13:56:35 +01:00
|
|
|
FT_SubGlyph subglyphs;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
void* control_data;
|
2000-04-25 18:08:33 +02:00
|
|
|
long control_len;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2004-06-09 22:18:35 +02:00
|
|
|
FT_Pos lsb_delta;
|
|
|
|
FT_Pos rsb_delta;
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
void* other;
|
|
|
|
|
2000-11-04 03:52:02 +01:00
|
|
|
FT_Slot_Internal internal;
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} FT_GlyphSlotRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* F U N C T I O N S */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Init_FreeType */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Initialize a new FreeType library object. The set of modules */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* that are registered by this function is determined at build time. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* alibrary :: A handle to a new library object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2009-06-25 16:47:10 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* In case you want to provide your own memory allocating routines, */
|
|
|
|
/* use @FT_New_Library instead, followed by a call to */
|
|
|
|
/* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */
|
|
|
|
/* */
|
2012-01-27 20:51:27 +01:00
|
|
|
/* For multi-threading applications each thread should have its own */
|
|
|
|
/* FT_Library object. */
|
|
|
|
/* */
|
2013-06-11 16:24:13 +02:00
|
|
|
/* If you need reference-counting (cf. @FT_Reference_Library), use */
|
|
|
|
/* @FT_New_Library and @FT_Done_Library. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Init_FreeType( FT_Library *alibrary );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Done_FreeType */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2007-01-29 15:49:59 +01:00
|
|
|
/* Destroy a given FreeType library object and all of its children, */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* including resources, drivers, faces, sizes, etc. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* library :: A handle to the target library object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Done_FreeType( FT_Library library );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-03-28 13:22:31 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Enum> */
|
2003-06-18 08:59:57 +02:00
|
|
|
/* FT_OPEN_XXX */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2003-06-18 08:59:57 +02:00
|
|
|
/* A list of bit-field constants used within the `flags' field of the */
|
|
|
|
/* @FT_Open_Args structure. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
2003-06-18 08:59:57 +02:00
|
|
|
/* <Values> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_OPEN_MEMORY :: This is a memory-based stream. */
|
2000-03-28 13:22:31 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */
|
|
|
|
/* name. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_OPEN_DRIVER :: Use the `driver' field. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* <Note> */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
|
2001-08-22 20:35:06 +02:00
|
|
|
/* flags are mutually exclusive. */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* */
|
2003-06-18 08:59:57 +02:00
|
|
|
#define FT_OPEN_MEMORY 0x1
|
|
|
|
#define FT_OPEN_STREAM 0x2
|
|
|
|
#define FT_OPEN_PATHNAME 0x4
|
|
|
|
#define FT_OPEN_DRIVER 0x8
|
|
|
|
#define FT_OPEN_PARAMS 0x10
|
2000-05-12 12:19:41 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
|
|
|
|
/* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */
|
|
|
|
/* values instead */
|
2014-12-03 10:14:24 +01:00
|
|
|
#define ft_open_memory FT_OPEN_MEMORY
|
|
|
|
#define ft_open_stream FT_OPEN_STREAM
|
|
|
|
#define ft_open_pathname FT_OPEN_PATHNAME
|
|
|
|
#define ft_open_driver FT_OPEN_DRIVER
|
|
|
|
#define ft_open_params FT_OPEN_PARAMS
|
2000-05-12 12:19:41 +02:00
|
|
|
|
2002-09-05 17:10:54 +02:00
|
|
|
|
2000-05-12 12:19:41 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Struct> */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* FT_Parameter */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* A simple structure used to pass more or less generic parameters to */
|
|
|
|
/* @FT_Open_Face. */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* tag :: A four-byte identification tag. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* data :: A pointer to the parameter data. */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2010-02-11 14:57:59 +01:00
|
|
|
/* The ID and function of parameters are driver-specific. See the */
|
|
|
|
/* various FT_PARAM_TAG_XXX flags for more information. */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
typedef struct FT_Parameter_
|
2000-05-12 12:19:41 +02:00
|
|
|
{
|
2000-07-09 21:15:30 +02:00
|
|
|
FT_ULong tag;
|
|
|
|
FT_Pointer data;
|
2000-05-12 12:19:41 +02:00
|
|
|
|
|
|
|
} FT_Parameter;
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Open_Args */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* A structure used to indicate how to open a new font file or */
|
|
|
|
/* stream. A pointer to such a structure can be used as a parameter */
|
|
|
|
/* for the functions @FT_Open_Face and @FT_Attach_Stream. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* flags :: A set of bit flags indicating how to use the */
|
|
|
|
/* structure. */
|
|
|
|
/* */
|
|
|
|
/* memory_base :: The first byte of the file in memory. */
|
|
|
|
/* */
|
|
|
|
/* memory_size :: The size in bytes of the file in memory. */
|
|
|
|
/* */
|
|
|
|
/* pathname :: A pointer to an 8-bit file pathname. */
|
|
|
|
/* */
|
|
|
|
/* stream :: A handle to a source stream object. */
|
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* driver :: This field is exclusively used by @FT_Open_Face; */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* it simply specifies the font driver to use to open */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* the face. If set to~0, FreeType tries to load the */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* face with each one of the drivers in its list. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* num_params :: The number of extra parameters. */
|
|
|
|
/* */
|
|
|
|
/* params :: Extra parameters passed to the font driver when */
|
|
|
|
/* opening a new face. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* The stream type is determined by the contents of `flags' that */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* are tested in the following order by @FT_Open_Face: */
|
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* If the @FT_OPEN_MEMORY bit is set, assume that this is a */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* memory file of `memory_size' bytes, located at `memory_address'. */
|
|
|
|
/* The data are are not copied, and the client is responsible for */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* releasing and destroying them _after_ the corresponding call to */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* @FT_Done_Face. */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a */
|
2001-08-22 20:35:06 +02:00
|
|
|
/* custom input stream `stream' is used. */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this */
|
2001-08-22 20:35:06 +02:00
|
|
|
/* is a normal file and use `pathname' to open it. */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* open the file with the driver whose handler is in `driver'. */
|
2001-08-21 10:50:45 +02:00
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* If the @FT_OPEN_PARAMS bit is set, the parameters given by */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* `num_params' and `params' is used. They are ignored otherwise. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2007-01-31 00:08:50 +01:00
|
|
|
/* Ideally, both the `pathname' and `params' fields should be tagged */
|
2008-10-05 07:46:14 +02:00
|
|
|
/* as `const'; this is missing for API backwards compatibility. In */
|
2007-01-31 00:08:50 +01:00
|
|
|
/* other words, applications should treat them as read-only. */
|
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
typedef struct FT_Open_Args_
|
2000-02-10 18:03:11 +01:00
|
|
|
{
|
2003-06-18 08:59:57 +02:00
|
|
|
FT_UInt flags;
|
|
|
|
const FT_Byte* memory_base;
|
|
|
|
FT_Long memory_size;
|
|
|
|
FT_String* pathname;
|
|
|
|
FT_Stream stream;
|
|
|
|
FT_Module driver;
|
|
|
|
FT_Int num_params;
|
|
|
|
FT_Parameter* params;
|
2000-02-13 14:35:21 +01:00
|
|
|
|
2000-02-10 18:03:11 +01:00
|
|
|
} FT_Open_Args;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* FT_New_Face */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* This function calls @FT_Open_Face to open a font by its pathname. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Input> */
|
|
|
|
/* pathname :: A path to the font file. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* face_index :: The index of the face within the font. The first */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* face has index~0. */
|
2004-03-20 15:26:38 +01:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* <Output> */
|
2005-11-04 12:33:32 +01:00
|
|
|
/* aface :: A handle to a new face object. If `face_index' is */
|
|
|
|
/* greater than or equal to zero, it must be non-NULL. */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* See @FT_Open_Face for more details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2013-06-11 16:24:13 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* Use @FT_Done_Face to destroy the created @FT_Face object (along */
|
|
|
|
/* with its slot and sizes). */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_New_Face( FT_Library library,
|
|
|
|
const char* filepathname,
|
|
|
|
FT_Long face_index,
|
|
|
|
FT_Face *aface );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-05-12 12:19:41 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Memory_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* This function calls @FT_Open_Face to open a font that has been */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* loaded into memory. */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* file_base :: A pointer to the beginning of the font data. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* file_size :: The size of the memory chunk used by the font data. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* face_index :: The index of the face within the font. The first */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* face has index~0. */
|
2004-03-20 15:26:38 +01:00
|
|
|
/* */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* <Output> */
|
2005-11-04 12:33:32 +01:00
|
|
|
/* aface :: A handle to a new face object. If `face_index' is */
|
|
|
|
/* greater than or equal to zero, it must be non-NULL. */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* See @FT_Open_Face for more details. */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-05-12 12:19:41 +02:00
|
|
|
/* */
|
2006-12-08 16:51:51 +01:00
|
|
|
/* <Note> */
|
2006-12-08 16:55:39 +01:00
|
|
|
/* You must not deallocate the memory before calling @FT_Done_Face. */
|
2006-12-08 16:51:51 +01:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_New_Memory_Face( FT_Library library,
|
|
|
|
const FT_Byte* file_base,
|
|
|
|
FT_Long file_size,
|
|
|
|
FT_Long face_index,
|
|
|
|
FT_Face *aface );
|
2000-05-12 12:19:41 +02:00
|
|
|
|
|
|
|
|
2000-02-10 18:03:11 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Open_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Create a face object from a given resource described by */
|
|
|
|
/* @FT_Open_Args. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Input> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* args :: A pointer to an `FT_Open_Args' structure that must */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* be filled by the caller. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* face_index :: The index of the face within the font. The first */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* face has index~0. */
|
2004-03-20 15:26:38 +01:00
|
|
|
/* */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* <Output> */
|
2005-11-04 07:58:49 +01:00
|
|
|
/* aface :: A handle to a new face object. If `face_index' is */
|
|
|
|
/* greater than or equal to zero, it must be non-NULL. */
|
|
|
|
/* See note below. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* Unlike FreeType 1.x, this function automatically creates a glyph */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* slot for the face object that can be accessed directly through */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* `face->glyph'. */
|
|
|
|
/* */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* FT_Open_Face can be used to quickly check whether the font */
|
2005-11-04 12:33:32 +01:00
|
|
|
/* format of a given font resource is supported by FreeType. If the */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* `face_index' field is negative, the function's return value is~0 */
|
2005-11-04 12:33:32 +01:00
|
|
|
/* if the font format is recognized, or non-zero otherwise; */
|
|
|
|
/* the function returns a more or less empty face handle in `*aface' */
|
|
|
|
/* (if `aface' isn't NULL). The only useful field in this special */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* case is `face->num_faces' that gives the number of faces within */
|
2005-11-04 12:33:32 +01:00
|
|
|
/* the font file. After examination, the returned @FT_Face structure */
|
|
|
|
/* should be deallocated with a call to @FT_Done_Face. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Each new face object created with this function also owns a */
|
|
|
|
/* default @FT_Size object, accessible as `face->size'. */
|
|
|
|
/* */
|
2012-01-27 20:51:27 +01:00
|
|
|
/* One @FT_Library instance can have multiple face objects, this is, */
|
|
|
|
/* @FT_Open_Face and its siblings can be called multiple times using */
|
|
|
|
/* the same `library' argument. */
|
|
|
|
/* */
|
2010-07-18 18:41:47 +02:00
|
|
|
/* See the discussion of reference counters in the description of */
|
|
|
|
/* @FT_Reference_Face. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
2002-10-07 11:15:20 +02:00
|
|
|
FT_Open_Face( FT_Library library,
|
|
|
|
const FT_Open_Args* args,
|
|
|
|
FT_Long face_index,
|
|
|
|
FT_Face *aface );
|
2000-02-10 18:03:11 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-02-10 18:03:11 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Attach_File */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* This function calls @FT_Attach_Stream to attach a file. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <InOut> */
|
|
|
|
/* face :: The target face object. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Input> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* filepathname :: The pathname. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Attach_File( FT_Face face,
|
|
|
|
const char* filepathname );
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-04-04 18:46:12 +02:00
|
|
|
|
2000-02-10 18:03:11 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Attach_Stream */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* `Attach' data to a face object. Normally, this is used to read */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* additional information for the face object. For example, you can */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* attach an AFM file that comes with a Type~1 font to get the */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* kerning values and other metrics. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <InOut> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* face :: The target face object. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <Input> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* parameters :: A pointer to @FT_Open_Args that must be filled by */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* the caller. */
|
|
|
|
/* */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Note> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* The meaning of the `attach' (i.e., what really happens when the */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* new file is read) is not fixed by FreeType itself. It really */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* depends on the font format (and thus the font driver). */
|
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* Client applications are expected to know what they are doing */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* when invoking this function. Most drivers simply do not implement */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* file attachments. */
|
2000-02-10 18:03:11 +01:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Attach_Stream( FT_Face face,
|
|
|
|
FT_Open_Args* parameters );
|
2000-02-10 18:03:11 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2010-07-18 18:41:47 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Reference_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A counter gets initialized to~1 at the time an @FT_Face structure */
|
|
|
|
/* is created. This function increments the counter. @FT_Done_Face */
|
|
|
|
/* then only destroys a face if the counter is~1, otherwise it simply */
|
|
|
|
/* decrements the counter. */
|
|
|
|
/* */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* This function helps in managing life-cycles of structures that */
|
2010-07-18 18:41:47 +02:00
|
|
|
/* reference @FT_Face objects. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to a target face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* FreeType error code. 0~means success. */
|
|
|
|
/* */
|
|
|
|
/* <Since> */
|
|
|
|
/* 2.4.2 */
|
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Reference_Face( FT_Face face );
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Done_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Discard a given face object, as well as all of its child slots and */
|
|
|
|
/* sizes. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to a target face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2010-07-18 18:41:47 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* See the discussion of reference counters in the description of */
|
|
|
|
/* @FT_Reference_Face. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Done_Face( FT_Face face );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
* 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 13:21:31 +01:00
|
|
|
/* FT_Select_Size */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Select a bitmap strike. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
/* face :: A handle to a target face object. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
/* strike_index :: The index of the bitmap strike in the */
|
|
|
|
/* `available_sizes' field of @FT_FaceRec structure. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Select_Size( FT_Face face,
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
FT_Int strike_index );
|
* 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 13:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* FT_Size_Request_Type */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* An enumeration type that lists the supported size request types. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <Values> */
|
|
|
|
/* FT_SIZE_REQUEST_TYPE_NOMINAL :: */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The nominal size. The `units_per_EM' field of @FT_FaceRec is */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* used to determine both scaling values. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */
|
2011-07-03 15:29:55 +02:00
|
|
|
/* The real dimension. The sum of the the `ascender' and (minus */
|
|
|
|
/* of) the `descender' fields of @FT_FaceRec are used to determine */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* both scaling values. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* FT_SIZE_REQUEST_TYPE_BBOX :: */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The font bounding box. The width and height of the `bbox' field */
|
|
|
|
/* of @FT_FaceRec are used to determine the horizontal and vertical */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* scaling value, respectively. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* FT_SIZE_REQUEST_TYPE_CELL :: */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The `max_advance_width' field of @FT_FaceRec is used to */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* determine the horizontal scaling value; the vertical scaling */
|
|
|
|
/* value is determined the same way as */
|
|
|
|
/* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */
|
|
|
|
/* values are set to the smaller one. This type is useful if you */
|
|
|
|
/* want to specify the font size for, say, a window of a given */
|
|
|
|
/* dimension and 80x24 cells. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
2006-02-24 07:11:30 +01:00
|
|
|
/* FT_SIZE_REQUEST_TYPE_SCALES :: */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* Specify the scaling values directly. */
|
2006-02-24 07:11:30 +01:00
|
|
|
/* */
|
* 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 13:21:31 +01:00
|
|
|
/* <Note> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The above descriptions only apply to scalable formats. For bitmap */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* formats, the behaviour is up to the driver. */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* See the note section of @FT_Size_Metrics if you wonder how size */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* requesting relates to scaling values. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
typedef enum FT_Size_Request_Type_
|
|
|
|
{
|
|
|
|
FT_SIZE_REQUEST_TYPE_NOMINAL,
|
|
|
|
FT_SIZE_REQUEST_TYPE_REAL_DIM,
|
|
|
|
FT_SIZE_REQUEST_TYPE_BBOX,
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
FT_SIZE_REQUEST_TYPE_CELL,
|
2006-02-24 07:11:30 +01:00
|
|
|
FT_SIZE_REQUEST_TYPE_SCALES,
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
|
|
|
|
FT_SIZE_REQUEST_TYPE_MAX
|
* 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 13:21:31 +01:00
|
|
|
|
|
|
|
} FT_Size_Request_Type;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Size_RequestRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
* 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 13:21:31 +01:00
|
|
|
/* A structure used to model a size request. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* type :: See @FT_Size_Request_Type. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
* 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 13:21:31 +01:00
|
|
|
/* width :: The desired width. */
|
|
|
|
/* */
|
|
|
|
/* height :: The desired height. */
|
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* horiResolution :: The horizontal resolution. If set to zero, */
|
|
|
|
/* `width' is treated as a 26.6 fractional pixel */
|
|
|
|
/* value. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* vertResolution :: The vertical resolution. If set to zero, */
|
|
|
|
/* `height' is treated as a 26.6 fractional pixel */
|
|
|
|
/* value. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* If `width' is zero, then the horizontal scaling value is set equal */
|
|
|
|
/* to the vertical scaling value, and vice versa. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
typedef struct FT_Size_RequestRec_
|
|
|
|
{
|
|
|
|
FT_Size_Request_Type type;
|
2006-02-24 07:11:30 +01:00
|
|
|
FT_Long width;
|
|
|
|
FT_Long height;
|
* 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 13:21:31 +01:00
|
|
|
FT_UInt horiResolution;
|
|
|
|
FT_UInt vertResolution;
|
2006-01-13 15:53:28 +01:00
|
|
|
|
2008-05-28 23:51:57 +02:00
|
|
|
} FT_Size_RequestRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Size_Request */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a size request structure. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_Size_RequestRec_ *FT_Size_Request;
|
* 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 13:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Request_Size */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* Resize the scale of the active @FT_Size object in a face. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* face :: A handle to a target face object. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* req :: A pointer to a @FT_Size_RequestRec. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
* 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 13:21:31 +01:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* <Note> */
|
|
|
|
/* Although drivers may select the bitmap strike matching the */
|
|
|
|
/* request, you should not rely on this if you intend to select a */
|
|
|
|
/* particular bitmap strike. Use @FT_Select_Size instead in that */
|
|
|
|
/* case. */
|
|
|
|
/* */
|
2012-08-30 06:23:31 +02:00
|
|
|
/* The relation between the requested size and the resulting glyph */
|
|
|
|
/* size is dependent entirely on how the size is defined in the */
|
|
|
|
/* source face. The font designer chooses the final size of each */
|
|
|
|
/* glyph relative to this size. For more information refer to */
|
|
|
|
/* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */
|
|
|
|
/* */
|
2014-02-03 11:07:55 +01:00
|
|
|
/* Don't use this function if you are using the FreeType cache API. */
|
|
|
|
/* */
|
* 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 13:21:31 +01:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Request_Size( FT_Face face,
|
|
|
|
FT_Size_Request req );
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Set_Char_Size */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* This function calls @FT_Request_Size to request the nominal size */
|
|
|
|
/* (in points). */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
2003-06-14 23:39:17 +02:00
|
|
|
/* face :: A handle to a target face object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
* 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 13:21:31 +01:00
|
|
|
/* char_width :: The nominal width, in 26.6 fractional points. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
* 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 13:21:31 +01:00
|
|
|
/* char_height :: The nominal height, in 26.6 fractional points. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* horz_resolution :: The horizontal resolution in dpi. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* vert_resolution :: The vertical resolution in dpi. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2007-05-03 09:07:47 +02:00
|
|
|
/* If either the character width or height is zero, it is set equal */
|
|
|
|
/* to the other value. */
|
|
|
|
/* */
|
* 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 13:21:31 +01:00
|
|
|
/* If either the horizontal or vertical resolution is zero, it is set */
|
2007-05-03 09:07:47 +02:00
|
|
|
/* equal to the other value. */
|
|
|
|
/* */
|
|
|
|
/* A character width or height smaller than 1pt is set to 1pt; if */
|
|
|
|
/* both resolution values are zero, they are set to 72dpi. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2008-11-05 15:34:29 +01:00
|
|
|
/* Don't use this function if you are using the FreeType cache API. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Set_Char_Size( FT_Face face,
|
|
|
|
FT_F26Dot6 char_width,
|
|
|
|
FT_F26Dot6 char_height,
|
|
|
|
FT_UInt horz_resolution,
|
|
|
|
FT_UInt vert_resolution );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Set_Pixel_Sizes */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* This function calls @FT_Request_Size to request the nominal size */
|
|
|
|
/* (in pixels). */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* face :: A handle to the target face object. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* <Input> */
|
* 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 13:21:31 +01:00
|
|
|
/* pixel_width :: The nominal width, in pixels. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
* 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 13:21:31 +01:00
|
|
|
/* pixel_height :: The nominal height, in pixels. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2012-08-30 06:23:31 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* You should not rely on the resulting glyphs matching, or being */
|
|
|
|
/* constrained, to this pixel size. Refer to @FT_Request_Size to */
|
|
|
|
/* understand how requested sizes relate to actual sizes. */
|
|
|
|
/* */
|
2014-02-03 11:07:55 +01:00
|
|
|
/* Don't use this function if you are using the FreeType cache API. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Set_Pixel_Sizes( FT_Face face,
|
|
|
|
FT_UInt pixel_width,
|
|
|
|
FT_UInt pixel_height );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Load_Glyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* A function used to load a single glyph into the glyph slot of a */
|
|
|
|
/* face object. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <InOut> */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* face :: A handle to the target face object where the glyph */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* is loaded. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <Input> */
|
2003-12-13 19:42:31 +01:00
|
|
|
/* glyph_index :: The index of the glyph in the font file. For */
|
|
|
|
/* CID-keyed fonts (either in PS or in CFF format) */
|
|
|
|
/* this argument specifies the CID value. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* load_flags :: A flag indicating what to load for this glyph. The */
|
2002-09-18 13:32:12 +02:00
|
|
|
/* @FT_LOAD_XXX constants can be used to control the */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* glyph loading process (e.g., whether the outline */
|
|
|
|
/* should be scaled, whether to load bitmaps or not, */
|
|
|
|
/* whether to hint the outline, etc). */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* <Note> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The loaded glyph may be transformed. See @FT_Set_Transform for */
|
|
|
|
/* the details. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2008-04-01 07:55:48 +02:00
|
|
|
/* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* returned for invalid CID values (this is, for CID values that */
|
2008-04-01 07:55:48 +02:00
|
|
|
/* don't have a corresponding glyph in the font). See the discussion */
|
|
|
|
/* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
2002-08-22 10:49:42 +02:00
|
|
|
FT_Load_Glyph( FT_Face face,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FT_Int32 load_flags );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Load_Char */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* A function used to load a single glyph into the glyph slot of a */
|
|
|
|
/* face object, according to its character code. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <InOut> */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* face :: A handle to a target face object where the glyph */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* is loaded. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <Input> */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* char_code :: The glyph's character code, according to the */
|
|
|
|
/* current charmap used in the face. */
|
|
|
|
/* */
|
|
|
|
/* load_flags :: A flag indicating what to load for this glyph. The */
|
2002-09-18 13:32:12 +02:00
|
|
|
/* @FT_LOAD_XXX constants can be used to control the */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* glyph loading process (e.g., whether the outline */
|
|
|
|
/* should be scaled, whether to load bitmaps or not, */
|
|
|
|
/* whether to hint the outline, etc). */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Load_Char( FT_Face face,
|
|
|
|
FT_ULong char_code,
|
2002-08-21 23:39:28 +02:00
|
|
|
FT_Int32 load_flags );
|
2000-07-09 21:15:30 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2005-12-23 16:10:54 +01:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @enum:
|
|
|
|
* FT_LOAD_XXX
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A list of bit-field constants used with @FT_Load_Glyph to indicate
|
|
|
|
* what kind of operations to perform during glyph loading.
|
|
|
|
*
|
|
|
|
* @values:
|
|
|
|
* FT_LOAD_DEFAULT ::
|
2008-06-26 21:56:51 +02:00
|
|
|
* Corresponding to~0, this value is used as the default glyph load
|
2005-12-23 16:10:54 +01:00
|
|
|
* operation. In this case, the following happens:
|
|
|
|
*
|
|
|
|
* 1. FreeType looks for a bitmap for the glyph corresponding to the
|
2006-04-13 18:31:02 +02:00
|
|
|
* face's current size. If one is found, the function returns.
|
2005-12-23 16:10:54 +01:00
|
|
|
* The bitmap data can be accessed from the glyph slot (see note
|
|
|
|
* below).
|
|
|
|
*
|
|
|
|
* 2. If no embedded bitmap is searched or found, FreeType looks for a
|
|
|
|
* scalable outline. If one is found, it is loaded from the font
|
|
|
|
* file, scaled to device pixels, then `hinted' to the pixel grid
|
|
|
|
* in order to optimize it. The outline data can be accessed from
|
|
|
|
* the glyph slot (see note below).
|
|
|
|
*
|
|
|
|
* Note that by default, the glyph loader doesn't render outlines into
|
|
|
|
* bitmaps. The following flags are used to modify this default
|
|
|
|
* behaviour to more specific and useful cases.
|
|
|
|
*
|
|
|
|
* FT_LOAD_NO_SCALE ::
|
2012-07-10 08:33:50 +02:00
|
|
|
* Don't scale the loaded outline glyph but keep it in font units.
|
2006-01-14 09:17:52 +01:00
|
|
|
*
|
|
|
|
* This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
|
|
|
|
* unsets @FT_LOAD_RENDER.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2012-07-10 08:33:50 +02:00
|
|
|
* If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using
|
|
|
|
* FT_LOAD_NO_SCALE usually yields meaningless outlines because the
|
2013-01-24 13:33:06 +01:00
|
|
|
* subglyphs must be scaled and positioned with hinting instructions.
|
2012-07-10 08:33:50 +02:00
|
|
|
* This can be solved by loading the font without FT_LOAD_NO_SCALE and
|
|
|
|
* setting the character size to `font->units_per_EM'.
|
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
* FT_LOAD_NO_HINTING ::
|
2012-07-10 08:33:50 +02:00
|
|
|
* Disable hinting. This generally generates `blurrier' bitmap glyphs
|
|
|
|
* when the glyph are rendered in any of the anti-aliased modes. See
|
2006-01-14 09:17:52 +01:00
|
|
|
* also the note below.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* This flag is implied by @FT_LOAD_NO_SCALE.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_RENDER ::
|
2006-01-14 09:17:52 +01:00
|
|
|
* Call @FT_Render_Glyph after the glyph is loaded. By default, the
|
|
|
|
* glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be
|
|
|
|
* overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* This flag is unset by @FT_LOAD_NO_SCALE.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_NO_BITMAP ::
|
2006-01-14 09:17:52 +01:00
|
|
|
* Ignore bitmap strikes when loading. Bitmap-only fonts ignore this
|
|
|
|
* flag.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* @FT_LOAD_NO_SCALE always sets this flag.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_VERTICAL_LAYOUT ::
|
2012-10-07 22:36:46 +02:00
|
|
|
* Load the glyph for vertical text layout. In particular, the
|
|
|
|
* `advance' value in the @FT_GlyphSlotRec structure is set to the
|
|
|
|
* `vertAdvance' value of the `metrics' field.
|
|
|
|
*
|
|
|
|
* In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use
|
|
|
|
* this flag currently. Reason is that in this case vertical metrics
|
|
|
|
* get synthesized, and those values are not always consistent across
|
|
|
|
* various font formats.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_FORCE_AUTOHINT ::
|
2006-01-15 07:00:49 +01:00
|
|
|
* Indicates that the auto-hinter is preferred over the font's native
|
|
|
|
* hinter. See also the note below.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_PEDANTIC ::
|
2006-01-14 09:17:52 +01:00
|
|
|
* Indicates that the font driver should perform pedantic verifications
|
|
|
|
* during glyph loading. This is mostly used to detect broken glyphs
|
|
|
|
* in fonts. By default, FreeType tries to handle broken fonts also.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2012-02-11 21:42:19 +01:00
|
|
|
* In particular, errors from the TrueType bytecode engine are not
|
|
|
|
* passed to the application if this flag is not set; this might
|
|
|
|
* result in partially hinted or distorted glyphs in case a glyph's
|
|
|
|
* bytecode is buggy.
|
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
* FT_LOAD_NO_RECURSE ::
|
2014-04-16 23:22:56 +02:00
|
|
|
* Indicate that the font driver should not load composite glyphs
|
|
|
|
* recursively. Instead, it should set the `num_subglyph' and
|
|
|
|
* `subglyphs' values of the glyph slot accordingly, and set
|
|
|
|
* `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of
|
|
|
|
* subglyphs can then be accessed with @FT_Get_SubGlyph_Info.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-15 07:00:49 +01:00
|
|
|
* This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
|
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
* FT_LOAD_IGNORE_TRANSFORM ::
|
2007-01-31 00:08:50 +01:00
|
|
|
* Indicates that the transform matrix set by @FT_Set_Transform should
|
2006-01-14 09:17:52 +01:00
|
|
|
* be ignored.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_MONOCHROME ::
|
|
|
|
* This flag is used with @FT_LOAD_RENDER to indicate that you want to
|
2006-03-22 21:33:48 +01:00
|
|
|
* render an outline glyph to a 1-bit monochrome bitmap glyph, with
|
2008-06-26 21:56:51 +02:00
|
|
|
* 8~pixels packed into each byte of the bitmap data.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* Note that this has no effect on the hinting algorithm used. You
|
2008-12-18 07:32:10 +01:00
|
|
|
* should rather use @FT_LOAD_TARGET_MONO so that the
|
2006-01-14 09:17:52 +01:00
|
|
|
* monochrome-optimized hinting algorithm is used.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_LINEAR_DESIGN ::
|
2006-01-14 09:17:52 +01:00
|
|
|
* Indicates that the `linearHoriAdvance' and `linearVertAdvance'
|
2006-01-15 07:00:49 +01:00
|
|
|
* fields of @FT_GlyphSlotRec should be kept in font units. See
|
2006-01-14 09:17:52 +01:00
|
|
|
* @FT_GlyphSlotRec for details.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_NO_AUTOHINT ::
|
2006-01-14 09:17:52 +01:00
|
|
|
* Disable auto-hinter. See also the note below.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
* FT_LOAD_COLOR ::
|
|
|
|
* This flag is used to request loading of color embedded-bitmap
|
|
|
|
* images. The resulting color bitmaps, if available, will have the
|
|
|
|
* @FT_PIXEL_MODE_BGRA format. When the flag is not used and color
|
|
|
|
* bitmaps are found, they will be converted to 256-level gray
|
|
|
|
* bitmaps transparently. Those bitmaps will be in the
|
|
|
|
* @FT_PIXEL_MODE_GRAY format.
|
|
|
|
*
|
2014-11-22 18:49:25 +01:00
|
|
|
* FT_LOAD_CROP_BITMAP ::
|
|
|
|
* Ignored. Deprecated.
|
|
|
|
*
|
|
|
|
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
|
|
|
|
* Ignored. Deprecated.
|
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
* @note:
|
2006-01-14 09:17:52 +01:00
|
|
|
* By default, hinting is enabled and the font's native hinter (see
|
2006-01-15 07:00:49 +01:00
|
|
|
* @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can
|
|
|
|
* disable hinting by setting @FT_LOAD_NO_HINTING or change the
|
|
|
|
* precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set
|
|
|
|
* @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be
|
|
|
|
* used at all.
|
2006-01-14 09:17:52 +01:00
|
|
|
*
|
2008-12-11 09:55:48 +01:00
|
|
|
* See the description of @FT_FACE_FLAG_TRICKY for a special exception
|
|
|
|
* (affecting only a handful of Asian fonts).
|
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* Besides deciding which hinter to use, you can also decide which
|
|
|
|
* hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details.
|
2009-02-12 23:42:27 +01:00
|
|
|
*
|
2012-04-24 15:25:54 +02:00
|
|
|
* Note that the auto-hinter needs a valid Unicode cmap (either a native
|
|
|
|
* one or synthesized by FreeType) for producing correct results. If a
|
|
|
|
* font provides an incorrect mapping (for example, assigning the
|
|
|
|
* character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a
|
|
|
|
* mathematical integral sign), the auto-hinter might produce useless
|
|
|
|
* results.
|
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
*/
|
2003-07-25 07:57:21 +02:00
|
|
|
#define FT_LOAD_DEFAULT 0x0
|
2012-02-04 21:42:49 +01:00
|
|
|
#define FT_LOAD_NO_SCALE ( 1L << 0 )
|
|
|
|
#define FT_LOAD_NO_HINTING ( 1L << 1 )
|
|
|
|
#define FT_LOAD_RENDER ( 1L << 2 )
|
|
|
|
#define FT_LOAD_NO_BITMAP ( 1L << 3 )
|
|
|
|
#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 )
|
|
|
|
#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 )
|
|
|
|
#define FT_LOAD_CROP_BITMAP ( 1L << 6 )
|
|
|
|
#define FT_LOAD_PEDANTIC ( 1L << 7 )
|
|
|
|
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 )
|
|
|
|
#define FT_LOAD_NO_RECURSE ( 1L << 10 )
|
|
|
|
#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 )
|
|
|
|
#define FT_LOAD_MONOCHROME ( 1L << 12 )
|
|
|
|
#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
|
|
|
|
#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
|
|
|
/* Bits 16..19 are used by `FT_LOAD_TARGET_' */
|
|
|
|
#define FT_LOAD_COLOR ( 1L << 20 )
|
2002-08-22 00:06:41 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
|
|
|
|
2008-09-12 18:27:48 +02:00
|
|
|
/* used internally only by certain font drivers! */
|
2012-02-04 21:42:49 +01:00
|
|
|
#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 )
|
|
|
|
#define FT_LOAD_SBITS_ONLY ( 1L << 14 )
|
2008-09-12 18:27:48 +02:00
|
|
|
|
2005-12-23 16:10:54 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
*
|
|
|
|
* @enum:
|
|
|
|
* FT_LOAD_TARGET_XXX
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A list of values that are used to select a specific hinting algorithm
|
2006-01-14 09:17:52 +01:00
|
|
|
* to use by the hinter. You should OR one of these values to your
|
2005-12-23 16:10:54 +01:00
|
|
|
* `load_flags' when calling @FT_Load_Glyph.
|
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* Note that font's native hinters may ignore the hinting algorithm you
|
|
|
|
* have specified (e.g., the TrueType bytecode interpreter). You can set
|
|
|
|
* @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
|
|
|
|
* always implies @FT_LOAD_FORCE_AUTOHINT.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* @values:
|
|
|
|
* FT_LOAD_TARGET_NORMAL ::
|
|
|
|
* This corresponds to the default hinting algorithm, optimized for
|
|
|
|
* standard gray-level rendering. For monochrome output, use
|
2006-01-14 09:17:52 +01:00
|
|
|
* @FT_LOAD_TARGET_MONO instead.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_TARGET_LIGHT ::
|
|
|
|
* A lighter hinting algorithm for non-monochrome modes. Many
|
|
|
|
* generated glyphs are more fuzzy but better resemble its original
|
2008-06-26 21:56:51 +02:00
|
|
|
* shape. A bit like rendering on Mac OS~X.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_TARGET_MONO ::
|
|
|
|
* Strong hinting algorithm that should only be used for monochrome
|
2006-01-14 09:17:52 +01:00
|
|
|
* output. The result is probably unpleasant if the glyph is rendered
|
|
|
|
* in non-monochrome modes.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* FT_LOAD_TARGET_LCD ::
|
|
|
|
* A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
|
|
|
|
* decimated LCD displays.
|
|
|
|
*
|
|
|
|
* FT_LOAD_TARGET_LCD_V ::
|
|
|
|
* A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically
|
|
|
|
* decimated LCD displays.
|
|
|
|
*
|
|
|
|
* @note:
|
|
|
|
* You should use only _one_ of the FT_LOAD_TARGET_XXX values in your
|
|
|
|
* `load_flags'. They can't be ORed.
|
|
|
|
*
|
2006-01-14 09:17:52 +01:00
|
|
|
* If @FT_LOAD_RENDER is also set, the glyph is rendered in the
|
2013-09-03 11:33:10 +02:00
|
|
|
* corresponding mode (i.e., the mode that matches the used algorithm
|
2012-04-07 19:13:29 +02:00
|
|
|
* best). An exeption is FT_LOAD_TARGET_MONO since it implies
|
|
|
|
* @FT_LOAD_MONOCHROME.
|
2005-12-23 16:10:54 +01:00
|
|
|
*
|
|
|
|
* You can use a hinting algorithm that doesn't correspond to the same
|
|
|
|
* rendering mode. As an example, it is possible to use the `light'
|
|
|
|
* hinting algorithm and have the results rendered in horizontal LCD
|
|
|
|
* pixel mode, with code like
|
|
|
|
*
|
|
|
|
* {
|
|
|
|
* FT_Load_Glyph( face, glyph_index,
|
|
|
|
* load_flags | FT_LOAD_TARGET_LIGHT );
|
|
|
|
*
|
|
|
|
* FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
|
|
|
|
* }
|
2009-02-12 23:42:27 +01:00
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
*/
|
2009-02-12 23:42:27 +01:00
|
|
|
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
|
2005-12-23 14:32:06 +01:00
|
|
|
|
2009-02-12 23:42:27 +01:00
|
|
|
#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
|
|
|
|
#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )
|
|
|
|
#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )
|
|
|
|
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
|
|
|
|
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2005-12-23 16:10:54 +01:00
|
|
|
|
2008-05-28 23:51:57 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
* @macro:
|
|
|
|
* FT_LOAD_TARGET_MODE
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* Return the @FT_Render_Mode corresponding to a given
|
|
|
|
* @FT_LOAD_TARGET_XXX value.
|
2008-05-28 23:51:57 +02:00
|
|
|
*
|
2005-12-23 16:10:54 +01:00
|
|
|
*/
|
2005-12-23 14:32:06 +01:00
|
|
|
#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Set_Transform */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A function used to set the transformation that is applied to glyph */
|
2005-06-06 09:01:47 +02:00
|
|
|
/* images when they are loaded into a glyph slot through */
|
|
|
|
/* @FT_Load_Glyph. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* face :: A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* the identity matrix. */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* delta :: A pointer to the translation vector. Use~0 for the null */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* vector. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* The transformation is only applied to scalable image formats after */
|
|
|
|
/* the glyph has been loaded. It means that hinting is unaltered by */
|
|
|
|
/* the transformation and is performed on the character size given in */
|
2003-07-25 07:57:21 +02:00
|
|
|
/* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */
|
2000-07-01 01:12:55 +02:00
|
|
|
/* */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* Note that this also transforms the `face.glyph.advance' field, but */
|
|
|
|
/* *not* the values in `face.glyph.metrics'. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( void )
|
|
|
|
FT_Set_Transform( FT_Face face,
|
|
|
|
FT_Matrix* matrix,
|
|
|
|
FT_Vector* delta );
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* FT_Render_Mode */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* An enumeration type that lists the render modes supported by */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType~2. Each mode corresponds to a specific type of scanline */
|
2005-12-23 14:32:06 +01:00
|
|
|
/* conversion performed on the outline. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */
|
|
|
|
/* field in the @FT_GlyphSlotRec structure gives the format of the */
|
|
|
|
/* returned bitmap. */
|
2003-07-01 09:28:55 +02:00
|
|
|
/* */
|
2008-06-21 08:27:53 +02:00
|
|
|
/* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */
|
|
|
|
/* */
|
2002-09-18 00:57:29 +02:00
|
|
|
/* <Values> */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_RENDER_MODE_NORMAL :: */
|
|
|
|
/* This is the default render mode; it corresponds to 8-bit */
|
2008-06-21 08:27:53 +02:00
|
|
|
/* anti-aliased bitmaps. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2002-11-06 23:32:54 +01:00
|
|
|
/* FT_RENDER_MODE_LIGHT :: */
|
2005-12-23 16:10:54 +01:00
|
|
|
/* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */
|
|
|
|
/* defined as a separate value because render modes are also used */
|
|
|
|
/* indirectly to define hinting algorithm selectors. See */
|
2005-12-23 14:32:06 +01:00
|
|
|
/* @FT_LOAD_TARGET_XXX for details. */
|
2002-11-06 23:32:54 +01:00
|
|
|
/* */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_RENDER_MODE_MONO :: */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* This mode corresponds to 1-bit bitmaps (with 2~levels of */
|
2008-06-21 08:27:53 +02:00
|
|
|
/* opacity). */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_RENDER_MODE_LCD :: */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* This mode corresponds to horizontal RGB and BGR sub-pixel */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* displays like LCD screens. It produces 8-bit bitmaps that are */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* 3~times the width of the original glyph outline in pixels, and */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* which use the @FT_PIXEL_MODE_LCD mode. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* FT_RENDER_MODE_LCD_V :: */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* This mode corresponds to vertical RGB and BGR sub-pixel displays */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* (like PDA screens, rotated LCD displays, etc.). It produces */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* 8-bit bitmaps that are 3~times the height of the original */
|
2002-09-05 17:10:54 +02:00
|
|
|
/* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */
|
|
|
|
/* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */
|
|
|
|
/* (not active in the default builds). It is up to the caller to */
|
|
|
|
/* either call @FT_Library_SetLcdFilter (if available) or do the */
|
|
|
|
/* filtering itself. */
|
|
|
|
/* */
|
|
|
|
/* The selected render mode only affects vector glyphs of a font. */
|
|
|
|
/* Embedded bitmaps often have a different pixel mode like */
|
|
|
|
/* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */
|
|
|
|
/* them into 8-bit pixmaps. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
typedef enum FT_Render_Mode_
|
2000-07-01 01:12:55 +02:00
|
|
|
{
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_RENDER_MODE_NORMAL = 0,
|
2002-11-06 23:32:54 +01:00
|
|
|
FT_RENDER_MODE_LIGHT,
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_RENDER_MODE_MONO,
|
|
|
|
FT_RENDER_MODE_LCD,
|
|
|
|
FT_RENDER_MODE_LCD_V,
|
|
|
|
|
|
|
|
FT_RENDER_MODE_MAX
|
2000-07-10 16:24:26 +02:00
|
|
|
|
2000-07-01 01:12:55 +02:00
|
|
|
} FT_Render_Mode;
|
|
|
|
|
2000-07-10 16:24:26 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* these constants are deprecated; use the corresponding */
|
|
|
|
/* `FT_Render_Mode' values instead */
|
2002-09-05 17:10:54 +02:00
|
|
|
#define ft_render_mode_normal FT_RENDER_MODE_NORMAL
|
|
|
|
#define ft_render_mode_mono FT_RENDER_MODE_MONO
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Render_Glyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Convert a given glyph image to a bitmap. It does so by inspecting */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* the glyph image format, finding the relevant renderer, and */
|
|
|
|
/* invoking it. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <InOut> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* slot :: A handle to the glyph slot containing the image to */
|
|
|
|
/* convert. */
|
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <Input> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* render_mode :: This is the render mode used to render the glyph */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* image into a bitmap. See @FT_Render_Mode for a */
|
|
|
|
/* list of possible values. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2014-02-03 11:07:55 +01:00
|
|
|
/* <Note> */
|
|
|
|
/* To get meaningful results, font scaling values must be set with */
|
|
|
|
/* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
* src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
tt_face_get_ps_name): Replace switch statement with if clauses to
make it more portable.
* src/cff/cffobjs.c (cff_face_init): Ditto.
* include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
`module_size'.
* include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
`glyph_size'.
* src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
`FT_Render_Mode'.
(FT_Render_Glyph_Internal): Change third parameter to
`FT_Render_Mode'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
to `FT_Render_Mode'.
* src/raster/ftrend1.c (ft_raster1_render): Change third parameter
to `FT_Render_Mode'.
* src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Ditto.
(ft_smooth_render_generic): Change third and fifth parameter to
`FT_Render_Mode'.
* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
include/freetype/ftglyph.h: Updated.
* src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
(PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
(T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
fourth parameter to `FT_Int32'.
* src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
and declare them as unused.
* src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.
* src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
value to FT_UInt32.
* src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
Updated accordingly.
* src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
(cff_get_glyph_name): Use cast for result of ft_strlen.
* src/cff/cffparse.c (cff_parse_real): User cast for assigning
`exp'.
* src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
some local variables.
(cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
switch statements.
(cff_font_load): Use cast in call to CFF_Load_FD_Select.
* src/cff/cffobjs.c (cff_size_init): Use more casts.
(cff_face_init): Use FT_Int32 for `flags'.
* src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
`adx' and `ady'.
(cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
Use more casts.
* src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.
* src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
* src/cid/cidgload.c (cid_load_glyph): Add missing cast for
`cid_get_offset'.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
cast for `num_points'.
(t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.
* src/base/ftdebug.c (ft_debug_init): Use FT_Int.
* include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
`FT_Int32' for fourth parameter.
* src/base/ftobjs.c (open_face): Use cast for calling
clazz->init_face.
* src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
`1L'.
(Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
* src/raster/ftrend1.c (ft_raster1_render): Ditto.
* src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
constant.
* builds/amiga/include/freetype/config/ftmodule.h: Updated.
2002-09-27 13:09:23 +02:00
|
|
|
FT_Render_Glyph( FT_GlyphSlot slot,
|
|
|
|
FT_Render_Mode render_mode );
|
2000-07-01 01:12:55 +02:00
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* FT_Kerning_Mode */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* An enumeration used to specify which kerning values to return in */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* @FT_Get_Kerning. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2002-09-18 00:57:29 +02:00
|
|
|
/* <Values> */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* distances (value is~0). */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* distances. */
|
|
|
|
/* */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* units. */
|
|
|
|
/* */
|
|
|
|
typedef enum FT_Kerning_Mode_
|
2000-07-01 01:12:55 +02:00
|
|
|
{
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_KERNING_DEFAULT = 0,
|
|
|
|
FT_KERNING_UNFITTED,
|
|
|
|
FT_KERNING_UNSCALED
|
2000-07-10 16:24:26 +02:00
|
|
|
|
2000-07-01 01:12:55 +02:00
|
|
|
} FT_Kerning_Mode;
|
|
|
|
|
2002-09-05 17:10:54 +02:00
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* these constants are deprecated; use the corresponding */
|
|
|
|
/* `FT_Kerning_Mode' values instead */
|
2002-09-05 17:10:54 +02:00
|
|
|
#define ft_kerning_default FT_KERNING_DEFAULT
|
|
|
|
#define ft_kerning_unfitted FT_KERNING_UNFITTED
|
|
|
|
#define ft_kerning_unscaled FT_KERNING_UNSCALED
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Kerning */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Return the kerning vector between two glyphs of a same face. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to a source face object. */
|
|
|
|
/* */
|
|
|
|
/* left_glyph :: The index of the left glyph in the kern pair. */
|
|
|
|
/* */
|
|
|
|
/* right_glyph :: The index of the right glyph in the kern pair. */
|
|
|
|
/* */
|
2002-06-26 07:58:24 +02:00
|
|
|
/* kern_mode :: See @FT_Kerning_Mode for more information. */
|
2006-05-12 06:00:44 +02:00
|
|
|
/* Determines the scale and dimension of the returned */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* kerning vector. */
|
2000-07-01 01:12:55 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* <Output> */
|
2004-12-09 23:22:52 +01:00
|
|
|
/* akerning :: The kerning vector. This is either in font units */
|
|
|
|
/* or in pixels (26.6 format) for scalable formats, */
|
|
|
|
/* and in pixels for fixed-sizes formats. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* Only horizontal layouts (left-to-right & right-to-left) are */
|
|
|
|
/* supported by this method. Other layouts, or more sophisticated */
|
|
|
|
/* kernings, are out of the scope of this API function -- they can be */
|
|
|
|
/* implemented through format-specific interfaces. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_Kerning( FT_Face face,
|
|
|
|
FT_UInt left_glyph,
|
|
|
|
FT_UInt right_glyph,
|
|
|
|
FT_UInt kern_mode,
|
|
|
|
FT_Vector *akerning );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Track_Kerning */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return the track kerning for a given face object at a given size. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* face :: A handle to a source face object. */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/* */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* point_size :: The point size in 16.16 fractional points. */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/* */
|
2012-03-03 07:03:41 +01:00
|
|
|
/* degree :: The degree of tightness. Increasingly negative */
|
|
|
|
/* values represent tighter track kerning, while */
|
|
|
|
/* increasingly positive values represent looser track */
|
|
|
|
/* kerning. Value zero means no track kerning. */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2012-03-03 07:03:41 +01:00
|
|
|
/* akerning :: The kerning in 16.16 fractional points, to be */
|
|
|
|
/* uniformly applied between all glyphs. */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
/* */
|
2012-03-03 07:03:41 +01:00
|
|
|
/* <Note> */
|
|
|
|
/* Currently, only the Type~1 font driver supports track kerning, */
|
|
|
|
/* using data from AFM files (if attached with @FT_Attach_File or */
|
|
|
|
/* @FT_Attach_Stream). */
|
|
|
|
/* */
|
|
|
|
/* Only very few AFM files come with track kerning data; please refer */
|
|
|
|
/* to the Adobe's AFM specification for more details. */
|
|
|
|
/* */
|
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser. It is used to parse an AFM file.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser. Some of the functions are taken, with some
modifications, from the psobjs.c
* src/psaux/psobjs.c: Use functions from psconv.c.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.
* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
* src/tools/test_afm.c: A test program for AFM parser.
* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'. It is
currently only used to get the track kerning information.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.
* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 16:35:56 +01:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_Track_Kerning( FT_Face face,
|
|
|
|
FT_Fixed point_size,
|
|
|
|
FT_Int degree,
|
|
|
|
FT_Fixed* akerning );
|
|
|
|
|
|
|
|
|
2000-07-19 19:13:03 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Glyph_Name */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* Retrieve the ASCII name of a given glyph in a face. This only */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to a source face object. */
|
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* glyph_index :: The glyph index. */
|
|
|
|
/* */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* buffer_max :: The maximum number of bytes available in the */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* buffer. */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <Output> */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* buffer :: A pointer to a target buffer where the name is */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* copied to. */
|
|
|
|
/* */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* An error is returned if the face doesn't provide glyph names or if */
|
|
|
|
/* the glyph index is invalid. In all cases of failure, the first */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* byte of `buffer' is set to~0 to indicate an empty name. */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* The glyph name is truncated to fit within the buffer if it is too */
|
|
|
|
/* long. The returned string is always zero-terminated. */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2011-06-29 09:45:51 +02:00
|
|
|
/* Be aware that FreeType reorders glyph indices internally so that */
|
|
|
|
/* glyph index~0 always corresponds to the `missing glyph' (called */
|
|
|
|
/* `.notdef'). */
|
|
|
|
/* */
|
2014-08-04 07:35:13 +02:00
|
|
|
/* This function always returns an error if the config macro */
|
|
|
|
/* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoptions.h'. */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_Glyph_Name( FT_Face face,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FT_Pointer buffer,
|
|
|
|
FT_UInt buffer_max );
|
2000-07-19 19:13:03 +02:00
|
|
|
|
|
|
|
|
2001-10-17 15:48:10 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Postscript_Name */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* Retrieve the ASCII PostScript name of a given face, if available. */
|
|
|
|
/* This only works with PostScript and TrueType fonts. */
|
2001-10-17 15:48:10 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2001-12-05 02:22:05 +01:00
|
|
|
/* face :: A handle to the source face object. */
|
2001-10-17 15:48:10 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* A pointer to the face's PostScript name. NULL if unavailable. */
|
2001-10-17 15:48:10 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2006-01-14 09:17:52 +01:00
|
|
|
/* The returned pointer is owned by the face and is destroyed with */
|
|
|
|
/* it. */
|
2001-10-17 15:48:10 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( const char* )
|
|
|
|
FT_Get_Postscript_Name( FT_Face face );
|
|
|
|
|
|
|
|
|
2000-05-12 19:09:38 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Select_Charmap */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Select a given charmap by its encoding tag (as listed in */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* `freetype.h'). */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <InOut> */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* face :: A handle to the source face object. */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <Input> */
|
2005-10-24 22:51:13 +02:00
|
|
|
/* encoding :: A handle to the selected encoding. */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* This function returns an error if no charmap in the face */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* corresponds to the encoding queried here. */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
2007-02-11 14:15:25 +01:00
|
|
|
/* Because many fonts contain more than a single cmap for Unicode */
|
|
|
|
/* encoding, this function has some special code to select the one */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */
|
|
|
|
/* preferred to a UCS-2 cmap). It is thus preferable to */
|
2007-02-11 14:15:25 +01:00
|
|
|
/* @FT_Set_Charmap in this case. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Select_Charmap( FT_Face face,
|
|
|
|
FT_Encoding encoding );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-05-12 19:09:38 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Set_Charmap */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* Select a given charmap for character code to glyph index mapping. */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* <InOut> */
|
2000-11-07 18:21:11 +01:00
|
|
|
/* face :: A handle to the source face object. */
|
2000-11-06 05:33:56 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-11-07 18:21:11 +01:00
|
|
|
/* charmap :: A handle to the selected charmap. */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* This function returns an error if the charmap is not part of */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* the face (i.e., if it is not listed in the `face->charmaps' */
|
2000-05-12 19:09:38 +02:00
|
|
|
/* table). */
|
|
|
|
/* */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* It also fails if a type~14 charmap is selected. */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Set_Charmap( FT_Face face,
|
|
|
|
FT_CharMap charmap );
|
2004-04-24 16:43:37 +02:00
|
|
|
|
|
|
|
|
2005-10-27 23:28:35 +02:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @function:
|
|
|
|
* FT_Get_Charmap_Index
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* Retrieve index of a given charmap.
|
|
|
|
*
|
|
|
|
* @input:
|
|
|
|
* charmap ::
|
|
|
|
* A handle to a charmap.
|
|
|
|
*
|
|
|
|
* @return:
|
|
|
|
* The index into the array of character maps within the face to which
|
2010-05-22 20:03:41 +02:00
|
|
|
* `charmap' belongs. If an error occurs, -1 is returned.
|
2005-10-27 23:28:35 +02:00
|
|
|
*
|
|
|
|
*/
|
2004-04-24 16:43:37 +02:00
|
|
|
FT_EXPORT( FT_Int )
|
|
|
|
FT_Get_Charmap_Index( FT_CharMap charmap );
|
2000-07-09 21:15:30 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Char_Index */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Return the glyph index of a given character code. This function */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* uses a charmap object to do the mapping. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* face :: A handle to the source face object. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* charcode :: The character code. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The glyph index. 0~means `undefined character code'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-06-16 03:14:16 +02:00
|
|
|
/* <Note> */
|
2006-04-22 14:24:52 +02:00
|
|
|
/* If you use FreeType to manipulate the contents of font files */
|
2006-04-13 18:31:02 +02:00
|
|
|
/* directly, be aware that the glyph index returned by this function */
|
2012-06-12 08:07:19 +02:00
|
|
|
/* doesn't always correspond to the internal indices used within the */
|
|
|
|
/* file. This is done to ensure that value~0 always corresponds to */
|
|
|
|
/* the `missing glyph'. If the first glyph is not named `.notdef', */
|
|
|
|
/* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */
|
|
|
|
/* the glyph ID~0 position, and whatever was there will be moved to */
|
|
|
|
/* the position `.notdef' had. For Type~1 fonts, if there is no */
|
|
|
|
/* `.notdef' glyph at all, then one will be created at index~0 and */
|
|
|
|
/* whatever was there will be moved to the last index -- Type~42 */
|
|
|
|
/* fonts are considered invalid under this condition. */
|
2002-06-16 03:14:16 +02:00
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_UInt )
|
|
|
|
FT_Get_Char_Index( FT_Face face,
|
|
|
|
FT_ULong charcode );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2002-02-28 20:28:26 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_First_Char */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This function is used to return the first character code in the */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* current charmap of a given face. It also returns the */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* corresponding glyph index. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* face :: A handle to the source face object. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* agindex :: Glyph index of first character code. 0~if charmap is */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* empty. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* The charmap's first character code. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* You should use this function with @FT_Get_Next_Char to be able to */
|
|
|
|
/* parse all character codes available in a given charmap. The code */
|
|
|
|
/* should look like this: */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* { */
|
|
|
|
/* FT_ULong charcode; */
|
|
|
|
/* FT_UInt gindex; */
|
|
|
|
/* */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* charcode = FT_Get_First_Char( face, &gindex ); */
|
|
|
|
/* while ( gindex != 0 ) */
|
|
|
|
/* { */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* ... do something with (charcode,gindex) pair ... */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */
|
|
|
|
/* } */
|
|
|
|
/* } */
|
|
|
|
/* */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* Note that `*agindex' is set to~0 if the charmap is empty. The */
|
|
|
|
/* result itself can be~0 in two cases: if the charmap is empty or */
|
2009-02-12 23:42:27 +01:00
|
|
|
/* if the value~0 is the first valid character code. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_ULong )
|
|
|
|
FT_Get_First_Char( FT_Face face,
|
|
|
|
FT_UInt *agindex );
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Next_Char */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This function is used to return the next character code in the */
|
2006-03-24 13:46:49 +01:00
|
|
|
/* current charmap of a given face following the value `char_code', */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* as well as the corresponding glyph index. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to the source face object. */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* char_code :: The starting character code. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2009-01-19 09:35:45 +01:00
|
|
|
/* agindex :: Glyph index of next character code. 0~if charmap */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* is empty. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* The charmap's next character code. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2002-03-29 08:43:04 +01:00
|
|
|
/* You should use this function with @FT_Get_First_Char to walk */
|
2006-05-12 10:00:13 +02:00
|
|
|
/* over all character codes available in a given charmap. See the */
|
|
|
|
/* note for this function for a simple code example. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* Note that `*agindex' is set to~0 when there are no more codes in */
|
2005-10-05 12:21:58 +02:00
|
|
|
/* the charmap. */
|
2002-02-28 20:28:26 +01:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_ULong )
|
|
|
|
FT_Get_Next_Char( FT_Face face,
|
|
|
|
FT_ULong char_code,
|
|
|
|
FT_UInt *agindex );
|
|
|
|
|
|
|
|
|
2007-10-20 18:15:07 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Name_Index */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return the glyph index of a given glyph name. This function uses */
|
|
|
|
/* driver specific objects to do the translation. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* glyph_name :: The glyph name. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The glyph index. 0~means `undefined character code'. */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_UInt )
|
|
|
|
FT_Get_Name_Index( FT_Face face,
|
|
|
|
FT_String* glyph_name );
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @macro:
|
|
|
|
* FT_SUBGLYPH_FLAG_XXX
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* A list of constants used to describe subglyphs. Please refer to the
|
|
|
|
* TrueType specification for the meaning of the various flags.
|
|
|
|
*
|
|
|
|
* @values:
|
|
|
|
* FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
|
|
|
|
* FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::
|
|
|
|
* FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::
|
|
|
|
* FT_SUBGLYPH_FLAG_SCALE ::
|
|
|
|
* FT_SUBGLYPH_FLAG_XY_SCALE ::
|
|
|
|
* FT_SUBGLYPH_FLAG_2X2 ::
|
|
|
|
* FT_SUBGLYPH_FLAG_USE_MY_METRICS ::
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1
|
|
|
|
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2
|
|
|
|
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4
|
|
|
|
#define FT_SUBGLYPH_FLAG_SCALE 8
|
|
|
|
#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40
|
|
|
|
#define FT_SUBGLYPH_FLAG_2X2 0x80
|
|
|
|
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* @func:
|
|
|
|
* FT_Get_SubGlyph_Info
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* Retrieve a description of a given subglyph. Only use it if
|
2009-02-12 23:42:27 +01:00
|
|
|
* `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is
|
|
|
|
* returned otherwise.
|
2007-10-20 18:15:07 +02:00
|
|
|
*
|
|
|
|
* @input:
|
|
|
|
* glyph ::
|
|
|
|
* The source glyph slot.
|
|
|
|
*
|
|
|
|
* sub_index ::
|
2009-02-12 23:42:27 +01:00
|
|
|
* The index of the subglyph. Must be less than
|
|
|
|
* `glyph->num_subglyphs'.
|
2007-10-20 18:15:07 +02:00
|
|
|
*
|
|
|
|
* @output:
|
|
|
|
* p_index ::
|
|
|
|
* The glyph index of the subglyph.
|
|
|
|
*
|
|
|
|
* p_flags ::
|
|
|
|
* The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.
|
|
|
|
*
|
|
|
|
* p_arg1 ::
|
|
|
|
* The subglyph's first argument (if any).
|
|
|
|
*
|
|
|
|
* p_arg2 ::
|
|
|
|
* The subglyph's second argument (if any).
|
|
|
|
*
|
|
|
|
* p_transform ::
|
|
|
|
* The subglyph transformation (if any).
|
|
|
|
*
|
|
|
|
* @return:
|
2008-06-26 21:56:51 +02:00
|
|
|
* FreeType error code. 0~means success.
|
2007-10-20 18:15:07 +02:00
|
|
|
*
|
|
|
|
* @note:
|
|
|
|
* The values of `*p_arg1', `*p_arg2', and `*p_transform' must be
|
|
|
|
* interpreted depending on the flags returned in `*p_flags'. See the
|
|
|
|
* TrueType specification for details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_SubGlyph_Info( FT_GlyphSlot glyph,
|
|
|
|
FT_UInt sub_index,
|
|
|
|
FT_Int *p_index,
|
|
|
|
FT_UInt *p_flags,
|
|
|
|
FT_Int *p_arg1,
|
|
|
|
FT_Int *p_arg2,
|
|
|
|
FT_Matrix *p_transform );
|
|
|
|
|
|
|
|
|
2008-12-18 07:32:10 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* FT_FSTYPE_XXX */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A list of bit flags used in the `fsType' field of the OS/2 table */
|
|
|
|
/* in a TrueType or OpenType font and the `FSType' entry in a */
|
|
|
|
/* PostScript font. These bit flags are returned by */
|
|
|
|
/* @FT_Get_FSType_Flags; they inform client applications of embedding */
|
|
|
|
/* and subsetting restrictions associated with a font. */
|
|
|
|
/* */
|
|
|
|
/* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */
|
|
|
|
/* more details. */
|
|
|
|
/* */
|
|
|
|
/* <Values> */
|
|
|
|
/* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */
|
|
|
|
/* Fonts with no fsType bit set may be embedded and permanently */
|
|
|
|
/* installed on the remote system by an application. */
|
|
|
|
/* */
|
|
|
|
/* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */
|
|
|
|
/* Fonts that have only this bit set must not be modified, embedded */
|
|
|
|
/* or exchanged in any manner without first obtaining permission of */
|
|
|
|
/* the font software copyright owner. */
|
|
|
|
/* */
|
|
|
|
/* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */
|
|
|
|
/* If this bit is set, the font may be embedded and temporarily */
|
|
|
|
/* loaded on the remote system. Documents containing Preview & */
|
|
|
|
/* Print fonts must be opened `read-only'; no edits can be applied */
|
|
|
|
/* to the document. */
|
|
|
|
/* */
|
|
|
|
/* FT_FSTYPE_EDITABLE_EMBEDDING :: */
|
|
|
|
/* If this bit is set, the font may be embedded but must only be */
|
|
|
|
/* installed temporarily on other systems. In contrast to Preview */
|
|
|
|
/* & Print fonts, documents containing editable fonts may be opened */
|
|
|
|
/* for reading, editing is permitted, and changes may be saved. */
|
|
|
|
/* */
|
|
|
|
/* FT_FSTYPE_NO_SUBSETTING :: */
|
|
|
|
/* If this bit is set, the font may not be subsetted prior to */
|
|
|
|
/* embedding. */
|
|
|
|
/* */
|
|
|
|
/* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */
|
|
|
|
/* If this bit is set, only bitmaps contained in the font may be */
|
|
|
|
/* embedded; no outline data may be embedded. If there are no */
|
|
|
|
/* bitmaps available in the font, then the font is unembeddable. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* While the fsType flags can indicate that a font may be embedded, a */
|
|
|
|
/* license with the font vendor may be separately required to use the */
|
|
|
|
/* font in this way. */
|
|
|
|
/* */
|
|
|
|
#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000
|
|
|
|
#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002
|
|
|
|
#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004
|
|
|
|
#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008
|
|
|
|
#define FT_FSTYPE_NO_SUBSETTING 0x0100
|
|
|
|
#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_FSType_Flags */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return the fsType flags for a font. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The fsType flags, @FT_FSTYPE_XXX. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* Use this function rather than directly reading the `fs_type' field */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* in the @PS_FontInfoRec structure, which is only guaranteed to */
|
2008-12-18 07:32:10 +01:00
|
|
|
/* return the correct results for Type~1 fonts. */
|
|
|
|
/* */
|
2011-06-30 06:20:30 +02:00
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.8 */
|
|
|
|
/* */
|
2008-12-18 07:32:10 +01:00
|
|
|
FT_EXPORT( FT_UShort )
|
|
|
|
FT_Get_FSType_Flags( FT_Face face );
|
|
|
|
|
|
|
|
|
2007-10-20 18:15:07 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* glyph_variants */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* Glyph Variants */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The FreeType~2 interface to Unicode Ideographic Variation */
|
|
|
|
/* Sequences (IVS), using the SFNT cmap format~14. */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Many CJK characters have variant forms. They are a sort of grey */
|
|
|
|
/* area somewhere between being totally irrelevant and semantically */
|
|
|
|
/* distinct; for this reason, the Unicode consortium decided to */
|
|
|
|
/* introduce Ideographic Variation Sequences (IVS), consisting of a */
|
|
|
|
/* Unicode base character and one of 240 variant selectors */
|
|
|
|
/* (U+E0100-U+E01EF), instead of further extending the already huge */
|
|
|
|
/* code range for CJK characters. */
|
|
|
|
/* */
|
|
|
|
/* An IVS is registered and unique; for further details please refer */
|
2012-11-04 17:25:29 +01:00
|
|
|
/* to Unicode Technical Standard #37, the Ideographic Variation */
|
|
|
|
/* Database: */
|
|
|
|
/* */
|
|
|
|
/* http://www.unicode.org/reports/tr37/ */
|
|
|
|
/* */
|
2014-11-27 12:18:34 +01:00
|
|
|
/* To date (November 2014), the character with the most variants is */
|
|
|
|
/* U+9089, having 32 such IVS. */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* */
|
|
|
|
/* Adobe and MS decided to support IVS with a new cmap subtable */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* (format~14). It is an odd subtable because it is not a mapping of */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* input code points to glyphs, but contains lists of all variants */
|
|
|
|
/* supported by the font. */
|
|
|
|
/* */
|
|
|
|
/* A variant may be either `default' or `non-default'. A default */
|
|
|
|
/* variant is the one you will get for that code point if you look it */
|
|
|
|
/* up in the standard Unicode cmap. A non-default variant is a */
|
|
|
|
/* different glyph. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* FT_Face_GetCharVariantIndex */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return the glyph index of a given character code as modified by */
|
|
|
|
/* the variation selector. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: */
|
|
|
|
/* A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* charcode :: */
|
|
|
|
/* The character code point in Unicode. */
|
|
|
|
/* */
|
|
|
|
/* variantSelector :: */
|
|
|
|
/* The Unicode code point of the variation selector. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The glyph index. 0~means either `undefined character code', or */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* `undefined selector code', or `no variation selector cmap */
|
|
|
|
/* subtable', or `current CharMap is not Unicode'. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* If you use FreeType to manipulate the contents of font files */
|
|
|
|
/* directly, be aware that the glyph index returned by this function */
|
|
|
|
/* doesn't always correspond to the internal indices used within */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* the file. This is done to ensure that value~0 always corresponds */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* to the `missing glyph'. */
|
|
|
|
/* */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* This function is only meaningful if */
|
|
|
|
/* a) the font has a variation selector cmap sub table, */
|
|
|
|
/* and */
|
|
|
|
/* b) the current charmap has a Unicode encoding. */
|
|
|
|
/* */
|
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.6 */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_UInt )
|
2007-10-19 14:36:40 +02:00
|
|
|
FT_Face_GetCharVariantIndex( FT_Face face,
|
|
|
|
FT_ULong charcode,
|
|
|
|
FT_ULong variantSelector );
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* FT_Face_GetCharVariantIsDefault */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Check whether this variant of this Unicode character is the one to */
|
|
|
|
/* be found in the `cmap'. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: */
|
|
|
|
/* A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* charcode :: */
|
|
|
|
/* The character codepoint in Unicode. */
|
|
|
|
/* */
|
|
|
|
/* variantSelector :: */
|
|
|
|
/* The Unicode codepoint of the variation selector. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* 1~if found in the standard (Unicode) cmap, 0~if found in the */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* variation selector cmap, or -1 if it is not a variant. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* This function is only meaningful if the font has a variation */
|
|
|
|
/* selector cmap subtable. */
|
|
|
|
/* */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.6 */
|
|
|
|
/* */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
FT_EXPORT( FT_Int )
|
2007-10-19 14:36:40 +02:00
|
|
|
FT_Face_GetCharVariantIsDefault( FT_Face face,
|
|
|
|
FT_ULong charcode,
|
|
|
|
FT_ULong variantSelector );
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* FT_Face_GetVariantSelectors */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return a zero-terminated list of Unicode variant selectors found */
|
|
|
|
/* in the font. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* face :: */
|
|
|
|
/* A handle to the source face object. */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* A pointer to an array of selector code points, or NULL if there is */
|
|
|
|
/* no valid variant selector cmap subtable. */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The last item in the array is~0; the array is owned by the */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* @FT_Face object but can be overwritten or released on the next */
|
|
|
|
/* call to a FreeType function. */
|
|
|
|
/* */
|
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.6 */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_UInt32* )
|
2007-10-19 14:36:40 +02:00
|
|
|
FT_Face_GetVariantSelectors( FT_Face face );
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* FT_Face_GetVariantsOfChar */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return a zero-terminated list of Unicode variant selectors found */
|
|
|
|
/* for the specified character code. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: */
|
|
|
|
/* A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* charcode :: */
|
|
|
|
/* The character codepoint in Unicode. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* A pointer to an array of variant selector code points that are */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* active for the given character, or NULL if the corresponding list */
|
|
|
|
/* is empty. */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The last item in the array is~0; the array is owned by the */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* @FT_Face object but can be overwritten or released on the next */
|
|
|
|
/* call to a FreeType function. */
|
|
|
|
/* */
|
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.6 */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_UInt32* )
|
2007-10-19 14:36:40 +02:00
|
|
|
FT_Face_GetVariantsOfChar( FT_Face face,
|
|
|
|
FT_ULong charcode );
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2007-10-19 14:36:40 +02:00
|
|
|
/* FT_Face_GetCharsOfVariant */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return a zero-terminated list of Unicode character codes found for */
|
|
|
|
/* the specified variant selector. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: */
|
|
|
|
/* A handle to the source face object. */
|
|
|
|
/* */
|
|
|
|
/* variantSelector :: */
|
|
|
|
/* The variant selector code point in Unicode. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2013-09-03 11:33:10 +02:00
|
|
|
/* A list of all the code points that are specified by this selector */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* (both default and non-default codes are returned) or NULL if there */
|
|
|
|
/* is no valid cmap or the variant selector is invalid. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* The last item in the array is~0; the array is owned by the */
|
2007-10-20 18:15:07 +02:00
|
|
|
/* @FT_Face object but can be overwritten or released on the next */
|
|
|
|
/* call to a FreeType function. */
|
|
|
|
/* */
|
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.6 */
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_UInt32* )
|
2007-10-19 14:36:40 +02:00
|
|
|
FT_Face_GetCharsOfVariant( FT_Face face,
|
|
|
|
FT_ULong variantSelector );
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
|
|
|
|
|
2001-02-13 18:42:49 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* computations */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* Computations */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
Adding OpenType validation module. The code is based on the
(unfinished) `otlayout' module but has been heavily modified to make
it much more compact.
* src/otvalid/*: New module.
* include/freetype/ftotval.h, src/base/ftotval.c,
include/freetype/internal/services/svotval.h: New files.
* include/freetype/config/ftmodule.h: Add otv_module_class.
* include/freetype/config/ftheader.h (FT_OPENTYPE_VALIDATE_H): New
macro.
* include/freetype/internal/ftserv.h
(FT_SERVICE_OPENTYPE_VALIDATE_H): New macro.
* include/freetype/internal/fttrace.h (otvmodule, otvcommon,
otvbase, otvgdef, otvgpos, otvgsub, otvjstf): New trace components.
* include/freetype/ftchapters.h: Updated.
* src/base/Jamfile (Library), src/base/descrip.mms (OBJS),
src/base/rules.mk (BASE_EXT_SRC): Updated.
* docs/CHANGES: Updated.
2004-09-10 16:39:00 +02:00
|
|
|
/* Crunching fixed numbers and vectors. */
|
2001-02-13 18:42:49 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This section contains various functions used to perform */
|
|
|
|
/* computations on 16.16 fixed-float numbers or 2d vectors. */
|
|
|
|
/* */
|
|
|
|
/* <Order> */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_MulDiv */
|
|
|
|
/* FT_MulFix */
|
|
|
|
/* FT_DivFix */
|
2001-03-10 20:01:21 +01:00
|
|
|
/* FT_RoundFix */
|
|
|
|
/* FT_CeilFix */
|
2001-06-28 19:49:10 +02:00
|
|
|
/* FT_FloorFix */
|
2001-03-04 22:53:08 +01:00
|
|
|
/* FT_Vector_Transform */
|
|
|
|
/* FT_Matrix_Multiply */
|
|
|
|
/* FT_Matrix_Invert */
|
2001-02-13 18:42:49 +01:00
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2001-03-04 22:53:08 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_MulDiv */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* A very simple function used to perform the computation `(a*b)/c' */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* with maximum accuracy (it uses a 64-bit intermediate integer */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* whenever necessary). */
|
|
|
|
/* */
|
|
|
|
/* This function isn't necessarily as fast as some processor specific */
|
|
|
|
/* operations, but is at least completely portable. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* a :: The first multiplier. */
|
|
|
|
/* b :: The second multiplier. */
|
|
|
|
/* c :: The divisor. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The result of `(a*b)/c'. This function never traps when trying to */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* divide by zero; it simply returns `MaxInt' or `MinInt' depending */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* on the signs of `a' and `b'. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Long )
|
|
|
|
FT_MulDiv( FT_Long a,
|
|
|
|
FT_Long b,
|
|
|
|
FT_Long c );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_MulFix */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A very simple function used to perform the computation */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */
|
2013-01-13 01:17:05 +01:00
|
|
|
/* used to multiply a given value by a 16.16 fixed-point factor. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* a :: The first multiplier. */
|
|
|
|
/* b :: The second multiplier. Use a 16.16 factor here whenever */
|
|
|
|
/* possible (see note below). */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The result of `(a*b)/0x10000'. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* This function has been optimized for the case where the absolute */
|
|
|
|
/* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */
|
|
|
|
/* As this happens mainly when scaling from notional units to */
|
|
|
|
/* fractional pixels in FreeType, it resulted in noticeable speed */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* improvements between versions 2.x and 1.x. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* As a conclusion, always try to place a 16.16 factor as the */
|
|
|
|
/* _second_ argument of this function; this can make a great */
|
|
|
|
/* difference. */
|
|
|
|
/* */
|
2008-09-12 18:27:48 +02:00
|
|
|
FT_EXPORT( FT_Long )
|
|
|
|
FT_MulFix( FT_Long a,
|
|
|
|
FT_Long b );
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_DivFix */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A very simple function used to perform the computation */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */
|
2013-01-13 01:17:05 +01:00
|
|
|
/* used to divide a given value by a 16.16 fixed-point factor. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2014-09-04 04:55:26 +02:00
|
|
|
/* a :: The numerator. */
|
|
|
|
/* b :: The denominator. Use a 16.16 factor here. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The result of `(a*0x10000)/b'. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Long )
|
|
|
|
FT_DivFix( FT_Long a,
|
|
|
|
FT_Long b );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2001-03-10 20:01:21 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_RoundFix */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2001-03-11 12:28:39 +01:00
|
|
|
/* A very simple function used to round a 16.16 fixed number. */
|
2001-03-10 20:01:21 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* a :: The number to be rounded. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The result of `(a + 0x8000) & -0x10000'. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Fixed )
|
|
|
|
FT_RoundFix( FT_Fixed a );
|
2001-03-10 20:01:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_CeilFix */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A very simple function used to compute the ceiling function of a */
|
2001-03-11 12:28:39 +01:00
|
|
|
/* 16.16 fixed number. */
|
2001-03-10 20:01:21 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* a :: The number for which the ceiling function is to be computed. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The result of `(a + 0x10000 - 1) & -0x10000'. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Fixed )
|
|
|
|
FT_CeilFix( FT_Fixed a );
|
2001-03-10 20:01:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_FloorFix */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A very simple function used to compute the floor function of a */
|
2001-03-11 12:28:39 +01:00
|
|
|
/* 16.16 fixed number. */
|
2001-03-10 20:01:21 +01:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* a :: The number for which the floor function is to be computed. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The result of `a & -0x10000'. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Fixed )
|
|
|
|
FT_FloorFix( FT_Fixed a );
|
2001-03-10 20:01:21 +01:00
|
|
|
|
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Vector_Transform */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-13 15:53:28 +01:00
|
|
|
/* Transform a single vector through a 2x2 matrix. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* vector :: The target vector to transform. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* matrix :: A pointer to the source 2x2 matrix. */
|
|
|
|
/* */
|
2000-07-09 21:15:30 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* The result is undefined if either `vector' or `matrix' is invalid. */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( void )
|
2005-04-14 18:03:15 +02:00
|
|
|
FT_Vector_Transform( FT_Vector* vec,
|
|
|
|
const FT_Matrix* matrix );
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2006-05-12 15:55:04 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* version */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* FreeType Version */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* Functions and macros related to FreeType versions. */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Note that those functions and macros are of limited use because */
|
|
|
|
/* even a new release of FreeType with only documentation changes */
|
|
|
|
/* increases the version number. */
|
|
|
|
/* */
|
2014-12-02 23:06:04 +01:00
|
|
|
/* <Order> */
|
|
|
|
/* FT_Library_Version */
|
|
|
|
/* */
|
|
|
|
/* FREETYPE_MAJOR */
|
|
|
|
/* FREETYPE_MINOR */
|
|
|
|
/* FREETYPE_PATCH */
|
|
|
|
/* */
|
|
|
|
/* FT_Face_CheckTrueTypePatents */
|
|
|
|
/* FT_Face_SetUnpatentedHinting */
|
|
|
|
/* */
|
|
|
|
/* FREETYPE_XXX */
|
|
|
|
/* */
|
2006-05-12 15:55:04 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
*
|
2009-02-12 23:42:27 +01:00
|
|
|
* @enum:
|
|
|
|
* FREETYPE_XXX
|
2006-05-12 15:55:04 +02:00
|
|
|
*
|
2009-02-12 23:42:27 +01:00
|
|
|
* @description:
|
|
|
|
* These three macros identify the FreeType source code version.
|
|
|
|
* Use @FT_Library_Version to access them at runtime.
|
|
|
|
*
|
|
|
|
* @values:
|
|
|
|
* FREETYPE_MAJOR :: The major version number.
|
|
|
|
* FREETYPE_MINOR :: The minor version number.
|
|
|
|
* FREETYPE_PATCH :: The patch level.
|
2006-05-12 15:55:04 +02:00
|
|
|
*
|
2009-02-12 23:42:27 +01:00
|
|
|
* @note:
|
|
|
|
* The version number of FreeType if built as a dynamic link library
|
|
|
|
* with the `libtool' package is _not_ controlled by these three
|
|
|
|
* macros.
|
2006-05-12 15:55:04 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#define FREETYPE_MAJOR 2
|
* Version 2.5.0 released.
=========================
Tag sources with `VER-2-5-0'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.0.
* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
* include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
(FREETYPE_PATCH): Set to 0.
* builds/unix/configure.raw (version_info): Set to 16:2:10.
* src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
* src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
2013-06-19 10:23:36 +02:00
|
|
|
#define FREETYPE_MINOR 5
|
* Version 2.5.5 released.
=========================
Tag sources with `VER-2-5-5'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.5.5.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
* builds/unix/configure.raw (version_info): Set to 17:4:11.
* CMakeLists.txt (VERSION_PATCH): Set to 5.
* docs/CHANGES: Updated.
* builds/toplevel.mk (dist): Fix typos.
2014-12-30 21:44:51 +01:00
|
|
|
#define FREETYPE_PATCH 5
|
2006-05-12 15:55:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Library_Version */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return the version of the FreeType library being used. This is */
|
|
|
|
/* useful when dynamically linking to the library, since one cannot */
|
|
|
|
/* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */
|
|
|
|
/* @FREETYPE_PATCH. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* library :: A source library handle. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
|
|
|
/* amajor :: The major version number. */
|
|
|
|
/* */
|
|
|
|
/* aminor :: The minor version number. */
|
|
|
|
/* */
|
|
|
|
/* apatch :: The patch version number. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* The reason why this function takes a `library' argument is because */
|
|
|
|
/* certain programs implement library initialization in a custom way */
|
|
|
|
/* that doesn't use @FT_Init_FreeType. */
|
|
|
|
/* */
|
|
|
|
/* In such cases, the library version might not be available before */
|
|
|
|
/* the library object has been created. */
|
|
|
|
/* */
|
|
|
|
FT_EXPORT( void )
|
|
|
|
FT_Library_Version( FT_Library library,
|
|
|
|
FT_Int *amajor,
|
|
|
|
FT_Int *aminor,
|
|
|
|
FT_Int *apatch );
|
|
|
|
|
2007-06-10 22:51:04 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Face_CheckTrueTypePatents */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2007-06-11 06:55:58 +02:00
|
|
|
/* Parse all bytecode instructions of a TrueType font file to check */
|
|
|
|
/* whether any of the patented opcodes are used. This is only useful */
|
2007-06-10 22:51:04 +02:00
|
|
|
/* if you want to be able to use the unpatented hinter with */
|
|
|
|
/* fonts that do *not* use these opcodes. */
|
|
|
|
/* */
|
2007-06-11 06:55:58 +02:00
|
|
|
/* Note that this function parses *all* glyph instructions in the */
|
|
|
|
/* font file, which may be slow. */
|
2007-06-10 22:51:04 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2007-06-11 06:55:58 +02:00
|
|
|
/* face :: A face handle. */
|
2007-06-10 22:51:04 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 21:56:51 +02:00
|
|
|
/* 1~if this is a TrueType font that uses one of the patented */
|
|
|
|
/* opcodes, 0~otherwise. */
|
2007-06-10 22:51:04 +02:00
|
|
|
/* */
|
2010-07-04 07:37:56 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* Since May 2010, TrueType hinting is no longer patented. */
|
|
|
|
/* */
|
2007-07-02 16:58:58 +02:00
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.5 */
|
2007-07-01 11:51:15 +02:00
|
|
|
/* */
|
2007-06-10 22:51:04 +02:00
|
|
|
FT_EXPORT( FT_Bool )
|
2007-06-11 06:55:58 +02:00
|
|
|
FT_Face_CheckTrueTypePatents( FT_Face face );
|
2007-06-10 22:51:04 +02:00
|
|
|
|
2007-07-01 11:51:15 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Face_SetUnpatentedHinting */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Enable or disable the unpatented hinter for a given face. */
|
|
|
|
/* Only enable it if you have determined that the face doesn't */
|
|
|
|
/* use any patented opcodes (see @FT_Face_CheckTrueTypePatents). */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A face handle. */
|
2007-07-02 16:58:58 +02:00
|
|
|
/* */
|
|
|
|
/* value :: New boolean setting. */
|
2007-07-01 11:51:15 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2007-07-02 16:58:58 +02:00
|
|
|
/* The old setting value. This will always be false if this is not */
|
2008-12-11 09:55:48 +01:00
|
|
|
/* an SFNT font, or if the unpatented hinter is not compiled in this */
|
2007-07-02 16:58:58 +02:00
|
|
|
/* instance of the library. */
|
2007-07-01 11:51:15 +02:00
|
|
|
/* */
|
2010-07-04 07:37:56 +02:00
|
|
|
/* <Note> */
|
|
|
|
/* Since May 2010, TrueType hinting is no longer patented. */
|
|
|
|
/* */
|
2007-07-02 16:58:58 +02:00
|
|
|
/* <Since> */
|
|
|
|
/* 2.3.5 */
|
2007-07-01 11:51:15 +02:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Bool )
|
2007-07-02 16:58:58 +02:00
|
|
|
FT_Face_SetUnpatentedHinting( FT_Face face,
|
|
|
|
FT_Bool value );
|
2007-07-01 11:51:15 +02:00
|
|
|
|
2000-10-23 20:33:30 +02:00
|
|
|
/* */
|
2000-05-02 12:55:33 +02:00
|
|
|
|
2002-07-26 11:09:10 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_END_HEADER
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#endif /* __FREETYPE_H__ */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|