2000-03-28 11:22:31 +00:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftglyph.h */
|
|
|
|
/* */
|
2000-07-14 06:16:47 +00:00
|
|
|
/* FreeType convenience functions to handle glyphs (specification). */
|
2000-03-28 11:22:31 +00:00
|
|
|
/* */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013 by */
|
2000-03-28 11:22:31 +00:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
2000-03-28 11:22:31 +00: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-10 00:06:22 +00:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* This file contains the definition of several convenience functions */
|
|
|
|
/* that can be used by client applications to easily retrieve glyph */
|
|
|
|
/* bitmaps and outlines from a given face. */
|
|
|
|
/* */
|
|
|
|
/* These functions should be optional if you are writing a font server */
|
|
|
|
/* or text layout engine on top of FreeType. However, they are pretty */
|
|
|
|
/* handy for many other simple uses of the library. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
2000-11-30 23:12:33 +00:00
|
|
|
#ifndef __FTGLYPH_H__
|
|
|
|
#define __FTGLYPH_H__
|
2000-03-28 11:22:31 +00:00
|
|
|
|
2000-12-09 00:45:38 +00:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
|
|
|
|
2003-11-04 07:44:19 +00:00
|
|
|
#ifdef FREETYPE_H
|
|
|
|
#error "freetype.h of FreeType 1 has been loaded!"
|
|
|
|
#error "Please fix the directory search order for header files"
|
|
|
|
#error "so that freetype.h of FreeType 2 is found first."
|
|
|
|
#endif
|
|
|
|
|
2000-11-30 23:12:33 +00:00
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
|
2001-01-10 11:15:48 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* <Section> */
|
|
|
|
/* glyph_management */
|
2001-01-10 11:15:48 +00:00
|
|
|
/* */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* <Title> */
|
|
|
|
/* Glyph Management */
|
2001-01-10 11:15:48 +00:00
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* Generic interface to manage individual glyph data. */
|
2001-01-10 11:15:48 +00:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This section contains definitions used to manage glyph data */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* through generic FT_Glyph objects. Each of them can contain a */
|
|
|
|
/* bitmap, a vector outline, or even images in other formats. */
|
2001-01-10 11:15:48 +00:00
|
|
|
/* */
|
2001-01-11 09:27:49 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-05-22 16:25:14 +00:00
|
|
|
|
2000-06-30 23:12:55 +00:00
|
|
|
/* forward declaration to a private type */
|
|
|
|
typedef struct FT_Glyph_Class_ FT_Glyph_Class;
|
2000-03-28 11:22:31 +00:00
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
|
2001-12-14 14:52:58 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_Glyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2001-12-16 08:17:33 +00:00
|
|
|
/* Handle to an object used to model generic glyph images. It is a */
|
2001-12-14 14:52:58 +00:00
|
|
|
/* pointer to the @FT_GlyphRec structure and can contain a glyph */
|
2001-12-16 08:17:33 +00:00
|
|
|
/* bitmap or pointer. */
|
2001-12-14 14:52:58 +00:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2001-12-16 08:17:33 +00:00
|
|
|
/* Glyph objects are not owned by the library. You must thus release */
|
2001-12-14 14:52:58 +00:00
|
|
|
/* them manually (through @FT_Done_Glyph) _before_ calling */
|
|
|
|
/* @FT_Done_FreeType. */
|
|
|
|
/* */
|
2001-12-16 08:17:33 +00:00
|
|
|
typedef struct FT_GlyphRec_* FT_Glyph;
|
2001-12-14 14:52:58 +00:00
|
|
|
|
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_GlyphRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The root glyph structure contains a given glyph image plus its */
|
2013-01-13 00:17:05 +00:00
|
|
|
/* advance width in 16.16 fixed-point format. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* library :: A handle to the FreeType library object. */
|
|
|
|
/* */
|
|
|
|
/* clazz :: A pointer to the glyph's class. Private. */
|
|
|
|
/* */
|
|
|
|
/* format :: The format of the glyph's image. */
|
|
|
|
/* */
|
|
|
|
/* advance :: A 16.16 vector that gives the glyph's advance width. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_GlyphRec_
|
2000-03-28 11:22:31 +00:00
|
|
|
{
|
2000-06-30 23:12:55 +00:00
|
|
|
FT_Library library;
|
|
|
|
const FT_Glyph_Class* clazz;
|
|
|
|
FT_Glyph_Format format;
|
|
|
|
FT_Vector advance;
|
2000-05-16 23:44:38 +00:00
|
|
|
|
2001-12-14 14:52:58 +00:00
|
|
|
} FT_GlyphRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_BitmapGlyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2001-12-16 08:17:33 +00:00
|
|
|
/* A handle to an object used to model a bitmap glyph image. This is */
|
|
|
|
/* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */
|
2001-12-14 14:52:58 +00:00
|
|
|
/* */
|
2001-12-16 08:17:33 +00:00
|
|
|
typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph;
|
2000-03-28 11:22:31 +00:00
|
|
|
|
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_BitmapGlyphRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used for bitmap glyph images. This really is a */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* `sub-class' of @FT_GlyphRec. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* root :: The root @FT_Glyph fields. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* left :: The left-side bearing, i.e., the horizontal distance */
|
|
|
|
/* from the current pen position to the left border of the */
|
|
|
|
/* glyph bitmap. */
|
|
|
|
/* */
|
|
|
|
/* top :: The top-side bearing, i.e., the vertical distance from */
|
|
|
|
/* the current pen position to the top border of the glyph */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* bitmap. This distance is positive for upwards~y! */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* bitmap :: A descriptor for the bitmap. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */
|
2006-04-22 12:24:52 +00:00
|
|
|
/* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* the bitmap's contents easily. */
|
|
|
|
/* */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* and is thus created and destroyed with it. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_BitmapGlyphRec_
|
2000-03-28 11:22:31 +00:00
|
|
|
{
|
2000-06-30 23:12:55 +00:00
|
|
|
FT_GlyphRec root;
|
2000-03-28 11:22:31 +00:00
|
|
|
FT_Int left;
|
|
|
|
FT_Int top;
|
|
|
|
FT_Bitmap bitmap;
|
2000-05-16 23:44:38 +00:00
|
|
|
|
2001-12-14 14:52:58 +00:00
|
|
|
} FT_BitmapGlyphRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* FT_OutlineGlyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2001-12-16 08:17:33 +00:00
|
|
|
/* A handle to an object used to model an outline glyph image. This */
|
|
|
|
/* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */
|
2001-12-14 14:52:58 +00:00
|
|
|
/* */
|
2001-12-16 08:17:33 +00:00
|
|
|
typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph;
|
2000-03-28 11:22:31 +00:00
|
|
|
|
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_OutlineGlyphRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used for outline (vectorial) glyph images. This */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* really is a `sub-class' of @FT_GlyphRec. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* root :: The root @FT_Glyph fields. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* outline :: A descriptor for the outline. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2009-03-03 14:26:47 +00:00
|
|
|
/* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */
|
2006-04-22 12:24:52 +00:00
|
|
|
/* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* the outline's content easily. */
|
|
|
|
/* */
|
|
|
|
/* As the outline is extracted from a glyph slot, its coordinates are */
|
|
|
|
/* expressed normally in 26.6 pixels, unless the flag */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* The outline's tables are always owned by the object and are */
|
|
|
|
/* destroyed with it. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_OutlineGlyphRec_
|
2000-03-28 11:22:31 +00:00
|
|
|
{
|
2000-06-30 23:12:55 +00:00
|
|
|
FT_GlyphRec root;
|
2000-03-28 11:22:31 +00:00
|
|
|
FT_Outline outline;
|
2000-05-16 23:44:38 +00:00
|
|
|
|
2001-12-14 14:52:58 +00:00
|
|
|
} FT_OutlineGlyphRec;
|
2000-06-30 23:12:55 +00:00
|
|
|
|
2000-03-28 11:22:31 +00:00
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Glyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-08-05 11:18:45 +00:00
|
|
|
/* A function used to extract a glyph image from a slot. Note that */
|
|
|
|
/* the created @FT_Glyph object must be released with @FT_Done_Glyph. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* slot :: A handle to the source glyph slot. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
|
|
|
/* aglyph :: A handle to the glyph object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_Glyph( FT_GlyphSlot slot,
|
|
|
|
FT_Glyph *aglyph );
|
2000-07-10 00:06:22 +00:00
|
|
|
|
2000-03-28 11:22:31 +00:00
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Glyph_Copy */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2003-10-18 16:56:13 +00:00
|
|
|
/* A function used to copy a glyph image. Note that the created */
|
|
|
|
/* @FT_Glyph object must be released with @FT_Done_Glyph. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* source :: A handle to the source glyph object. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* target :: A handle to the target glyph object. 0~in case of */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* error. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Glyph_Copy( FT_Glyph source,
|
|
|
|
FT_Glyph *target );
|
2000-05-16 23:44:38 +00:00
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Glyph_Transform */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* Transform a glyph image if its format is scalable. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2000-11-06 04:33:56 +00:00
|
|
|
/* <InOut> */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* glyph :: A handle to the target glyph object. */
|
|
|
|
/* */
|
2000-11-06 04:33:56 +00:00
|
|
|
/* <Input> */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* matrix :: A pointer to a 2x2 matrix to apply. */
|
|
|
|
/* */
|
|
|
|
/* delta :: A pointer to a 2d vector to apply. Coordinates are */
|
|
|
|
/* expressed in 1/64th of a pixel. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2006-04-22 12:24:52 +00:00
|
|
|
/* FreeType error code (if not 0, the glyph format is not scalable). */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* The 2x2 transformation matrix is also applied to the glyph's */
|
|
|
|
/* advance vector. */
|
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Glyph_Transform( FT_Glyph glyph,
|
|
|
|
FT_Matrix* matrix,
|
|
|
|
FT_Vector* delta );
|
2000-07-10 00:06:22 +00:00
|
|
|
|
2003-07-25 05:57:21 +00:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* FT_Glyph_BBox_Mode */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The mode how the values of @FT_Glyph_Get_CBox are returned. */
|
|
|
|
/* */
|
|
|
|
/* <Values> */
|
|
|
|
/* FT_GLYPH_BBOX_UNSCALED :: */
|
|
|
|
/* Return unscaled font units. */
|
|
|
|
/* */
|
|
|
|
/* FT_GLYPH_BBOX_SUBPIXELS :: */
|
|
|
|
/* Return unfitted 26.6 coordinates. */
|
|
|
|
/* */
|
|
|
|
/* FT_GLYPH_BBOX_GRIDFIT :: */
|
|
|
|
/* Return grid-fitted 26.6 coordinates. */
|
|
|
|
/* */
|
|
|
|
/* FT_GLYPH_BBOX_TRUNCATE :: */
|
|
|
|
/* Return coordinates in integer pixels. */
|
|
|
|
/* */
|
|
|
|
/* FT_GLYPH_BBOX_PIXELS :: */
|
|
|
|
/* Return grid-fitted pixel coordinates. */
|
|
|
|
/* */
|
|
|
|
typedef enum FT_Glyph_BBox_Mode_
|
|
|
|
{
|
|
|
|
FT_GLYPH_BBOX_UNSCALED = 0,
|
|
|
|
FT_GLYPH_BBOX_SUBPIXELS = 0,
|
|
|
|
FT_GLYPH_BBOX_GRIDFIT = 1,
|
|
|
|
FT_GLYPH_BBOX_TRUNCATE = 2,
|
|
|
|
FT_GLYPH_BBOX_PIXELS = 3
|
|
|
|
|
|
|
|
} FT_Glyph_BBox_Mode;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Enum> */
|
|
|
|
/* ft_glyph_bbox_xxx */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* These constants are deprecated. Use the corresponding */
|
|
|
|
/* @FT_Glyph_BBox_Mode values instead. */
|
|
|
|
/* */
|
|
|
|
/* <Values> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */
|
|
|
|
/* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */
|
|
|
|
/* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */
|
|
|
|
/* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */
|
|
|
|
/* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */
|
2003-07-25 05:57:21 +00:00
|
|
|
/* */
|
|
|
|
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
|
|
|
|
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
|
|
|
|
#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
|
|
|
|
#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE
|
|
|
|
#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS
|
|
|
|
|
2001-06-28 17:49:10 +00:00
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Glyph_Get_CBox */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* Return a glyph's `control box'. The control box encloses all the */
|
2006-05-12 14:20:43 +00:00
|
|
|
/* outline's points, including Bézier control points. Though it */
|
2000-11-06 04:33:56 +00:00
|
|
|
/* coincides with the exact bounding box for most glyphs, it can be */
|
|
|
|
/* slightly larger in some situations (like when rotating an outline */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* that contains Bézier outside arcs). */
|
2000-11-06 04:33:56 +00:00
|
|
|
/* */
|
|
|
|
/* Computing the control box is very fast, while getting the bounding */
|
|
|
|
/* box can take much more time as it needs to walk over all segments */
|
|
|
|
/* and arcs in the outline. To get the latter, you can use the */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* `ftbbox' component, which is dedicated to this single task. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* glyph :: A handle to the source glyph object. */
|
|
|
|
/* */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* mode :: The mode that indicates how to interpret the returned */
|
2000-10-11 23:31:12 +00:00
|
|
|
/* bounding box values. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2000-11-06 04:33:56 +00:00
|
|
|
/* acbox :: The glyph coordinate bounding box. Coordinates are */
|
|
|
|
/* expressed in 1/64th of pixels if it is grid-fitted. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* Coordinates are relative to the glyph origin, using the y~upwards */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* convention. */
|
|
|
|
/* */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */
|
|
|
|
/* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */
|
|
|
|
/* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */
|
* 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 10:42:27 +00:00
|
|
|
/* is another name for this constant. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2011-04-12 22:29:41 +00:00
|
|
|
/* If the font is tricky and the glyph has been loaded with */
|
|
|
|
/* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
|
|
|
|
/* reasonable values for the CBox it is necessary to load the glyph */
|
|
|
|
/* at a large ppem value (so that the hinting instructions can */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* properly shift and scale the subglyphs), then extracting the CBox, */
|
2011-04-12 22:29:41 +00:00
|
|
|
/* which can be eventually converted back to font units. */
|
|
|
|
/* */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* Note that the maximum coordinates are exclusive, which means that */
|
|
|
|
/* one can compute the width and height of the glyph image (be it in */
|
|
|
|
/* integer or 26.6 pixels) as: */
|
|
|
|
/* */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* { */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* width = bbox.xMax - bbox.xMin; */
|
|
|
|
/* height = bbox.yMax - bbox.yMin; */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* } */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2000-10-11 23:31:12 +00:00
|
|
|
/* Note also that for 26.6 coordinates, if `bbox_mode' is set to */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */
|
2000-10-11 23:31:12 +00:00
|
|
|
/* which corresponds to: */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* { */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* bbox.xMin = FLOOR(bbox.xMin); */
|
|
|
|
/* bbox.yMin = FLOOR(bbox.yMin); */
|
|
|
|
/* bbox.xMax = CEILING(bbox.xMax); */
|
|
|
|
/* bbox.yMax = CEILING(bbox.yMax); */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* } */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2000-10-11 23:31:12 +00:00
|
|
|
/* To get the bbox in pixel coordinates, set `bbox_mode' to */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* @FT_GLYPH_BBOX_TRUNCATE. */
|
2000-10-11 23:31:12 +00:00
|
|
|
/* */
|
|
|
|
/* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */
|
2006-04-13 16:31:02 +00:00
|
|
|
/* to @FT_GLYPH_BBOX_PIXELS. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( void )
|
|
|
|
FT_Glyph_Get_CBox( FT_Glyph glyph,
|
|
|
|
FT_UInt bbox_mode,
|
|
|
|
FT_BBox *acbox );
|
2000-07-10 00:06:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Glyph_To_Bitmap */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* Convert a given glyph object to a bitmap glyph object. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
2000-11-06 04:33:56 +00:00
|
|
|
/* the_glyph :: A pointer to a handle to the target glyph. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2008-08-05 18:36:15 +00:00
|
|
|
/* render_mode :: An enumeration that describes how the data is */
|
* 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 11:09:23 +00:00
|
|
|
/* rendered. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* origin :: A pointer to a vector used to translate the glyph */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* image before rendering. Can be~0 (if no */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* translation). The origin is expressed in */
|
|
|
|
/* 26.6 pixels. */
|
|
|
|
/* */
|
|
|
|
/* destroy :: A boolean that indicates that the original glyph */
|
|
|
|
/* image should be destroyed by this function. It is */
|
|
|
|
/* never destroyed in case of error. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2008-08-06 09:09:41 +00:00
|
|
|
/* This function does nothing if the glyph format isn't scalable. */
|
|
|
|
/* */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* The glyph image is translated with the `origin' vector before */
|
2003-05-28 06:10:57 +00:00
|
|
|
/* rendering. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* The first parameter is a pointer to an @FT_Glyph handle, that will */
|
2008-08-05 18:36:15 +00:00
|
|
|
/* be _replaced_ by this function (with newly allocated data). */
|
|
|
|
/* Typically, you would use (omitting error handling): */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* { */
|
|
|
|
/* FT_Glyph glyph; */
|
|
|
|
/* FT_BitmapGlyph glyph_bitmap; */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* // load glyph */
|
|
|
|
/* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */
|
|
|
|
/* */
|
|
|
|
/* // extract glyph image */
|
|
|
|
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
|
|
|
|
/* */
|
2008-08-05 18:36:15 +00:00
|
|
|
/* // convert to a bitmap (default render mode + destroying old) */
|
* 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 20:20:29 +00:00
|
|
|
/* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* { */
|
2009-10-18 07:47:52 +00:00
|
|
|
/* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* 0, 1 ); */
|
2008-08-05 18:36:15 +00:00
|
|
|
/* if ( error ) // `glyph' unchanged */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* ... */
|
|
|
|
/* } */
|
|
|
|
/* */
|
|
|
|
/* // access bitmap content by typecasting */
|
|
|
|
/* glyph_bitmap = (FT_BitmapGlyph)glyph; */
|
|
|
|
/* */
|
|
|
|
/* // do funny stuff with it, like blitting/drawing */
|
|
|
|
/* ... */
|
|
|
|
/* */
|
|
|
|
/* // discard glyph image (bitmap or not) */
|
|
|
|
/* FT_Done_Glyph( glyph ); */
|
|
|
|
/* } */
|
|
|
|
/* */
|
|
|
|
/* */
|
2008-08-06 09:09:41 +00:00
|
|
|
/* Here another example, again without error handling: */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* { */
|
|
|
|
/* FT_Glyph glyphs[MAX_GLYPHS] */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* ... */
|
|
|
|
/* */
|
|
|
|
/* for ( idx = 0; i < MAX_GLYPHS; i++ ) */
|
|
|
|
/* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */
|
|
|
|
/* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */
|
|
|
|
/* */
|
|
|
|
/* ... */
|
|
|
|
/* */
|
|
|
|
/* for ( idx = 0; i < MAX_GLYPHS; i++ ) */
|
|
|
|
/* { */
|
|
|
|
/* FT_Glyph bitmap = glyphs[idx]; */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* ... */
|
|
|
|
/* */
|
|
|
|
/* // after this call, `bitmap' no longer points into */
|
|
|
|
/* // the `glyphs' array (and the old value isn't destroyed) */
|
|
|
|
/* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */
|
|
|
|
/* */
|
|
|
|
/* ... */
|
|
|
|
/* */
|
|
|
|
/* FT_Done_Glyph( bitmap ); */
|
|
|
|
/* } */
|
|
|
|
/* */
|
|
|
|
/* ... */
|
|
|
|
/* */
|
|
|
|
/* for ( idx = 0; i < MAX_GLYPHS; i++ ) */
|
|
|
|
/* FT_Done_Glyph( glyphs[idx] ); */
|
|
|
|
/* } */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
2001-06-28 07:17:51 +00: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 11:09:23 +00:00
|
|
|
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
|
|
|
|
FT_Render_Mode render_mode,
|
|
|
|
FT_Vector* origin,
|
|
|
|
FT_Bool destroy );
|
2000-07-10 14:24:26 +00:00
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Done_Glyph */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* Destroy a given glyph. */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* glyph :: A handle to the target glyph object. */
|
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( void )
|
|
|
|
FT_Done_Glyph( FT_Glyph glyph );
|
2000-06-30 23:12:55 +00:00
|
|
|
|
2006-05-12 08:00:13 +00:00
|
|
|
/* */
|
|
|
|
|
2000-06-30 23:12:55 +00:00
|
|
|
|
|
|
|
/* other helpful functions */
|
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
2001-02-13 17:42:49 +00:00
|
|
|
/* computations */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-10 00:06:22 +00:00
|
|
|
|
2000-06-30 23:12:55 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Matrix_Multiply */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* Perform the matrix operation `b = a*b'. */
|
2000-06-30 23:12:55 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* a :: A pointer to matrix `a'. */
|
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* b :: A pointer to matrix `b'. */
|
|
|
|
/* */
|
2000-07-10 00:06:22 +00:00
|
|
|
/* <Note> */
|
|
|
|
/* The result is undefined if either `a' or `b' is zero. */
|
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( void )
|
2003-01-14 15:53:33 +00:00
|
|
|
FT_Matrix_Multiply( const FT_Matrix* a,
|
2008-04-13 21:59:29 +00:00
|
|
|
FT_Matrix* b );
|
2000-06-30 23:12:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Matrix_Invert */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* Invert a 2x2 matrix. Return an error if it can't be inverted. */
|
2000-06-30 23:12:55 +00:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* matrix :: A pointer to the target matrix. Remains untouched in */
|
|
|
|
/* case of error. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-06-30 23:12:55 +00:00
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Matrix_Invert( FT_Matrix* matrix );
|
2000-06-30 23:12:55 +00:00
|
|
|
|
2000-03-28 11:22:31 +00:00
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
/* */
|
|
|
|
|
|
|
|
|
2000-11-30 23:12:33 +00:00
|
|
|
FT_END_HEADER
|
2000-05-22 16:25:14 +00:00
|
|
|
|
2000-11-30 23:12:33 +00:00
|
|
|
#endif /* __FTGLYPH_H__ */
|
2000-07-10 00:06:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|
2006-05-12 14:20:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Local Variables: */
|
|
|
|
/* coding: utf-8 */
|
|
|
|
/* End: */
|