formatting, copyright years and messages, doc polishing
This commit is contained in:
parent
4f7496eea2
commit
cc7f12a429
23
ChangeLog
23
ChangeLog
|
@ -1,21 +1,22 @@
|
||||||
2007-01-08 David Turner <david@freetype.org>
|
2007-01-08 David Turner <david@freetype.org>
|
||||||
|
|
||||||
* docs/CHANGES: updating documentation
|
* docs/CHANGES: Updated.
|
||||||
|
|
||||||
* include/freetype/ftgasp.h, src/base/ftgasp.c: adding a
|
* include/freetype/ftgasp.h, src/base/ftgasp.c: New files which add
|
||||||
new API FT_Get_Gasp to return entries of the GASP table
|
a new API `FT_Get_Gasp' to return entries of the `gasp' table
|
||||||
corresponding to a given character pixel size.
|
corresponding to a given character pixel size.
|
||||||
|
|
||||||
* src/sfnt/ttload.c: add version check for the GASP table,
|
* src/sfnt/ttload.c (tt_face_load_gasp): Add version check for the
|
||||||
in order to be better future-proof
|
`gasp' table, in order to avoid potential problems with later
|
||||||
|
versions.
|
||||||
|
|
||||||
* include/freetype/config/ftheader.h: add definition of
|
* include/freetype/config/ftheader.h (FT_GASP_H): New macro for
|
||||||
FT_GASP_H, corresponding to <freetype/ftgasp.h>
|
<freetype/ftgasp.h>.
|
||||||
|
|
||||||
* src/base/rules.mk, src/base/Jamfile, modules.cfg,
|
* src/base/rules.mk (BASE_SRC), src/base/Jamfile (_sources),
|
||||||
builds/win32/visualc/freetype.dsp,
|
modules.cfg (BASE_EXTENSIONS), builds/win32/visualc/freetype.dsp,
|
||||||
builds/win32/visualc/freetype.vcproj: Adding src/base/ftgasp.c
|
builds/win32/visualc/freetype.vcproj: Add src/base/ftgasp.c to the
|
||||||
to the default build
|
default build.
|
||||||
|
|
||||||
2007-01-07 Werner Lemberg <wl@gnu.org>
|
2007-01-07 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
|
464
docs/CHANGES
464
docs/CHANGES
File diff suppressed because it is too large
Load Diff
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Build macros of the FreeType 2 library. */
|
/* Build macros of the FreeType 2 library. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
|
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
@ -685,7 +685,7 @@
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A macro used in #include statements to name the file containing the
|
* A macro used in #include statements to name the file containing the
|
||||||
* FreeType 2 API which returns entries from the TrueType GASP table
|
* FreeType 2 API which returns entries from the TrueType GASP table.
|
||||||
*/
|
*/
|
||||||
#define FT_GASP_H <freetype/ftgasp.h>
|
#define FT_GASP_H <freetype/ftgasp.h>
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,58 @@
|
||||||
|
/***************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* ftgasp.h */
|
||||||
|
/* */
|
||||||
|
/* Access of TrueType's `gasp' table (specification). */
|
||||||
|
/* */
|
||||||
|
/* Copyright 2007 by */
|
||||||
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
|
/* */
|
||||||
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
|
/* 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. */
|
||||||
|
/* */
|
||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _FT_GASP_H_
|
#ifndef _FT_GASP_H_
|
||||||
#define _FT_GASP_H_
|
#define _FT_GASP_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
|
||||||
/**
|
|
||||||
* @enum: FT_GASP_XXX
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
* @enum:
|
||||||
|
* FT_GASP_XXX
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* a list of values and/or bit-flags returned by the
|
* A list of values and/or bit-flags returned by the @FT_Get_Gasp
|
||||||
* @FT_Get_Gasp function.
|
* function.
|
||||||
*
|
*
|
||||||
* @values:
|
* @values:
|
||||||
* FT_GASP_NO_TABLE ::
|
* FT_GASP_NO_TABLE ::
|
||||||
* this special value means that there is no GASP table
|
* This special value means that there is no GASP table in this face.
|
||||||
* in this face. It's up to the client to decide what to
|
* It is up to the client to decide what to do.
|
||||||
* do
|
|
||||||
*
|
*
|
||||||
* FT_GASP_DO_GRIDFIT ::
|
* FT_GASP_DO_GRIDFIT ::
|
||||||
* indicates that grid-fitting/hinting should be
|
* Grid-fitting and hinting should be performed at the specified ppem.
|
||||||
* performed at the specified ppem. This *really*
|
* This *really* means TrueType bytecode interpretation.
|
||||||
* means TrueType bytecode interpretation
|
|
||||||
*
|
*
|
||||||
* FT_GASP_DO_GRAY ::
|
* FT_GASP_DO_GRAY ::
|
||||||
* indicates that anti-aliased rendering should be
|
* Anti-aliased rendering should be performed at the specified ppem.
|
||||||
* performed at the specified ppem
|
|
||||||
*
|
*
|
||||||
* FT_GASP_SYMMETRIC_SMOOTHING ::
|
* FT_GASP_SYMMETRIC_SMOOTHING ::
|
||||||
* indicates that smoothing along multiple axis
|
* Smoothing along multiple axes must be used with ClearType.
|
||||||
* must be used with ClearType.
|
|
||||||
*
|
*
|
||||||
* FT_GASP_SYMMETRIC_GRIDFIT ::
|
* FT_GASP_SYMMETRIC_GRIDFIT ::
|
||||||
* indicates that grid-fitting must be used with
|
* Grid-fitting must be used with ClearType's symmetric smoothing.
|
||||||
* ClearType's symmetric smoothing
|
*
|
||||||
|
* @note:
|
||||||
|
* `ClearType' is Microsoft's implementation of LCD rendering, partly
|
||||||
|
* protected by patents.
|
||||||
*/
|
*/
|
||||||
#define FT_GASP_NO_TABLE -1
|
#define FT_GASP_NO_TABLE -1
|
||||||
#define FT_GASP_DO_GRIDFIT 0x01
|
#define FT_GASP_DO_GRIDFIT 0x01
|
||||||
|
@ -40,21 +60,23 @@
|
||||||
#define FT_GASP_SYMMETRIC_SMOOTHING 0x08
|
#define FT_GASP_SYMMETRIC_SMOOTHING 0x08
|
||||||
#define FT_GASP_SYMMETRIC_GRIDFIT 0x10
|
#define FT_GASP_SYMMETRIC_GRIDFIT 0x10
|
||||||
|
|
||||||
/**
|
|
||||||
* @func: FT_Get_Gasp
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
* @func:
|
||||||
|
* FT_Get_Gasp
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* read the GASP table from a TrueType or OpenType font file
|
* Read the `gasp' table from a TrueType or OpenType font file and
|
||||||
* and return the entry corresponding to a given character
|
* return the entry corresponding to a given character pixel size.
|
||||||
* pixel size
|
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* face :: source face handle
|
* face :: The source face handle.
|
||||||
* ppem :: vertical character pixel size
|
* ppem :: The vertical character pixel size.
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* bit flags, or @FT_GASP_NO_TABLE is there is no GASP table
|
* Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE is there is no
|
||||||
* in the face.
|
* `gasp' table in the face.
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( FT_Int )
|
FT_EXPORT( FT_Int )
|
||||||
FT_Get_Gasp( FT_Face face,
|
FT_Get_Gasp( FT_Face face,
|
||||||
|
@ -63,3 +85,6 @@
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
#endif /* _FT_GASP_H_ */
|
#endif /* _FT_GASP_H_ */
|
||||||
|
|
||||||
|
|
||||||
|
/* END */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# modules.cfg
|
# modules.cfg
|
||||||
#
|
#
|
||||||
# Copyright 2005, 2006 by
|
# Copyright 2005, 2006, 2007 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used, modified,
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# FreeType 2 src/base Jamfile
|
# FreeType 2 src/base Jamfile
|
||||||
#
|
#
|
||||||
# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
|
# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used, modified,
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
|
|
|
@ -1,22 +1,44 @@
|
||||||
|
/***************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* ftgasp.c */
|
||||||
|
/* */
|
||||||
|
/* Access of TrueType's `gasp' table (body). */
|
||||||
|
/* */
|
||||||
|
/* Copyright 2007 by */
|
||||||
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
|
/* */
|
||||||
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
|
/* 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. */
|
||||||
|
/* */
|
||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_GASP_H
|
#include FT_GASP_H
|
||||||
#include FT_INTERNAL_TRUETYPE_TYPES_H
|
#include FT_INTERNAL_TRUETYPE_TYPES_H
|
||||||
|
|
||||||
|
|
||||||
FT_EXPORT_DEF( FT_Int )
|
FT_EXPORT_DEF( FT_Int )
|
||||||
FT_Get_Gasp( FT_Face face,
|
FT_Get_Gasp( FT_Face face,
|
||||||
FT_UInt ppem )
|
FT_UInt ppem )
|
||||||
{
|
{
|
||||||
FT_Int result = FT_GASP_NO_TABLE;
|
FT_Int result = FT_GASP_NO_TABLE;
|
||||||
|
|
||||||
if ( face && FT_IS_SFNT(face) )
|
|
||||||
|
if ( face && FT_IS_SFNT( face ) )
|
||||||
{
|
{
|
||||||
TT_Face ttface = (TT_Face)face;
|
TT_Face ttface = (TT_Face)face;
|
||||||
|
|
||||||
|
|
||||||
if ( ttface->gasp.numRanges > 0 )
|
if ( ttface->gasp.numRanges > 0 )
|
||||||
{
|
{
|
||||||
TT_GaspRange range = ttface->gasp.gaspRanges;
|
TT_GaspRange range = ttface->gasp.gaspRanges;
|
||||||
TT_GaspRange range_end = range + ttface->gasp.numRanges;
|
TT_GaspRange range_end = range + ttface->gasp.numRanges;
|
||||||
|
|
||||||
|
|
||||||
while ( ppem > range->maxPPEM )
|
while ( ppem > range->maxPPEM )
|
||||||
{
|
{
|
||||||
range++;
|
range++;
|
||||||
|
@ -26,7 +48,7 @@
|
||||||
|
|
||||||
result = range->gaspFlag;
|
result = range->gaspFlag;
|
||||||
|
|
||||||
/* ensure we don't have spurious bits */
|
/* ensure that we don't have spurious bits */
|
||||||
if ( ttface->gasp.version == 0 )
|
if ( ttface->gasp.version == 0 )
|
||||||
result &= 3;
|
result &= 3;
|
||||||
}
|
}
|
||||||
|
@ -36,3 +58,4 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* END */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006 by
|
# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007 by
|
||||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used, modified,
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
/* Load the basic TrueType tables, i.e., tables that can be either in */
|
/* Load the basic TrueType tables, i.e., tables that can be either in */
|
||||||
/* TTF or OTF fonts (body). */
|
/* TTF or OTF fonts (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
|
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
@ -1142,7 +1142,7 @@
|
||||||
if ( face->gasp.version >= 2 )
|
if ( face->gasp.version >= 2 )
|
||||||
{
|
{
|
||||||
face->gasp.numRanges = 0;
|
face->gasp.numRanges = 0;
|
||||||
error = FT_Err_Invalid_Table;
|
error = SFNT_Err_Invalid_Table;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue