mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-updated libpng from 1.2.29 to 1.6.2
-updated zlib from 1.2.7 to 1.2.8 -updated freetype from 2.4.10 to 2.4.12 -got back from libjpeg 8d to libjpeg 6b -clean compiled tremor-lowmem lib -removed some unneeded files
This commit is contained in:
parent
1fe1b06ca1
commit
d936063bd4
@ -5,7 +5,7 @@
|
||||
/* */
|
||||
/* UNIX-specific configuration file (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2004, 2006-2009, 2011 by */
|
||||
/* Copyright 1996-2004, 2006-2009, 2011, 2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -176,13 +176,77 @@ FT_BEGIN_HEADER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* IntN types */
|
||||
/* <Section> */
|
||||
/* basic_types */
|
||||
/* */
|
||||
/* Used to guarantee the size of some specific integers. */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Int16 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A typedef for a 16bit signed integer type. */
|
||||
/* */
|
||||
typedef signed short FT_Int16;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_UInt16 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A typedef for a 16bit unsigned integer type. */
|
||||
/* */
|
||||
typedef unsigned short FT_UInt16;
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/* this #if 0 ... #endif clause is for documentation purposes */
|
||||
#if 0
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Int32 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A typedef for a 32bit signed integer type. The size depends on */
|
||||
/* the configuration. */
|
||||
/* */
|
||||
typedef signed XXX FT_Int32;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_UInt32 */
|
||||
/* */
|
||||
/* A typedef for a 32bit unsigned integer type. The size depends on */
|
||||
/* the configuration. */
|
||||
/* */
|
||||
typedef unsigned XXX FT_UInt32;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Int64 */
|
||||
/* */
|
||||
/* A typedef for a 64bit signed integer type. The size depends on */
|
||||
/* the configuration. Only defined if there is real 64bit support; */
|
||||
/* otherwise, it gets emulated with a structure (if necessary). */
|
||||
/* */
|
||||
typedef signed XXX FT_Int64;
|
||||
|
||||
/* */
|
||||
|
||||
#endif
|
||||
|
||||
#if FT_SIZEOF_INT == 4
|
||||
|
||||
typedef signed int FT_Int32;
|
||||
@ -275,6 +339,10 @@ FT_BEGIN_HEADER
|
||||
|
||||
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
|
||||
|
||||
#ifdef FT_LONG64
|
||||
typedef FT_INT64 FT_Int64;
|
||||
#endif
|
||||
|
||||
|
||||
#define FT_BEGIN_STMNT do {
|
||||
#define FT_END_STMNT } while ( 0 )
|
||||
@ -337,7 +405,8 @@ FT_BEGIN_HEADER
|
||||
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
|
||||
"orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
|
||||
: "=r"(a), "=&r"(t2), "=&r"(t)
|
||||
: "r"(a), "r"(b) );
|
||||
: "r"(a), "r"(b)
|
||||
: "cc" );
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Build macros of the FreeType 2 library. */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
|
||||
/* Copyright 1996-2008, 2010, 2012, 2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -315,6 +315,32 @@
|
||||
#define FT_RENDER_H <freetype/ftrender.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_AUTOHINTER_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the auto-hinting module.
|
||||
*
|
||||
*/
|
||||
#define FT_AUTOHINTER_H <freetype/ftautoh.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_CFF_DRIVER_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the CFF driver module.
|
||||
*
|
||||
*/
|
||||
#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
|
@ -1,16 +1,4 @@
|
||||
/*
|
||||
* This file registers the FreeType modules compiled into the library.
|
||||
*
|
||||
* If you use GNU make, this file IS NOT USED! Instead, it is created in
|
||||
* the objects directory (normally `<topdir>/objs/') based on information
|
||||
* from `<topdir>/modules.cfg'.
|
||||
*
|
||||
* Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
|
||||
* FreeType without GNU make.
|
||||
*
|
||||
*/
|
||||
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
/* This is a generated file. */
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
|
||||
@ -19,14 +7,14 @@ FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
|
||||
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
|
||||
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
/* EOF */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* User-selectable configuration macros (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2012 by */
|
||||
/* Copyright 1996-2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -309,7 +309,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Note that the `FOND' resource isn't checked. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_MAC_FONTS */
|
||||
#define FT_CONFIG_OPTION_MAC_FONTS
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -558,6 +558,28 @@ FT_BEGIN_HEADER
|
||||
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
|
||||
/* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */
|
||||
/* replaces the native TrueType hinting mechanism when anything but */
|
||||
/* FT_RENDER_MODE_MONO is requested. */
|
||||
/* */
|
||||
/* Enabling this causes the TrueType driver to ignore instructions under */
|
||||
/* certain conditions. This is done in accordance with the guide here, */
|
||||
/* with some minor differences: */
|
||||
/* */
|
||||
/* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
|
||||
/* */
|
||||
/* By undefining this, you only compile the code necessary to hint */
|
||||
/* TrueType glyphs with native TT hinting. */
|
||||
/* */
|
||||
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
|
||||
/* defined. */
|
||||
/* */
|
||||
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
|
||||
@ -761,7 +783,7 @@ FT_BEGIN_HEADER
|
||||
* is recommended to disable the macro since it reduces the library's code
|
||||
* size and activates a few memory-saving optimizations as well.
|
||||
*/
|
||||
#define FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* ANSI-specific library and header configuration file (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 2002-2007, 2009, 2011 by */
|
||||
/* Copyright 2002-2007, 2009, 2011-2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -159,7 +159,7 @@
|
||||
/* on certain platforms */
|
||||
|
||||
#define ft_longjmp longjmp
|
||||
#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */
|
||||
#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
|
||||
|
||||
|
||||
/* the following is only used for debugging purposes, i.e., if */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType high-level API and common types (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2012 by */
|
||||
/* Copyright 1996-2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -31,8 +31,8 @@
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include FT_ERRORS_H
|
||||
#include FT_TYPES_H
|
||||
#include FT_ERRORS_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
@ -875,12 +875,15 @@ FT_BEGIN_HEADER
|
||||
/* usually negative. Only relevant for */
|
||||
/* scalable formats. */
|
||||
/* */
|
||||
/* height :: The height is the vertical distance */
|
||||
/* height :: This value is the vertical distance */
|
||||
/* between two consecutive baselines, */
|
||||
/* expressed in font units. It is always */
|
||||
/* positive. Only relevant for scalable */
|
||||
/* formats. */
|
||||
/* */
|
||||
/* If you want the global glyph height, use */
|
||||
/* `ascender - descender'. */
|
||||
/* */
|
||||
/* max_advance_width :: The maximum advance width, in font units, */
|
||||
/* for all glyphs in this face. This can be */
|
||||
/* used to make word wrapping computations */
|
||||
@ -1109,8 +1112,8 @@ FT_BEGIN_HEADER
|
||||
* FT_HAS_VERTICAL( face )
|
||||
*
|
||||
* @description:
|
||||
* A macro that returns true whenever a face object contains vertical
|
||||
* metrics.
|
||||
* A macro that returns true whenever a face object contains real
|
||||
* vertical metrics (and not only synthesized ones).
|
||||
*
|
||||
*/
|
||||
#define FT_HAS_VERTICAL( face ) \
|
||||
@ -2231,6 +2234,12 @@ FT_BEGIN_HEADER
|
||||
/* particular bitmap strike. Use @FT_Select_Size instead in that */
|
||||
/* case. */
|
||||
/* */
|
||||
/* 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' */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Request_Size( FT_Face face,
|
||||
FT_Size_Request req );
|
||||
@ -2300,6 +2309,11 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Pixel_Sizes( FT_Face face,
|
||||
FT_UInt pixel_width,
|
||||
@ -2413,14 +2427,20 @@ FT_BEGIN_HEADER
|
||||
* behaviour to more specific and useful cases.
|
||||
*
|
||||
* FT_LOAD_NO_SCALE ::
|
||||
* Don't scale the outline glyph loaded, but keep it in font units.
|
||||
* Don't scale the loaded outline glyph but keep it in font units.
|
||||
*
|
||||
* This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
|
||||
* unsets @FT_LOAD_RENDER.
|
||||
*
|
||||
* If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using
|
||||
* FT_LOAD_NO_SCALE usually yields meaningless outlines because the
|
||||
* subglyphs must be scaled and positioned with hinting instructions.
|
||||
* This can be solved by loading the font without FT_LOAD_NO_SCALE and
|
||||
* setting the character size to `font->units_per_EM'.
|
||||
*
|
||||
* FT_LOAD_NO_HINTING ::
|
||||
* Disable hinting. This generally generates `blurrier' bitmap glyph
|
||||
* when the glyph is rendered in any of the anti-aliased modes. See
|
||||
* Disable hinting. This generally generates `blurrier' bitmap glyphs
|
||||
* when the glyph are rendered in any of the anti-aliased modes. See
|
||||
* also the note below.
|
||||
*
|
||||
* This flag is implied by @FT_LOAD_NO_SCALE.
|
||||
@ -2439,8 +2459,14 @@ FT_BEGIN_HEADER
|
||||
* @FT_LOAD_NO_SCALE always sets this flag.
|
||||
*
|
||||
* FT_LOAD_VERTICAL_LAYOUT ::
|
||||
* Load the glyph for vertical text layout. _Don't_ use it as it is
|
||||
* problematic currently.
|
||||
* 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.
|
||||
*
|
||||
* FT_LOAD_FORCE_AUTOHINT ::
|
||||
* Indicates that the auto-hinter is preferred over the font's native
|
||||
@ -3401,9 +3427,13 @@ FT_BEGIN_HEADER
|
||||
/* code range for CJK characters. */
|
||||
/* */
|
||||
/* An IVS is registered and unique; for further details please refer */
|
||||
/* to Unicode Technical Report #37, the Ideographic Variation */
|
||||
/* Database. To date (October 2007), the character with the most */
|
||||
/* variants is U+908A, having 8~such IVS. */
|
||||
/* to Unicode Technical Standard #37, the Ideographic Variation */
|
||||
/* Database: */
|
||||
/* */
|
||||
/* http://www.unicode.org/reports/tr37/ */
|
||||
/* */
|
||||
/* To date (November 2012), the character with the most variants is */
|
||||
/* U+9089, having 31 such IVS. */
|
||||
/* */
|
||||
/* Adobe and MS decided to support IVS with a new cmap subtable */
|
||||
/* (format~14). It is an odd subtable because it is not a mapping of */
|
||||
@ -3668,7 +3698,7 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* A very simple function used to perform the computation */
|
||||
/* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */
|
||||
/* used to multiply a given value by a 16.16 fixed float factor. */
|
||||
/* used to multiply a given value by a 16.16 fixed-point factor. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* a :: The first multiplier. */
|
||||
@ -3713,7 +3743,7 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* A very simple function used to perform the computation */
|
||||
/* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */
|
||||
/* used to divide a given value by a 16.16 fixed float factor. */
|
||||
/* used to divide a given value by a 16.16 fixed-point factor. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* a :: The first multiplier. */
|
||||
@ -3852,7 +3882,7 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 4
|
||||
#define FREETYPE_PATCH 10
|
||||
#define FREETYPE_PATCH 12
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
349
portlibs/include/freetype/ftautoh.h
Normal file
349
portlibs/include/freetype/ftautoh.h
Normal file
@ -0,0 +1,349 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftautoh.h */
|
||||
/* */
|
||||
/* FreeType API for controlling the auto-hinter (specification only). */
|
||||
/* */
|
||||
/* Copyright 2012 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 __FTAUTOH_H__
|
||||
#define __FTAUTOH_H__
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
#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
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
* auto_hinter
|
||||
*
|
||||
* @title:
|
||||
* The auto-hinter
|
||||
*
|
||||
* @abstract:
|
||||
* Controlling the auto-hinting module.
|
||||
*
|
||||
* @description:
|
||||
* While FreeType's auto-hinter doesn't expose API functions by itself,
|
||||
* it is possible to control its behaviour with @FT_Property_Set and
|
||||
* @FT_Property_Get. The following lists the available properties
|
||||
* together with the necessary macros and structures.
|
||||
*
|
||||
* Note that the auto-hinter's module name is `autofitter' for
|
||||
* historical reasons.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* glyph-to-script-map
|
||||
*
|
||||
* @description:
|
||||
* The auto-hinter provides various script modules to hint glyphs.
|
||||
* Examples of supported scripts are Latin or CJK. Before a glyph is
|
||||
* auto-hinted, the Unicode character map of the font gets examined, and
|
||||
* the script is then determined based on Unicode character ranges, see
|
||||
* below.
|
||||
*
|
||||
* OpenType fonts, however, often provide much more glyphs than
|
||||
* character codes (small caps, superscripts, ligatures, swashes, etc.),
|
||||
* to be controlled by so-called `features'. Handling OpenType features
|
||||
* can be quite complicated and thus needs a separate library on top of
|
||||
* FreeType.
|
||||
*
|
||||
* The mapping between glyph indices and scripts (in the auto-hinter
|
||||
* sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
|
||||
* array with `num_glyphs' elements, as found in the font's @FT_Face
|
||||
* structure. The `glyph-to-script-map' property returns a pointer to
|
||||
* this array which can be modified as needed. Note that the
|
||||
* modification should happen before the first glyph gets processed by
|
||||
* the auto-hinter so that the global analysis of the font shapes
|
||||
* actually uses the modified mapping.
|
||||
*
|
||||
* The following example code demonstrates how to access it (omitting
|
||||
* the error handling).
|
||||
*
|
||||
* {
|
||||
* FT_Library library;
|
||||
* FT_Face face;
|
||||
* FT_Prop_GlyphToScriptMap prop;
|
||||
*
|
||||
*
|
||||
* FT_Init_FreeType( &library );
|
||||
* FT_New_Face( library, "foo.ttf", 0, &face );
|
||||
*
|
||||
* prop.face = face;
|
||||
*
|
||||
* FT_Property_Get( library, "autofitter",
|
||||
* "glyph-to-script-map", &prop );
|
||||
*
|
||||
* // adjust `prop.map' as needed right here
|
||||
*
|
||||
* FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_AUTOHINTER_SCRIPT_XXX
|
||||
*
|
||||
* @description:
|
||||
* A list of constants used for the @glyph-to-script-map property to
|
||||
* specify the script submodule the auto-hinter should use for hinting a
|
||||
* particular glyph.
|
||||
*
|
||||
* @values:
|
||||
* FT_AUTOHINTER_SCRIPT_NONE ::
|
||||
* Don't auto-hint this glyph.
|
||||
*
|
||||
* FT_AUTOHINTER_SCRIPT_LATIN ::
|
||||
* Apply the latin auto-hinter. For the auto-hinter, `latin' is a
|
||||
* very broad term, including Cyrillic and Greek also since characters
|
||||
* from those scripts share the same design constraints.
|
||||
*
|
||||
* By default, characters from the following Unicode ranges are
|
||||
* assigned to this submodule.
|
||||
*
|
||||
* {
|
||||
* U+0020 - U+007F // Basic Latin (no control characters)
|
||||
* U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
|
||||
* U+0100 - U+017F // Latin Extended-A
|
||||
* U+0180 - U+024F // Latin Extended-B
|
||||
* U+0250 - U+02AF // IPA Extensions
|
||||
* U+02B0 - U+02FF // Spacing Modifier Letters
|
||||
* U+0300 - U+036F // Combining Diacritical Marks
|
||||
* U+0370 - U+03FF // Greek and Coptic
|
||||
* U+0400 - U+04FF // Cyrillic
|
||||
* U+0500 - U+052F // Cyrillic Supplement
|
||||
* U+1D00 - U+1D7F // Phonetic Extensions
|
||||
* U+1D80 - U+1DBF // Phonetic Extensions Supplement
|
||||
* U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
|
||||
* U+1E00 - U+1EFF // Latin Extended Additional
|
||||
* U+1F00 - U+1FFF // Greek Extended
|
||||
* U+2000 - U+206F // General Punctuation
|
||||
* U+2070 - U+209F // Superscripts and Subscripts
|
||||
* U+20A0 - U+20CF // Currency Symbols
|
||||
* U+2150 - U+218F // Number Forms
|
||||
* U+2460 - U+24FF // Enclosed Alphanumerics
|
||||
* U+2C60 - U+2C7F // Latin Extended-C
|
||||
* U+2DE0 - U+2DFF // Cyrillic Extended-A
|
||||
* U+2E00 - U+2E7F // Supplemental Punctuation
|
||||
* U+A640 - U+A69F // Cyrillic Extended-B
|
||||
* U+A720 - U+A7FF // Latin Extended-D
|
||||
* U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
|
||||
* U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
|
||||
* U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
|
||||
* }
|
||||
*
|
||||
* FT_AUTOHINTER_SCRIPT_CJK ::
|
||||
* Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
|
||||
* Vietnamese, and some other scripts.
|
||||
*
|
||||
* By default, characters from the following Unicode ranges are
|
||||
* assigned to this submodule.
|
||||
*
|
||||
* {
|
||||
* U+1100 - U+11FF // Hangul Jamo
|
||||
* U+2E80 - U+2EFF // CJK Radicals Supplement
|
||||
* U+2F00 - U+2FDF // Kangxi Radicals
|
||||
* U+2FF0 - U+2FFF // Ideographic Description Characters
|
||||
* U+3000 - U+303F // CJK Symbols and Punctuation
|
||||
* U+3040 - U+309F // Hiragana
|
||||
* U+30A0 - U+30FF // Katakana
|
||||
* U+3100 - U+312F // Bopomofo
|
||||
* U+3130 - U+318F // Hangul Compatibility Jamo
|
||||
* U+3190 - U+319F // Kanbun
|
||||
* U+31A0 - U+31BF // Bopomofo Extended
|
||||
* U+31C0 - U+31EF // CJK Strokes
|
||||
* U+31F0 - U+31FF // Katakana Phonetic Extensions
|
||||
* U+3200 - U+32FF // Enclosed CJK Letters and Months
|
||||
* U+3300 - U+33FF // CJK Compatibility
|
||||
* U+3400 - U+4DBF // CJK Unified Ideographs Extension A
|
||||
* U+4DC0 - U+4DFF // Yijing Hexagram Symbols
|
||||
* U+4E00 - U+9FFF // CJK Unified Ideographs
|
||||
* U+A960 - U+A97F // Hangul Jamo Extended-A
|
||||
* U+AC00 - U+D7AF // Hangul Syllables
|
||||
* U+D7B0 - U+D7FF // Hangul Jamo Extended-B
|
||||
* U+F900 - U+FAFF // CJK Compatibility Ideographs
|
||||
* U+FE10 - U+FE1F // Vertical forms
|
||||
* U+FE30 - U+FE4F // CJK Compatibility Forms
|
||||
* U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
|
||||
* U+1B000 - U+1B0FF // Kana Supplement
|
||||
* U+1D300 - U+1D35F // Tai Xuan Hing Symbols
|
||||
* U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
|
||||
* U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
|
||||
* U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
|
||||
* U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
|
||||
* U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
|
||||
* }
|
||||
*
|
||||
* FT_AUTOHINTER_SCRIPT_INDIC ::
|
||||
* Apply the indic auto-hinter, covering all major scripts from the
|
||||
* Indian sub-continent and some other related scripts like Thai, Lao,
|
||||
* or Tibetan.
|
||||
*
|
||||
* By default, characters from the following Unicode ranges are
|
||||
* assigned to this submodule.
|
||||
*
|
||||
* {
|
||||
* U+0900 - U+0DFF // Indic Range
|
||||
* U+0F00 - U+0FFF // Tibetan
|
||||
* U+1900 - U+194F // Limbu
|
||||
* U+1B80 - U+1BBF // Sundanese
|
||||
* U+1C80 - U+1CDF // Meetei Mayak
|
||||
* U+A800 - U+A82F // Syloti Nagri
|
||||
* U+11800 - U+118DF // Sharada
|
||||
* }
|
||||
*
|
||||
* Note that currently Indic support is rudimentary only, missing blue
|
||||
* zone support.
|
||||
*
|
||||
*/
|
||||
#define FT_AUTOHINTER_SCRIPT_NONE 0
|
||||
#define FT_AUTOHINTER_SCRIPT_LATIN 1
|
||||
#define FT_AUTOHINTER_SCRIPT_CJK 2
|
||||
#define FT_AUTOHINTER_SCRIPT_INDIC 3
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_Prop_GlyphToScriptMap
|
||||
*
|
||||
* @description:
|
||||
* The data exchange structure for the @glyph-to-script-map property.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_Prop_GlyphToScriptMap_
|
||||
{
|
||||
FT_Face face;
|
||||
FT_Byte* map;
|
||||
|
||||
} FT_Prop_GlyphToScriptMap;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* fallback-script
|
||||
*
|
||||
* @description:
|
||||
* If no auto-hinter script module can be assigned to a glyph, a
|
||||
* fallback script gets assigned to it (see also the
|
||||
* @glyph-to-script-map property). By default, this is
|
||||
* @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
|
||||
* this fallback value can be changed.
|
||||
*
|
||||
* {
|
||||
* FT_Library library;
|
||||
* FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
|
||||
*
|
||||
*
|
||||
* FT_Init_FreeType( &library );
|
||||
*
|
||||
* FT_Property_Set( library, "autofitter",
|
||||
* "fallback-script", &fallback_script );
|
||||
* }
|
||||
*
|
||||
* @note:
|
||||
* This property can be used with @FT_Property_Get also.
|
||||
*
|
||||
* It's important to use the right timing for changing this value: The
|
||||
* creation of the glyph-to-script map which eventually uses the
|
||||
* fallback script value gets triggered either by setting or reading a
|
||||
* face-specific property like @glyph-to-script-map, or by auto-hinting
|
||||
* any glyph from that face. In particular, if you have already created
|
||||
* an @FT_Face structure but not loaded any glyph (using the
|
||||
* auto-hinter), a change of the fallback glyph will affect this face.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* increase-x-height
|
||||
*
|
||||
* @description:
|
||||
* For ppem values in the range 6~<= ppem <= `increase-x-height', round
|
||||
* up the font's x~height much more often than normally. If the value
|
||||
* is set to~0, which is the default, this feature is switched off. Use
|
||||
* this property to improve the legibility of small font sizes if
|
||||
* necessary.
|
||||
*
|
||||
* {
|
||||
* FT_Library library;
|
||||
* FT_Face face;
|
||||
* FT_Prop_IncreaseXHeight prop;
|
||||
*
|
||||
*
|
||||
* FT_Init_FreeType( &library );
|
||||
* FT_New_Face( library, "foo.ttf", 0, &face );
|
||||
* FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
|
||||
*
|
||||
* prop.face = face;
|
||||
* prop.limit = 14;
|
||||
*
|
||||
* FT_Property_Set( library, "autofitter",
|
||||
* "increase-x-height", &prop );
|
||||
* }
|
||||
*
|
||||
* @note:
|
||||
* This property can be used with @FT_Property_Get also.
|
||||
*
|
||||
* Set this value right after calling @FT_Set_Char_Size, but before
|
||||
* loading any glyph (using the auto-hinter).
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_Prop_IncreaseXHeight
|
||||
*
|
||||
* @description:
|
||||
* The data exchange structure for the @increase-x-height property.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_Prop_IncreaseXHeight_
|
||||
{
|
||||
FT_Face face;
|
||||
FT_UInt limit;
|
||||
|
||||
} FT_Prop_IncreaseXHeight;
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTAUTOH_H__ */
|
||||
|
||||
|
||||
/* END */
|
102
portlibs/include/freetype/ftbzip2.h
Normal file
102
portlibs/include/freetype/ftbzip2.h
Normal file
@ -0,0 +1,102 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftbzip2.h */
|
||||
/* */
|
||||
/* Bzip2-compressed stream support. */
|
||||
/* */
|
||||
/* Copyright 2010 by */
|
||||
/* Joel Klinghed. */
|
||||
/* */
|
||||
/* 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 __FTBZIP2_H__
|
||||
#define __FTBZIP2_H__
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
#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
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* bzip2 */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* BZIP2 Streams */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* Using bzip2-compressed font files. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains the declaration of Bzip2-specific functions. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Stream_OpenBzip2
|
||||
*
|
||||
* @description:
|
||||
* Open a new stream to parse bzip2-compressed font files. This is
|
||||
* mainly used to support the compressed `*.pcf.bz2' fonts that come
|
||||
* with XFree86.
|
||||
*
|
||||
* @input:
|
||||
* stream ::
|
||||
* The target embedding stream.
|
||||
*
|
||||
* source ::
|
||||
* The source stream.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* The source stream must be opened _before_ calling this function.
|
||||
*
|
||||
* Calling the internal function `FT_Stream_Close' on the new stream will
|
||||
* *not* call `FT_Stream_Close' on the source stream. None of the stream
|
||||
* objects will be released to the heap.
|
||||
*
|
||||
* The stream implementation is very basic and resets the decompression
|
||||
* process each time seeking backwards is needed within the stream.
|
||||
*
|
||||
* In certain builds of the library, bzip2 compression recognition is
|
||||
* automatically handled when calling @FT_New_Face or @FT_Open_Face.
|
||||
* This means that if no font driver is capable of handling the raw
|
||||
* compressed file, the library will try to open a bzip2 compressed stream
|
||||
* from it and re-open the face with it.
|
||||
*
|
||||
* This function may return `FT_Err_Unimplemented_Feature' if your build
|
||||
* of FreeType was not compiled with bzip2 support.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Stream_OpenBzip2( FT_Stream stream,
|
||||
FT_Stream source );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTBZIP2_H__ */
|
||||
|
||||
|
||||
/* END */
|
150
portlibs/include/freetype/ftcffdrv.h
Normal file
150
portlibs/include/freetype/ftcffdrv.h
Normal file
@ -0,0 +1,150 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftcffdrv.h */
|
||||
/* */
|
||||
/* FreeType API for controlling the CFF driver (specification only). */
|
||||
/* */
|
||||
/* Copyright 2013 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 __FTCFFDRV_H__
|
||||
#define __FTCFFDRV_H__
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
#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
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
* cff_driver
|
||||
*
|
||||
* @title:
|
||||
* The CFF driver
|
||||
*
|
||||
* @abstract:
|
||||
* Controlling the CFF driver module.
|
||||
*
|
||||
* @description:
|
||||
* While FreeType's CFF driver doesn't expose API functions by itself,
|
||||
* it is possible to control its behaviour with @FT_Property_Set and
|
||||
* @FT_Property_Get. The following lists the available properties
|
||||
* together with the necessary macros and structures.
|
||||
*
|
||||
* The CFF driver's module name is `cff'.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* hinting-engine
|
||||
*
|
||||
* @description:
|
||||
* Thanks to Adobe, which contributed a new hinting (and parsing)
|
||||
* engine, an application can select between `freetype' and `adobe'.
|
||||
*
|
||||
* Right now, the default engine is `freetype'. However, this will
|
||||
* change: After a certain time of intensive testing it is planned to
|
||||
* make `adobe' the default due to its superior rendering results.
|
||||
*
|
||||
* The following example code demonstrates how to select Adobe's hinting
|
||||
* engine (omitting the error handling).
|
||||
*
|
||||
* {
|
||||
* FT_Library library;
|
||||
* FT_Face face;
|
||||
* FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
|
||||
*
|
||||
*
|
||||
* FT_Init_FreeType( &library );
|
||||
*
|
||||
* FT_Property_Set( library, "cff",
|
||||
* "hinting-engine", &hinting_engine );
|
||||
* }
|
||||
*
|
||||
* @note:
|
||||
* This property can be used with @FT_Property_Get also.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_CFF_HINTING_XXX
|
||||
*
|
||||
* @description:
|
||||
* A list of constants used for the @hinting-engine property to select
|
||||
* the hinting engine for CFF fonts.
|
||||
*
|
||||
* @values:
|
||||
* FT_CFF_HINTING_FREETYPE ::
|
||||
* Use the old FreeType hinting engine.
|
||||
*
|
||||
* FT_CFF_HINTING_ADOBE ::
|
||||
* Use the hinting engine contributed by Adobe.
|
||||
*
|
||||
*/
|
||||
#define FT_CFF_HINTING_FREETYPE 0
|
||||
#define FT_CFF_HINTING_ADOBE 1
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* no-stem-darkening
|
||||
*
|
||||
* @description:
|
||||
* By default, the Adobe CFF engine darkens stems at smaller sizes,
|
||||
* regardless of hinting, to enhance contrast. Setting this property,
|
||||
* stem darkening gets switched off.
|
||||
*
|
||||
* Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
|
||||
*
|
||||
* {
|
||||
* FT_Library library;
|
||||
* FT_Face face;
|
||||
* FT_Bool no_stem_darkening = TRUE;
|
||||
*
|
||||
*
|
||||
* FT_Init_FreeType( &library );
|
||||
*
|
||||
* FT_Property_Set( library, "cff",
|
||||
* "no-stem-darkening", &no_stem_darkening );
|
||||
* }
|
||||
*
|
||||
* @note:
|
||||
* This property can be used with @FT_Property_Get also.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __FTCFFDRV_H__ */
|
||||
|
||||
|
||||
/* END */
|
@ -64,6 +64,34 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
/* auto_hinter */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* The Auto-Hinter */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* auto_hinter */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
/* cff_driver */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* The CFF Driver */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* cff_driver */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType error codes (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2004, 2006, 2007, 2010-2011 by */
|
||||
/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -56,6 +56,8 @@
|
||||
"array allocation size too large" )
|
||||
FT_ERRORDEF_( Missing_Module, 0x0B, \
|
||||
"missing module" )
|
||||
FT_ERRORDEF_( Missing_Property, 0x0C, \
|
||||
"missing property" )
|
||||
|
||||
/* glyph/character errors */
|
||||
|
||||
@ -215,6 +217,8 @@
|
||||
"ignore" )
|
||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
|
||||
"no Unicode glyph name found" )
|
||||
FT_ERRORDEF_( Glyph_Too_Big, 0xA4, \
|
||||
"glyph to big for hinting" )
|
||||
|
||||
/* BDF errors */
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType error code handling (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2004, 2007 by */
|
||||
/* Copyright 1996-2002, 2004, 2007, 2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -28,9 +28,8 @@
|
||||
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
|
||||
/* defined in ftoption.h in order to make the higher byte indicate */
|
||||
/* the module where the error has happened (this is not compatible */
|
||||
/* with standard builds of FreeType 2). You can then use the macro */
|
||||
/* FT_ERROR_BASE macro to extract the generic error code from an */
|
||||
/* FT_Error value. */
|
||||
/* with standard builds of FreeType 2). See the file `ftmoderr.h' for */
|
||||
/* more details. */
|
||||
/* */
|
||||
/* */
|
||||
/* II - Error Message strings */
|
||||
@ -101,12 +100,6 @@
|
||||
|
||||
#undef FT_NEED_EXTERN_C
|
||||
|
||||
#undef FT_ERR_XCAT
|
||||
#undef FT_ERR_CAT
|
||||
|
||||
#define FT_ERR_XCAT( x, y ) x ## y
|
||||
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
|
||||
|
||||
|
||||
/* FT_ERR_PREFIX is used as a prefix for error identifiers. */
|
||||
/* By default, we use `FT_Err_'. */
|
||||
@ -194,11 +187,9 @@
|
||||
#undef FT_NEED_EXTERN_C
|
||||
#undef FT_ERR_BASE
|
||||
|
||||
/* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */
|
||||
#ifndef FT_KEEP_ERR_PREFIX
|
||||
/* FT_ERR_PREFIX is needed internally */
|
||||
#ifndef FT2_BUILD_LIBRARY
|
||||
#undef FT_ERR_PREFIX
|
||||
#else
|
||||
#undef FT_KEEP_ERR_PREFIX
|
||||
#endif
|
||||
|
||||
#endif /* __FTERRORS_H__ */
|
||||
|
@ -94,7 +94,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The root glyph structure contains a given glyph image plus its */
|
||||
/* advance width in 16.16 fixed float format. */
|
||||
/* advance width in 16.16 fixed-point format. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* library :: A handle to the FreeType library object. */
|
||||
|
@ -54,7 +54,7 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* The type FT_Pos is used to store vectorial coordinates. Depending */
|
||||
/* on the context, these can represent distances in integer font */
|
||||
/* units, or 16.16, or 26.6 fixed float pixel coordinates. */
|
||||
/* units, or 16.16, or 26.6 fixed-point pixel coordinates. */
|
||||
/* */
|
||||
typedef signed long FT_Pos;
|
||||
|
||||
|
@ -53,6 +53,44 @@ FT_BEGIN_HEADER
|
||||
* *not* implemented in default builds of the library. You need to
|
||||
* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
|
||||
* in order to activate it.
|
||||
*
|
||||
* FreeType generates alpha coverage maps, which are linear by nature.
|
||||
* For instance, the value 0x80 in bitmap representation means that
|
||||
* (within numerical precision) 0x80/0xff fraction of that pixel is
|
||||
* covered by the glyph's outline. The blending function for placing
|
||||
* text over a background is
|
||||
*
|
||||
* {
|
||||
* dst = alpha * src + (1 - alpha) * dst ,
|
||||
* }
|
||||
*
|
||||
* which is known as OVER. However, when calculating the output of the
|
||||
* OVER operator, the source colors should first be transformed to a
|
||||
* linear color space, then alpha blended in that space, and transformed
|
||||
* back to the output color space.
|
||||
*
|
||||
* When linear light blending is used, the default FIR5 filtering
|
||||
* weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
|
||||
* they have been designed for black on white rendering while lacking
|
||||
* gamma correction. To preserve color neutrality, weights for a FIR5
|
||||
* filter should be chosen according to two free parameters `a' and `c',
|
||||
* and the FIR weights should be
|
||||
*
|
||||
* {
|
||||
* [a - c, a + c, 2 * a, a + c, a - c] .
|
||||
* }
|
||||
*
|
||||
* This formula generates equal weights for all the color primaries
|
||||
* across the filter kernel, which makes it colorless. One suggested
|
||||
* set of weights is
|
||||
*
|
||||
* {
|
||||
* [0x10, 0x50, 0x60, 0x50, 0x10] ,
|
||||
* }
|
||||
*
|
||||
* where `a' has value 0x30 and `b' value 0x20. The weights in filter
|
||||
* may have a sum larger than 0x100, which increases coloration slightly
|
||||
* but also improves contrast.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType modules public interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */
|
||||
/* Copyright 1996-2003, 2006, 2008-2010, 2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -42,11 +42,38 @@ FT_BEGIN_HEADER
|
||||
/* Module Management */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* How to add, upgrade, and remove modules from FreeType. */
|
||||
/* How to add, upgrade, remove, and control modules from FreeType. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The definitions below are used to manage modules within FreeType. */
|
||||
/* Modules can be added, upgraded, and removed at runtime. */
|
||||
/* Additionally, some module properties can be controlled also. */
|
||||
/* */
|
||||
/* Here is a list of possible values of the `module_name' field in */
|
||||
/* the @FT_Module_Class structure. */
|
||||
/* */
|
||||
/* { */
|
||||
/* autofitter */
|
||||
/* bdf */
|
||||
/* cff */
|
||||
/* gxvalid */
|
||||
/* otvalid */
|
||||
/* pcf */
|
||||
/* pfr */
|
||||
/* psaux */
|
||||
/* pshinter */
|
||||
/* psnames */
|
||||
/* raster1, raster5 */
|
||||
/* sfnt */
|
||||
/* smooth, smooth-lcd, smooth-lcdv */
|
||||
/* truetype */
|
||||
/* type1 */
|
||||
/* type42 */
|
||||
/* t1cid */
|
||||
/* winfonts */
|
||||
/* } */
|
||||
/* */
|
||||
/* Note that the FreeType Cache sub-system is not a FreeType module. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -118,7 +145,7 @@ FT_BEGIN_HEADER
|
||||
/* A function used to query a given module for a specific interface. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* module :: The module to finalize. */
|
||||
/* module :: The module to be searched. */
|
||||
/* */
|
||||
/* name :: The name of the interface in the module. */
|
||||
/* */
|
||||
@ -249,6 +276,130 @@ FT_BEGIN_HEADER
|
||||
FT_Module module );
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Property_Set
|
||||
*
|
||||
* @description:
|
||||
* Set a property for a given module.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the library the module is part of.
|
||||
*
|
||||
* module_name ::
|
||||
* The module name.
|
||||
*
|
||||
* property_name ::
|
||||
* The property name. Properties are described in the `Synopsis'
|
||||
* subsection of the module's documentation.
|
||||
*
|
||||
* Note that only a few modules have properties.
|
||||
*
|
||||
* value ::
|
||||
* A generic pointer to a variable or structure which gives the new
|
||||
* value of the property. The exact definition of `value' is
|
||||
* dependent on the property; see the `Synopsis' subsection of the
|
||||
* module's documentation.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* If `module_name' isn't a valid module name, or `property_name'
|
||||
* doesn't specify a valid property, or if `value' doesn't represent a
|
||||
* valid value for the given property, an error is returned.
|
||||
*
|
||||
* The following example sets property `bar' (a simple integer) in
|
||||
* module `foo' to value~1.
|
||||
*
|
||||
* {
|
||||
* FT_UInt bar;
|
||||
*
|
||||
*
|
||||
* bar = 1;
|
||||
* FT_Property_Set( library, "foo", "bar", &bar );
|
||||
* }
|
||||
*
|
||||
* It is not possible to set properties of the FreeType Cache
|
||||
* sub-system with FT_Property_Set; use @FTC_Property_Set instead.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.11
|
||||
*
|
||||
*/
|
||||
FT_Error
|
||||
FT_Property_Set( FT_Library library,
|
||||
const FT_String* module_name,
|
||||
const FT_String* property_name,
|
||||
const void* value );
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Property_Get
|
||||
*
|
||||
* @description:
|
||||
* Get a module's property value.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the library the module is part of.
|
||||
*
|
||||
* module_name ::
|
||||
* The module name.
|
||||
*
|
||||
* property_name ::
|
||||
* The property name. Properties are described in the `Synopsis'
|
||||
* subsection of the module's documentation.
|
||||
*
|
||||
* @inout:
|
||||
* value ::
|
||||
* A generic pointer to a variable or structure which gives the
|
||||
* value of the property. The exact definition of `value' is
|
||||
* dependent on the property; see the `Synopsis' subsection of the
|
||||
* module's documentation.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* If `module_name' isn't a valid module name, or `property_name'
|
||||
* doesn't specify a valid property, or if `value' doesn't represent a
|
||||
* valid value for the given property, an error is returned.
|
||||
*
|
||||
* The following example gets property `baz' (a range) in module `foo'.
|
||||
*
|
||||
* {
|
||||
* typedef range_
|
||||
* {
|
||||
* FT_Int32 min;
|
||||
* FT_Int32 max;
|
||||
*
|
||||
* } range;
|
||||
*
|
||||
* range baz;
|
||||
*
|
||||
*
|
||||
* FT_Property_Get( library, "foo", "baz", &baz );
|
||||
* }
|
||||
*
|
||||
* It is not possible to retrieve properties of the FreeType Cache
|
||||
* sub-system with FT_Property_Get; use @FTC_Property_Get instead.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.11
|
||||
*
|
||||
*/
|
||||
FT_Error
|
||||
FT_Property_Get( FT_Library library,
|
||||
const FT_String* module_name,
|
||||
const FT_String* property_name,
|
||||
void* value );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType module error offsets (specification). */
|
||||
/* */
|
||||
/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */
|
||||
/* Copyright 2001-2005, 2010, 2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -18,17 +18,57 @@
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This file is used to define the FreeType module error offsets. */
|
||||
/* This file is used to define the FreeType module error codes. */
|
||||
/* */
|
||||
/* The lower byte gives the error code, the higher byte gives the */
|
||||
/* module. The base module has error offset 0. For example, the error */
|
||||
/* `FT_Err_Invalid_File_Format' has value 0x003, the error */
|
||||
/* `TT_Err_Invalid_File_Format' has value 0x1103, the error */
|
||||
/* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */
|
||||
/* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is */
|
||||
/* set, the lower byte of an error value identifies the error code as */
|
||||
/* usual. In addition, the higher byte identifies the module. For */
|
||||
/* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */
|
||||
/* error `TT_Err_Invalid_File_Format' has value 0x1303, the error */
|
||||
/* `T1_Err_Invalid_File_Format' has value 0x1403, etc. */
|
||||
/* */
|
||||
/* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, */
|
||||
/* including the high byte. */
|
||||
/* */
|
||||
/* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of */
|
||||
/* an error value is set to zero. */
|
||||
/* */
|
||||
/* To hide the various `XXX_Err_' prefixes in the source code, FreeType */
|
||||
/* provides some macros in `fttypes.h'. */
|
||||
/* */
|
||||
/* FT_ERR( err ) */
|
||||
/* Add current error module prefix (as defined with the */
|
||||
/* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module */
|
||||
/* the line */
|
||||
/* */
|
||||
/* error = FT_ERR( Invalid_Outline ); */
|
||||
/* */
|
||||
/* expands to */
|
||||
/* */
|
||||
/* error = BDF_Err_Invalid_Outline; */
|
||||
/* */
|
||||
/* For simplicity, you can always use `FT_Err_Ok' directly instead */
|
||||
/* of `FT_ERR( Ok )'. */
|
||||
/* */
|
||||
/* FT_ERR_EQ( errcode, err ) */
|
||||
/* FT_ERR_NEQ( errcode, err ) */
|
||||
/* Compare error code `errcode' with the error `err' for equality */
|
||||
/* and inequality, respectively. Example: */
|
||||
/* */
|
||||
/* if ( FT_ERR_EQ( error, Invalid_Outline ) ) */
|
||||
/* ... */
|
||||
/* */
|
||||
/* Using this macro you don't have to think about error prefixes. */
|
||||
/* Of course, if module errors are not active, the above example is */
|
||||
/* the same as */
|
||||
/* */
|
||||
/* if ( error == FT_Err_Invalid_Outline ) */
|
||||
/* ... */
|
||||
/* */
|
||||
/* FT_ERROR_BASE( errcode ) */
|
||||
/* FT_ERROR_MODULE( errcode ) */
|
||||
/* Get base error and module error code, respectively. */
|
||||
/* */
|
||||
/* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
|
||||
/* to make the higher byte always zero (disabling the module error */
|
||||
/* mechanism). */
|
||||
/* */
|
||||
/* It can also be used to create a module error message table easily */
|
||||
/* with something like */
|
||||
@ -48,9 +88,6 @@
|
||||
/* #include FT_MODULE_ERRORS_H */
|
||||
/* } */
|
||||
/* */
|
||||
/* To use such a table, all errors must be ANDed with 0xFF00 to remove */
|
||||
/* the error code. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
@ -124,6 +161,7 @@
|
||||
FT_MODERRDEF( Type1, 0x1300, "Type 1 module" )
|
||||
FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
|
||||
FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
|
||||
FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" )
|
||||
|
||||
|
||||
#ifdef FT_MODERR_END_LIST
|
||||
|
@ -126,8 +126,10 @@ FT_BEGIN_HEADER
|
||||
/* destroying the library, by @FT_Done_FreeType. */
|
||||
/* */
|
||||
/* numPoints :: The maximum number of points within the outline. */
|
||||
/* Must be smaller than or equal to 0xFFFF (65535). */
|
||||
/* */
|
||||
/* numContours :: The maximum number of contours within the outline. */
|
||||
/* This value must be in the range 0 to `numPoints'. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* anoutline :: A handle to the new outline. */
|
||||
|
@ -271,7 +271,7 @@ FT_BEGIN_HEADER
|
||||
* miter_limit ::
|
||||
* The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and
|
||||
* FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles,
|
||||
* expressed as 16.16 fixed point value.
|
||||
* expressed as 16.16 fixed-point value.
|
||||
*
|
||||
* @note:
|
||||
* The radius is expressed in the same units as the outline
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType trigonometric functions (specification). */
|
||||
/* */
|
||||
/* Copyright 2001, 2003, 2005, 2007 by */
|
||||
/* Copyright 2001, 2003, 2005, 2007, 2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -46,7 +46,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* This type is used to model angle values in FreeType. Note that the
|
||||
* angle is a 16.16 fixed float value expressed in degrees.
|
||||
* angle is a 16.16 fixed-point value expressed in degrees.
|
||||
*
|
||||
*/
|
||||
typedef FT_Fixed FT_Angle;
|
||||
@ -106,7 +106,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Sin
|
||||
*
|
||||
* @description:
|
||||
* Return the sinus of a given angle in fixed point format.
|
||||
* Return the sinus of a given angle in fixed-point format.
|
||||
*
|
||||
* @input:
|
||||
* angle ::
|
||||
@ -130,7 +130,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Cos
|
||||
*
|
||||
* @description:
|
||||
* Return the cosinus of a given angle in fixed point format.
|
||||
* Return the cosinus of a given angle in fixed-point format.
|
||||
*
|
||||
* @input:
|
||||
* angle ::
|
||||
@ -154,7 +154,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Tan
|
||||
*
|
||||
* @description:
|
||||
* Return the tangent of a given angle in fixed point format.
|
||||
* Return the tangent of a given angle in fixed-point format.
|
||||
*
|
||||
* @input:
|
||||
* angle ::
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType simple types definitions (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2002, 2004, 2006-2009, 2012 by */
|
||||
/* Copyright 1996-2002, 2004, 2006-2009, 2012, 2013 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -255,7 +255,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_F2Dot14 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A signed 2.14 fixed float type used for unit vectors. */
|
||||
/* A signed 2.14 fixed-point type used for unit vectors. */
|
||||
/* */
|
||||
typedef signed short FT_F2Dot14;
|
||||
|
||||
@ -266,7 +266,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_F26Dot6 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A signed 26.6 fixed float type used for vectorial pixel */
|
||||
/* A signed 26.6 fixed-point type used for vectorial pixel */
|
||||
/* coordinates. */
|
||||
/* */
|
||||
typedef signed long FT_F26Dot6;
|
||||
@ -278,7 +278,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Fixed */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This type is used to store 16.16 fixed float values, like scaling */
|
||||
/* This type is used to store 16.16 fixed-point values, like scaling */
|
||||
/* values or matrix coefficients. */
|
||||
/* */
|
||||
typedef signed long FT_Fixed;
|
||||
@ -362,7 +362,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to store a 2x2 matrix. Coefficients are */
|
||||
/* in 16.16 fixed float format. The computation performed is: */
|
||||
/* in 16.16 fixed-point format. The computation performed is: */
|
||||
/* */
|
||||
/* { */
|
||||
/* x' = x*xx + y*xy */
|
||||
@ -571,14 +571,24 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
|
||||
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
||||
#define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
||||
|
||||
/* concatenate C tokens */
|
||||
#define FT_ERR_XCAT( x, y ) x ## y
|
||||
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
|
||||
|
||||
/* see `ftmoderr.h' for descriptions of the following macros */
|
||||
|
||||
#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
|
||||
|
||||
/* return base error code (without module-specific prefix) */
|
||||
#define FT_ERROR_BASE( x ) ( (x) & 0xFF )
|
||||
|
||||
/* return module error code */
|
||||
#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U )
|
||||
|
||||
#define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
||||
#define FT_ERR_EQ( x, e ) \
|
||||
( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) )
|
||||
#define FT_ERR_NEQ( x, e ) \
|
||||
( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) )
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* TrueType name ID definitions (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2004, 2006-2008, 2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -316,11 +316,12 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Possible values of the language identifier field in the name records */
|
||||
/* of the TTF `name' table if the `platform' identifier code is */
|
||||
/* TT_PLATFORM_MACINTOSH. */
|
||||
/* TT_PLATFORM_MACINTOSH. These values are also used as return values */
|
||||
/* for function @FT_Get_CMap_Language_ID. */
|
||||
/* */
|
||||
/* The canonical source for the Apple assigned Language ID's is at */
|
||||
/* */
|
||||
/* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */
|
||||
/* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */
|
||||
/* */
|
||||
#define TT_MAC_LANGID_ENGLISH 0
|
||||
#define TT_MAC_LANGID_FRENCH 1
|
||||
@ -461,21 +462,10 @@ FT_BEGIN_HEADER
|
||||
/* of the TTF `name' table if the `platform' identifier code is */
|
||||
/* TT_PLATFORM_MICROSOFT. */
|
||||
/* */
|
||||
/* The canonical source for the MS assigned LCID's (seems to) be at */
|
||||
/* The canonical source for the MS assigned LCIDs is */
|
||||
/* */
|
||||
/* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */
|
||||
/* */
|
||||
/* It used to be at various places, among them */
|
||||
/* */
|
||||
/* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */
|
||||
/* http://www.microsoft.com/globaldev/reference/loclanghome.asp */
|
||||
/* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */
|
||||
/* http://msdn.microsoft.com/library/en-us/passport25/ */
|
||||
/* NET_Passport_VBScript_Documentation/Single_Sign_In/ */
|
||||
/* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */
|
||||
/* */
|
||||
/* Hopefully, it seems now that the Globaldev site prevails... */
|
||||
/* (updated by Antoine, 2004-02-17) */
|
||||
|
||||
#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
|
||||
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Basic SFNT/TrueType tables definitions and interface */
|
||||
/* (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2005, 2008-2011 by */
|
||||
/* Copyright 1996-2005, 2008-2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -600,6 +600,16 @@ FT_BEGIN_HEADER
|
||||
/* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */
|
||||
/* a list. */
|
||||
/* */
|
||||
/* Here an example how to access the `vhea' table: */
|
||||
/* */
|
||||
/* { */
|
||||
/* TT_VertHeader* vert_header; */
|
||||
/* */
|
||||
/* */
|
||||
/* vert_header = */
|
||||
/* (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); */
|
||||
/* } */
|
||||
/* */
|
||||
FT_EXPORT( void* )
|
||||
FT_Get_Sfnt_Table( FT_Face face,
|
||||
FT_Sfnt_Tag tag );
|
||||
@ -730,6 +740,9 @@ FT_BEGIN_HEADER
|
||||
/* The language ID of `charmap'. If `charmap' doesn't belong to a */
|
||||
/* TrueType/sfnt face, just return~0 as the default value. */
|
||||
/* */
|
||||
/* For a format~14 cmap (to access Unicode IVS), the return value is */
|
||||
/* 0xFFFFFFFF. */
|
||||
/* */
|
||||
FT_EXPORT( FT_ULong )
|
||||
FT_Get_CMap_Language_ID( FT_CharMap charmap );
|
||||
|
||||
|
@ -1,38 +1,29 @@
|
||||
/* jconfig.h. Generated from jconfig.cfg by configure. */
|
||||
/* jconfig.h. Generated automatically by configure. */
|
||||
/* jconfig.cfg --- source file edited by configure script */
|
||||
/* see jconfig.txt for explanations */
|
||||
/* see jconfig.doc for explanations */
|
||||
|
||||
#define HAVE_PROTOTYPES 1
|
||||
#define HAVE_UNSIGNED_CHAR 1
|
||||
#define HAVE_UNSIGNED_SHORT 1
|
||||
/* #undef void */
|
||||
/* #undef const */
|
||||
/* #undef CHAR_IS_UNSIGNED */
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_LOCALE_H 1
|
||||
/* #undef NEED_BSD_STRINGS */
|
||||
/* #undef NEED_SYS_TYPES_H */
|
||||
/* #undef NEED_FAR_POINTERS */
|
||||
/* #undef NEED_SHORT_EXTERNAL_NAMES */
|
||||
#define HAVE_PROTOTYPES
|
||||
#define HAVE_UNSIGNED_CHAR
|
||||
#define HAVE_UNSIGNED_SHORT
|
||||
#undef void
|
||||
#undef const
|
||||
#undef CHAR_IS_UNSIGNED
|
||||
#define HAVE_STDDEF_H
|
||||
#define HAVE_STDLIB_H
|
||||
#undef NEED_BSD_STRINGS
|
||||
#undef NEED_SYS_TYPES_H
|
||||
#undef NEED_FAR_POINTERS
|
||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
||||
/* Define this if you get warnings about undefined structures. */
|
||||
/* #undef INCOMPLETE_TYPES_BROKEN */
|
||||
|
||||
/* Define "boolean" as unsigned char, not int, on Windows systems. */
|
||||
#ifdef _WIN32
|
||||
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
|
||||
typedef unsigned char boolean;
|
||||
#endif
|
||||
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
|
||||
#endif
|
||||
#undef INCOMPLETE_TYPES_BROKEN
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
|
||||
/* #undef RIGHT_SHIFT_IS_UNSIGNED */
|
||||
#undef RIGHT_SHIFT_IS_UNSIGNED
|
||||
#define INLINE __inline__
|
||||
/* These are for configuring the JPEG memory manager. */
|
||||
/* #undef DEFAULT_MAX_MEM */
|
||||
/* #undef NO_MKTEMP */
|
||||
#undef DEFAULT_MAX_MEM
|
||||
#undef NO_MKTEMP
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
|
||||
@ -41,14 +32,14 @@ typedef unsigned char boolean;
|
||||
#define BMP_SUPPORTED /* BMP image file format */
|
||||
#define GIF_SUPPORTED /* GIF image file format */
|
||||
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
|
||||
/* #undef RLE_SUPPORTED */
|
||||
#undef RLE_SUPPORTED /* Utah RLE image file format */
|
||||
#define TARGA_SUPPORTED /* Targa image file format */
|
||||
|
||||
/* #undef TWO_FILE_COMMANDLINE */
|
||||
/* #undef NEED_SIGNAL_CATCHER */
|
||||
/* #undef DONT_USE_B_MODE */
|
||||
#undef TWO_FILE_COMMANDLINE
|
||||
#undef NEED_SIGNAL_CATCHER
|
||||
#undef DONT_USE_B_MODE
|
||||
|
||||
/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
|
||||
/* #undef PROGRESS_REPORT */
|
||||
#undef PROGRESS_REPORT
|
||||
|
||||
#endif /* JPEG_CJPEG_DJPEG */
|
||||
|
@ -2,7 +2,6 @@
|
||||
* jerror.h
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@ -40,15 +39,14 @@ typedef enum {
|
||||
JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
|
||||
|
||||
/* For maintenance convenience, list is alphabetical by message code name */
|
||||
JMESSAGE(JERR_ARITH_NOTIMPL,
|
||||
"Sorry, there are legal restrictions on arithmetic coding")
|
||||
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
|
||||
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
|
||||
JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
|
||||
JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
|
||||
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
|
||||
JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
|
||||
JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported")
|
||||
JMESSAGE(JERR_BAD_DROP_SAMPLING,
|
||||
"Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
|
||||
JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
|
||||
JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
|
||||
JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
|
||||
JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
|
||||
@ -95,7 +93,6 @@ JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
|
||||
JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
|
||||
JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
|
||||
JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
|
||||
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
|
||||
JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
|
||||
@ -173,7 +170,6 @@ JMESSAGE(JTRC_UNKNOWN_IDS,
|
||||
JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
|
||||
JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
|
||||
JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
|
||||
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
|
||||
JMESSAGE(JWRN_BOGUS_PROGRESSION,
|
||||
"Inconsistent progression sequence for component %d coefficient %d")
|
||||
JMESSAGE(JWRN_EXTRANEOUS_DATA,
|
||||
@ -231,15 +227,6 @@ JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(cinfo)->err->msg_parm.i[3] = (p4), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(cinfo)->err->msg_parm.i[2] = (p3), \
|
||||
(cinfo)->err->msg_parm.i[3] = (p4), \
|
||||
(cinfo)->err->msg_parm.i[4] = (p5), \
|
||||
(cinfo)->err->msg_parm.i[5] = (p6), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXITS(cinfo,code,str) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
|
||||
|
@ -2,7 +2,6 @@
|
||||
* jmorecfg.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2011 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@ -159,14 +158,8 @@ typedef short INT16;
|
||||
/* INT32 must hold at least signed 32-bit values. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
||||
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
|
||||
#ifndef _BASETSD_H /* MinGW is slightly different */
|
||||
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
|
||||
typedef long INT32;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Datatype used for image dimensions. The JPEG standard only supports
|
||||
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
|
||||
@ -216,13 +209,11 @@ typedef unsigned int JDIMENSION;
|
||||
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
|
||||
*/
|
||||
|
||||
#ifndef FAR
|
||||
#ifdef NEED_FAR_POINTERS
|
||||
#define FAR far
|
||||
#else
|
||||
#define FAR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@ -265,6 +256,8 @@ typedef int boolean;
|
||||
* (You may HAVE to do that if your compiler doesn't like null source files.)
|
||||
*/
|
||||
|
||||
/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
@ -273,10 +266,9 @@ typedef int boolean;
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
|
||||
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
||||
/* Note: if you selected 12-bit data precision, it is dangerous to turn off
|
||||
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
|
||||
@ -290,12 +282,12 @@ typedef int boolean;
|
||||
|
||||
/* Decoder capability options: */
|
||||
|
||||
#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
||||
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
||||
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
||||
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
||||
@ -312,7 +304,9 @@ typedef int boolean;
|
||||
* the offsets will also change the order in which colormap data is organized.
|
||||
* RESTRICTIONS:
|
||||
* 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
|
||||
* 2. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
|
||||
* 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
|
||||
* useful if you are using JPEG color spaces other than YCbCr or grayscale.
|
||||
* 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
@ -2,7 +2,6 @@
|
||||
* jpeglib.h
|
||||
*
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2002-2011 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@ -27,19 +26,11 @@
|
||||
#include "jmorecfg.h" /* seldom changed options */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef DONT_USE_EXTERN_C
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Version IDs for the JPEG library.
|
||||
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
|
||||
/* Version ID for the JPEG library.
|
||||
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
|
||||
*/
|
||||
|
||||
#define JPEG_LIB_VERSION 80 /* Compatibility version 8.0 */
|
||||
#define JPEG_LIB_VERSION_MAJOR 8
|
||||
#define JPEG_LIB_VERSION_MINOR 4
|
||||
#define JPEG_LIB_VERSION 62 /* Version 6b */
|
||||
|
||||
|
||||
/* Various constants determining the sizes of things.
|
||||
@ -47,7 +38,7 @@ extern "C" {
|
||||
* if you want to be compatible.
|
||||
*/
|
||||
|
||||
#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */
|
||||
#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */
|
||||
#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */
|
||||
#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */
|
||||
#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */
|
||||
@ -147,18 +138,18 @@ typedef struct {
|
||||
*/
|
||||
JDIMENSION width_in_blocks;
|
||||
JDIMENSION height_in_blocks;
|
||||
/* Size of a DCT block in samples,
|
||||
* reflecting any scaling we choose to apply during the DCT step.
|
||||
* Values from 1 to 16 are supported.
|
||||
* Note that different components may receive different DCT scalings.
|
||||
/* Size of a DCT block in samples. Always DCTSIZE for compression.
|
||||
* For decompression this is the size of the output from one DCT block,
|
||||
* reflecting any scaling we choose to apply during the IDCT step.
|
||||
* Values of 1,2,4,8 are likely to be supported. Note that different
|
||||
* components may receive different IDCT scalings.
|
||||
*/
|
||||
int DCT_h_scaled_size;
|
||||
int DCT_v_scaled_size;
|
||||
int DCT_scaled_size;
|
||||
/* The downsampled dimensions are the component's actual, unpadded number
|
||||
* of samples at the main buffer (preprocessing/compression interface);
|
||||
* DCT scaling is included, so
|
||||
* downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE)
|
||||
* and similarly for height.
|
||||
* of samples at the main buffer (preprocessing/compression interface), thus
|
||||
* downsampled_width = ceil(image_width * Hi/Hmax)
|
||||
* and similarly for height. For decompression, IDCT scaling is included, so
|
||||
* downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
|
||||
*/
|
||||
JDIMENSION downsampled_width; /* actual width in samples */
|
||||
JDIMENSION downsampled_height; /* actual height in samples */
|
||||
@ -173,7 +164,7 @@ typedef struct {
|
||||
int MCU_width; /* number of blocks per MCU, horizontally */
|
||||
int MCU_height; /* number of blocks per MCU, vertically */
|
||||
int MCU_blocks; /* MCU_width * MCU_height */
|
||||
int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */
|
||||
int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */
|
||||
int last_col_width; /* # of non-dummy blocks across in last MCU */
|
||||
int last_row_height; /* # of non-dummy blocks down in last MCU */
|
||||
|
||||
@ -300,17 +291,6 @@ struct jpeg_compress_struct {
|
||||
* helper routines to simplify changing parameters.
|
||||
*/
|
||||
|
||||
unsigned int scale_num, scale_denom; /* fraction by which to scale image */
|
||||
|
||||
JDIMENSION jpeg_width; /* scaled JPEG image width */
|
||||
JDIMENSION jpeg_height; /* scaled JPEG image height */
|
||||
/* Dimensions of actual JPEG image that will be written to file,
|
||||
* derived from input dimensions by scaling factors above.
|
||||
* These fields are computed by jpeg_start_compress().
|
||||
* You can also use jpeg_calc_jpeg_dimensions() to determine these values
|
||||
* in advance of calling jpeg_start_compress().
|
||||
*/
|
||||
|
||||
int data_precision; /* bits of precision in image data */
|
||||
|
||||
int num_components; /* # of color components in JPEG image */
|
||||
@ -320,10 +300,7 @@ struct jpeg_compress_struct {
|
||||
/* comp_info[i] describes component that appears i'th in SOF */
|
||||
|
||||
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
|
||||
int q_scale_factor[NUM_QUANT_TBLS];
|
||||
/* ptrs to coefficient quantization tables, or NULL if not defined,
|
||||
* and corresponding scale factors (percentage, initialized 100).
|
||||
*/
|
||||
/* ptrs to coefficient quantization tables, or NULL if not defined */
|
||||
|
||||
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
|
||||
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
|
||||
@ -344,7 +321,6 @@ struct jpeg_compress_struct {
|
||||
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
||||
boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
|
||||
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
|
||||
boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */
|
||||
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
|
||||
J_DCT_METHOD dct_method; /* DCT algorithm selector */
|
||||
|
||||
@ -388,9 +364,6 @@ struct jpeg_compress_struct {
|
||||
int max_h_samp_factor; /* largest h_samp_factor */
|
||||
int max_v_samp_factor; /* largest v_samp_factor */
|
||||
|
||||
int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */
|
||||
int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */
|
||||
|
||||
JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */
|
||||
/* The coefficient controller receives data in units of MCU rows as defined
|
||||
* for fully interleaved scans (whether the JPEG file is interleaved or not).
|
||||
@ -416,10 +389,6 @@ struct jpeg_compress_struct {
|
||||
|
||||
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
|
||||
|
||||
int block_size; /* the basic DCT block size: 1..16 */
|
||||
const int * natural_order; /* natural-order position array */
|
||||
int lim_Se; /* min( Se, DCTSIZE2-1 ) */
|
||||
|
||||
/*
|
||||
* Links to compression subobjects (methods and private variables of modules)
|
||||
*/
|
||||
@ -566,7 +535,6 @@ struct jpeg_decompress_struct {
|
||||
jpeg_component_info * comp_info;
|
||||
/* comp_info[i] describes component that appears i'th in SOF */
|
||||
|
||||
boolean is_baseline; /* TRUE if Baseline SOF0 encountered */
|
||||
boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
|
||||
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
||||
|
||||
@ -607,8 +575,7 @@ struct jpeg_decompress_struct {
|
||||
int max_h_samp_factor; /* largest h_samp_factor */
|
||||
int max_v_samp_factor; /* largest v_samp_factor */
|
||||
|
||||
int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */
|
||||
int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */
|
||||
int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */
|
||||
|
||||
JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */
|
||||
/* The coefficient controller's input and output progress is measured in
|
||||
@ -616,7 +583,7 @@ struct jpeg_decompress_struct {
|
||||
* in fully interleaved JPEG scans, but are used whether the scan is
|
||||
* interleaved or not. We define an iMCU row as v_samp_factor DCT block
|
||||
* rows of each component. Therefore, the IDCT output contains
|
||||
* v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row.
|
||||
* v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
|
||||
*/
|
||||
|
||||
JSAMPLE * sample_range_limit; /* table for fast range-limiting */
|
||||
@ -640,12 +607,6 @@ struct jpeg_decompress_struct {
|
||||
|
||||
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
|
||||
|
||||
/* These fields are derived from Se of first SOS marker.
|
||||
*/
|
||||
int block_size; /* the basic DCT block size: 1..16 */
|
||||
const int * natural_order; /* natural-order position array for entropy decode */
|
||||
int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */
|
||||
|
||||
/* This field is shared between entropy decoder and marker parser.
|
||||
* It is either zero or the code of a JPEG marker that has been
|
||||
* read from the data source, but has not yet been processed.
|
||||
@ -875,14 +836,11 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
|
||||
#define jpeg_destroy_decompress jDestDecompress
|
||||
#define jpeg_stdio_dest jStdDest
|
||||
#define jpeg_stdio_src jStdSrc
|
||||
#define jpeg_mem_dest jMemDest
|
||||
#define jpeg_mem_src jMemSrc
|
||||
#define jpeg_set_defaults jSetDefaults
|
||||
#define jpeg_set_colorspace jSetColorspace
|
||||
#define jpeg_default_colorspace jDefColorspace
|
||||
#define jpeg_set_quality jSetQuality
|
||||
#define jpeg_set_linear_quality jSetLQuality
|
||||
#define jpeg_default_qtables jDefQTables
|
||||
#define jpeg_add_quant_table jAddQuantTable
|
||||
#define jpeg_quality_scaling jQualityScaling
|
||||
#define jpeg_simple_progression jSimProgress
|
||||
@ -892,7 +850,6 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
|
||||
#define jpeg_start_compress jStrtCompress
|
||||
#define jpeg_write_scanlines jWrtScanlines
|
||||
#define jpeg_finish_compress jFinCompress
|
||||
#define jpeg_calc_jpeg_dimensions jCjpegDimensions
|
||||
#define jpeg_write_raw_data jWrtRawData
|
||||
#define jpeg_write_marker jWrtMarker
|
||||
#define jpeg_write_m_header jWrtMHeader
|
||||
@ -909,7 +866,6 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
|
||||
#define jpeg_input_complete jInComplete
|
||||
#define jpeg_new_colormap jNewCMap
|
||||
#define jpeg_consume_input jConsumeInput
|
||||
#define jpeg_core_output_dimensions jCoreDimensions
|
||||
#define jpeg_calc_output_dimensions jCalcDimensions
|
||||
#define jpeg_save_markers jSaveMarkers
|
||||
#define jpeg_set_marker_processor jSetMarker
|
||||
@ -954,14 +910,6 @@ EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
|
||||
EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
|
||||
|
||||
/* Data source and destination managers: memory buffers. */
|
||||
EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
|
||||
unsigned char ** outbuffer,
|
||||
unsigned long * outsize));
|
||||
EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
|
||||
unsigned char * inbuffer,
|
||||
unsigned long insize));
|
||||
|
||||
/* Default parameter setup for compression */
|
||||
EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
|
||||
/* Compression parameter setup aids */
|
||||
@ -973,8 +921,6 @@ EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
|
||||
EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
|
||||
int scale_factor,
|
||||
boolean force_baseline));
|
||||
EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
|
||||
boolean force_baseline));
|
||||
EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
|
||||
const unsigned int *basic_table,
|
||||
int scale_factor,
|
||||
@ -994,15 +940,12 @@ EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
|
||||
JDIMENSION num_lines));
|
||||
EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
|
||||
|
||||
/* Precalculate JPEG dimensions for current compression parameters. */
|
||||
EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
|
||||
|
||||
/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
|
||||
EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
|
||||
JSAMPIMAGE data,
|
||||
JDIMENSION num_lines));
|
||||
|
||||
/* Write a special marker. See libjpeg.txt concerning safe usage. */
|
||||
/* Write a special marker. See libjpeg.doc concerning safe usage. */
|
||||
EXTERN(void) jpeg_write_marker
|
||||
JPP((j_compress_ptr cinfo, int marker,
|
||||
const JOCTET * dataptr, unsigned int datalen));
|
||||
@ -1056,7 +999,6 @@ EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
|
||||
#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */
|
||||
|
||||
/* Precalculate output dimensions for current decompression parameters. */
|
||||
EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
|
||||
|
||||
/* Control saving of COM and APPn markers into marker_list. */
|
||||
@ -1151,10 +1093,4 @@ struct jpeg_color_quantizer { long dummy; };
|
||||
#include "jerror.h" /* fetch error codes too */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef DONT_USE_EXTERN_C
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* JPEGLIB_H */
|
||||
|
3304
portlibs/include/png.h
Normal file
3304
portlibs/include/png.h
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
209
portlibs/include/pnglibconf.h
Normal file
209
portlibs/include/pnglibconf.h
Normal file
@ -0,0 +1,209 @@
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* libpng version 1.6.2 - April 25, 2013 */
|
||||
|
||||
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
||||
|
||||
/* This code is released under the libpng license. */
|
||||
/* For conditions of distribution and use, see the disclaimer */
|
||||
/* and license in png.h */
|
||||
|
||||
/* pnglibconf.h */
|
||||
/* Machine generated file: DO NOT EDIT */
|
||||
/* Derived from: scripts/pnglibconf.dfa */
|
||||
#ifndef PNGLCONF_H
|
||||
#define PNGLCONF_H
|
||||
/* options */
|
||||
#define PNG_16BIT_SUPPORTED
|
||||
#define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
|
||||
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
|
||||
/*#undef PNG_ARM_NEON_SUPPORTED*/
|
||||
#define PNG_BENIGN_ERRORS_SUPPORTED
|
||||
#define PNG_BENIGN_READ_ERRORS_SUPPORTED
|
||||
/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
|
||||
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_COLORSPACE_SUPPORTED
|
||||
#define PNG_CONSOLE_IO_SUPPORTED
|
||||
#define PNG_CONVERT_tIME_SUPPORTED
|
||||
#define PNG_EASY_ACCESS_SUPPORTED
|
||||
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
|
||||
#define PNG_ERROR_TEXT_SUPPORTED
|
||||
#define PNG_FIXED_POINT_SUPPORTED
|
||||
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||
#define PNG_FLOATING_POINT_SUPPORTED
|
||||
#define PNG_FORMAT_AFIRST_SUPPORTED
|
||||
#define PNG_FORMAT_BGR_SUPPORTED
|
||||
#define PNG_GAMMA_SUPPORTED
|
||||
#define PNG_GET_PALETTE_MAX_SUPPORTED
|
||||
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||
#define PNG_INCH_CONVERSIONS_SUPPORTED
|
||||
#define PNG_INFO_IMAGE_SUPPORTED
|
||||
#define PNG_IO_STATE_SUPPORTED
|
||||
#define PNG_MNG_FEATURES_SUPPORTED
|
||||
#define PNG_POINTER_INDEXING_SUPPORTED
|
||||
#define PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
#define PNG_READ_16BIT_SUPPORTED
|
||||
#define PNG_READ_ALPHA_MODE_SUPPORTED
|
||||
#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
|
||||
#define PNG_READ_BACKGROUND_SUPPORTED
|
||||
#define PNG_READ_BGR_SUPPORTED
|
||||
#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
|
||||
#define PNG_READ_EXPAND_16_SUPPORTED
|
||||
#define PNG_READ_EXPAND_SUPPORTED
|
||||
#define PNG_READ_FILLER_SUPPORTED
|
||||
#define PNG_READ_GAMMA_SUPPORTED
|
||||
#define PNG_READ_GET_PALETTE_MAX_SUPPORTED
|
||||
#define PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||
#define PNG_READ_INTERLACING_SUPPORTED
|
||||
#define PNG_READ_INT_FUNCTIONS_SUPPORTED
|
||||
#define PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||
#define PNG_READ_INVERT_SUPPORTED
|
||||
#define PNG_READ_OPT_PLTE_SUPPORTED
|
||||
#define PNG_READ_PACKSWAP_SUPPORTED
|
||||
#define PNG_READ_PACK_SUPPORTED
|
||||
#define PNG_READ_QUANTIZE_SUPPORTED
|
||||
#define PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||
#define PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||
#define PNG_READ_SHIFT_SUPPORTED
|
||||
#define PNG_READ_STRIP_16_TO_8_SUPPORTED
|
||||
#define PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||
#define PNG_READ_SUPPORTED
|
||||
#define PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||
#define PNG_READ_SWAP_SUPPORTED
|
||||
#define PNG_READ_TEXT_SUPPORTED
|
||||
#define PNG_READ_TRANSFORMS_SUPPORTED
|
||||
#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_READ_USER_CHUNKS_SUPPORTED
|
||||
#define PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
#define PNG_READ_bKGD_SUPPORTED
|
||||
#define PNG_READ_cHRM_SUPPORTED
|
||||
#define PNG_READ_gAMA_SUPPORTED
|
||||
#define PNG_READ_hIST_SUPPORTED
|
||||
#define PNG_READ_iCCP_SUPPORTED
|
||||
#define PNG_READ_iTXt_SUPPORTED
|
||||
#define PNG_READ_oFFs_SUPPORTED
|
||||
#define PNG_READ_pCAL_SUPPORTED
|
||||
#define PNG_READ_pHYs_SUPPORTED
|
||||
#define PNG_READ_sBIT_SUPPORTED
|
||||
#define PNG_READ_sCAL_SUPPORTED
|
||||
#define PNG_READ_sPLT_SUPPORTED
|
||||
#define PNG_READ_sRGB_SUPPORTED
|
||||
#define PNG_READ_tEXt_SUPPORTED
|
||||
#define PNG_READ_tIME_SUPPORTED
|
||||
#define PNG_READ_tRNS_SUPPORTED
|
||||
#define PNG_READ_zTXt_SUPPORTED
|
||||
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
||||
#define PNG_SAVE_INT_32_SUPPORTED
|
||||
#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
#define PNG_SETJMP_SUPPORTED
|
||||
#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
|
||||
#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
|
||||
/*#undef PNG_SET_OPTION_SUPPORTED*/
|
||||
#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_SET_USER_LIMITS_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
#define PNG_STDIO_SUPPORTED
|
||||
#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_TEXT_SUPPORTED
|
||||
#define PNG_TIME_RFC1123_SUPPORTED
|
||||
#define PNG_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_USER_CHUNKS_SUPPORTED
|
||||
#define PNG_USER_LIMITS_SUPPORTED
|
||||
#define PNG_USER_MEM_SUPPORTED
|
||||
#define PNG_USER_TRANSFORM_INFO_SUPPORTED
|
||||
#define PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||
#define PNG_WARNINGS_SUPPORTED
|
||||
#define PNG_WRITE_16BIT_SUPPORTED
|
||||
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||
#define PNG_WRITE_BGR_SUPPORTED
|
||||
#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
|
||||
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
|
||||
#define PNG_WRITE_FILLER_SUPPORTED
|
||||
#define PNG_WRITE_FILTER_SUPPORTED
|
||||
#define PNG_WRITE_FLUSH_SUPPORTED
|
||||
#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED
|
||||
#define PNG_WRITE_INTERLACING_SUPPORTED
|
||||
#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
|
||||
#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
#define PNG_WRITE_INVERT_SUPPORTED
|
||||
#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
|
||||
#define PNG_WRITE_PACKSWAP_SUPPORTED
|
||||
#define PNG_WRITE_PACK_SUPPORTED
|
||||
#define PNG_WRITE_SHIFT_SUPPORTED
|
||||
#define PNG_WRITE_SUPPORTED
|
||||
#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||
#define PNG_WRITE_SWAP_SUPPORTED
|
||||
#define PNG_WRITE_TEXT_SUPPORTED
|
||||
#define PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||
#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||
#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||
#define PNG_WRITE_bKGD_SUPPORTED
|
||||
#define PNG_WRITE_cHRM_SUPPORTED
|
||||
#define PNG_WRITE_gAMA_SUPPORTED
|
||||
#define PNG_WRITE_hIST_SUPPORTED
|
||||
#define PNG_WRITE_iCCP_SUPPORTED
|
||||
#define PNG_WRITE_iTXt_SUPPORTED
|
||||
#define PNG_WRITE_oFFs_SUPPORTED
|
||||
#define PNG_WRITE_pCAL_SUPPORTED
|
||||
#define PNG_WRITE_pHYs_SUPPORTED
|
||||
#define PNG_WRITE_sBIT_SUPPORTED
|
||||
#define PNG_WRITE_sCAL_SUPPORTED
|
||||
#define PNG_WRITE_sPLT_SUPPORTED
|
||||
#define PNG_WRITE_sRGB_SUPPORTED
|
||||
#define PNG_WRITE_tEXt_SUPPORTED
|
||||
#define PNG_WRITE_tIME_SUPPORTED
|
||||
#define PNG_WRITE_tRNS_SUPPORTED
|
||||
#define PNG_WRITE_zTXt_SUPPORTED
|
||||
#define PNG_bKGD_SUPPORTED
|
||||
#define PNG_cHRM_SUPPORTED
|
||||
#define PNG_gAMA_SUPPORTED
|
||||
#define PNG_hIST_SUPPORTED
|
||||
#define PNG_iCCP_SUPPORTED
|
||||
#define PNG_iTXt_SUPPORTED
|
||||
#define PNG_oFFs_SUPPORTED
|
||||
#define PNG_pCAL_SUPPORTED
|
||||
#define PNG_pHYs_SUPPORTED
|
||||
#define PNG_sBIT_SUPPORTED
|
||||
#define PNG_sCAL_SUPPORTED
|
||||
#define PNG_sPLT_SUPPORTED
|
||||
#define PNG_sRGB_SUPPORTED
|
||||
#define PNG_tEXt_SUPPORTED
|
||||
#define PNG_tIME_SUPPORTED
|
||||
#define PNG_tRNS_SUPPORTED
|
||||
#define PNG_zTXt_SUPPORTED
|
||||
/* end of options */
|
||||
/* settings */
|
||||
#define PNG_API_RULE 0
|
||||
#define PNG_CALLOC_SUPPORTED
|
||||
#define PNG_COST_SHIFT 3
|
||||
#define PNG_DEFAULT_READ_MACROS 1
|
||||
#define PNG_GAMMA_THRESHOLD_FIXED 5000
|
||||
#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
|
||||
#define PNG_INFLATE_BUF_SIZE 1024
|
||||
#define PNG_MAX_GAMMA_8 11
|
||||
#define PNG_QUANTIZE_BLUE_BITS 5
|
||||
#define PNG_QUANTIZE_GREEN_BITS 5
|
||||
#define PNG_QUANTIZE_RED_BITS 5
|
||||
#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1)
|
||||
#define PNG_TEXT_Z_DEFAULT_STRATEGY 0
|
||||
#define PNG_WEIGHT_SHIFT 8
|
||||
#define PNG_ZBUF_SIZE 8192
|
||||
#define PNG_Z_DEFAULT_COMPRESSION (-1)
|
||||
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
|
||||
#define PNG_Z_DEFAULT_STRATEGY 1
|
||||
#define PNG_sCAL_PRECISION 5
|
||||
#define PNG_sRGB_PROFILE_CHECKS 2
|
||||
/* end of settings */
|
||||
#endif /* PNGLCONF_H */
|
@ -1,175 +0,0 @@
|
||||
/********************************************************************************************
|
||||
|
||||
PNGU Version : 0.2a
|
||||
|
||||
Coder : frontier
|
||||
|
||||
More info : http://frontier-dev.net
|
||||
|
||||
********************************************************************************************/
|
||||
#ifndef __PNGU__
|
||||
#define __PNGU__
|
||||
|
||||
// Return codes
|
||||
#define PNGU_OK 0
|
||||
#define PNGU_ODD_WIDTH 1
|
||||
#define PNGU_ODD_STRIDE 2
|
||||
#define PNGU_INVALID_WIDTH_OR_HEIGHT 3
|
||||
#define PNGU_FILE_IS_NOT_PNG 4
|
||||
#define PNGU_UNSUPPORTED_COLOR_TYPE 5
|
||||
#define PNGU_NO_FILE_SELECTED 6
|
||||
#define PNGU_CANT_OPEN_FILE 7
|
||||
#define PNGU_CANT_READ_FILE 8
|
||||
#define PNGU_LIB_ERROR 9
|
||||
|
||||
// Color types
|
||||
#define PNGU_COLOR_TYPE_GRAY 1
|
||||
#define PNGU_COLOR_TYPE_GRAY_ALPHA 2
|
||||
#define PNGU_COLOR_TYPE_PALETTE 3
|
||||
#define PNGU_COLOR_TYPE_RGB 4
|
||||
#define PNGU_COLOR_TYPE_RGB_ALPHA 5
|
||||
#define PNGU_COLOR_TYPE_UNKNOWN 6
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Types
|
||||
typedef unsigned char PNGU_u8;
|
||||
typedef unsigned short PNGU_u16;
|
||||
typedef unsigned int PNGU_u32;
|
||||
typedef unsigned long long PNGU_u64;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PNGU_u8 r;
|
||||
PNGU_u8 g;
|
||||
PNGU_u8 b;
|
||||
} PNGUCOLOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PNGU_u32 imgWidth; // In pixels
|
||||
PNGU_u32 imgHeight; // In pixels
|
||||
PNGU_u32 imgBitDepth; // In bitx
|
||||
PNGU_u32 imgColorType; // PNGU_COLOR_TYPE_*
|
||||
PNGU_u32 validBckgrnd; // Non zero if there is a background color
|
||||
PNGUCOLOR bckgrnd; // Backgroun color
|
||||
PNGU_u32 numTrans; // Number of transparent colors
|
||||
PNGUCOLOR *trans; // Transparent colors
|
||||
} PNGUPROP;
|
||||
|
||||
// Image context, always initialize with SelectImageFrom* and free with ReleaseImageContext
|
||||
struct _IMGCTX;
|
||||
typedef struct _IMGCTX *IMGCTX;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Pixel conversion *
|
||||
****************************************************************************/
|
||||
|
||||
// Macro to convert RGB8 values to RGB565
|
||||
#define PNGU_RGB8_TO_RGB565(r,g,b) ( ((((PNGU_u16) r) & 0xF8U) << 8) | ((((PNGU_u16) g) & 0xFCU) << 3) | (((PNGU_u16) b) >> 3) )
|
||||
|
||||
// Macro to convert RGBA8 values to RGB5A3
|
||||
#define PNGU_RGB8_TO_RGB5A3(r,g,b,a) (PNGU_u16) (((a & 0xE0U) == 0xE0U) ? \
|
||||
(0x8000U | ((((PNGU_u16) r) & 0xF8U) << 7) | ((((PNGU_u16) g) & 0xF8U) << 2) | (((PNGU_u16) b) >> 3)) : \
|
||||
(((((PNGU_u16) a) & 0xE0U) << 7) | ((((PNGU_u16) r) & 0xF0U) << 4) | (((PNGU_u16) g) & 0xF0U) | ((((PNGU_u16) b) & 0xF0U) >> 4)))
|
||||
|
||||
// Function to convert two RGB8 values to YCbYCr
|
||||
PNGU_u32 PNGU_RGB8_TO_YCbYCr (PNGU_u8 r1, PNGU_u8 g1, PNGU_u8 b1, PNGU_u8 r2, PNGU_u8 g2, PNGU_u8 b2);
|
||||
|
||||
// Function to convert an YCbYCr to two RGB8 values.
|
||||
void PNGU_YCbYCr_TO_RGB8 (PNGU_u32 ycbycr, PNGU_u8 *r1, PNGU_u8 *g1, PNGU_u8 *b1, PNGU_u8 *r2, PNGU_u8 *g2, PNGU_u8 *b2);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Image context handling *
|
||||
****************************************************************************/
|
||||
|
||||
// Selects a PNG file, previosly loaded into a buffer, and creates an image context for subsequent procesing.
|
||||
IMGCTX PNGU_SelectImageFromBuffer (const void *buffer);
|
||||
|
||||
// Selects a PNG file, from any devoptab device, and creates an image context for subsequent procesing.
|
||||
IMGCTX PNGU_SelectImageFromDevice (const char *filename);
|
||||
|
||||
// Frees resources associated with an image context. Always call this function when you no longer need the IMGCTX.
|
||||
void PNGU_ReleaseImageContext (IMGCTX ctx);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Miscelaneous *
|
||||
****************************************************************************/
|
||||
|
||||
// Retrieves info from selected PNG file, including image dimensions, color format, background and transparency colors.
|
||||
int PNGU_GetImageProperties (IMGCTX ctx, PNGUPROP *fileproperties);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Image conversion *
|
||||
****************************************************************************/
|
||||
|
||||
// Expands selected image into an YCbYCr buffer. You need to specify context, image dimensions,
|
||||
// destination address and stride in pixels (stride = buffer width - image width).
|
||||
int PNGU_DecodeToYCbYCr (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u32 stride);
|
||||
|
||||
// Macro for decoding an image inside a buffer at given coordinates.
|
||||
#define PNGU_DECODE_TO_COORDS_YCbYCr(ctx,coordX,coordY,imgWidth,imgHeight,bufferWidth,bufferHeight,buffer) \
|
||||
\
|
||||
PNGU_DecodeToYCbYCr (ctx, imgWidth, imgHeight, ((void *) buffer) + (coordY) * (bufferWidth) * 2 + \
|
||||
(coordX) * 2, (bufferWidth) - (imgWidth))
|
||||
|
||||
// Expands selected image into a linear RGB565 buffer. You need to specify context, image dimensions,
|
||||
// destination address and stride in pixels (stride = buffer width - image width).
|
||||
int PNGU_DecodeToRGB565 (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u32 stride);
|
||||
|
||||
// Macro for decoding an image inside a buffer at given coordinates.
|
||||
#define PNGU_DECODE_TO_COORDS_RGB565(ctx,coordX,coordY,imgWidth,imgHeight,bufferWidth,bufferHeight,buffer) \
|
||||
\
|
||||
PNGU_DecodeToRGB565 (ctx, imgWidth, imgHeight, ((void *) buffer) + (coordY) * (bufferWidth) * 2 + \
|
||||
(coordX) * 2, (bufferWidth) - (imgWidth))
|
||||
|
||||
// Expands selected image into a linear RGBA8 buffer. You need to specify context, image dimensions,
|
||||
// destination address, stride in pixels and default alpha value, which is used if the source image
|
||||
// doesn't have an alpha channel.
|
||||
int PNGU_DecodeToRGBA8 (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u32 stride, PNGU_u8 default_alpha);
|
||||
|
||||
// Macro for decoding an image inside a buffer at given coordinates.
|
||||
#define PNGU_DECODE_TO_COORDS_RGBA8(ctx,coordX,coordY,imgWidth,imgHeight,default_alpha,bufferWidth,bufferHeight,buffer) \
|
||||
\
|
||||
PNGU_DecodeToRGBA8 (ctx, imgWidth, imgHeight, ((void *) buffer) + (coordY) * (bufferWidth) * 2 + \
|
||||
(coordX) * 2, (bufferWidth) - (imgWidth), default_alpha)
|
||||
|
||||
// Expands selected image into a 4x4 tiled RGB565 buffer. You need to specify context, image dimensions
|
||||
// and destination address.
|
||||
int PNGU_DecodeTo4x4RGB565 (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer);
|
||||
|
||||
// Expands selected image into a 4x4 tiled RGB5A3 buffer. You need to specify context, image dimensions,
|
||||
// destination address and default alpha value, which is used if the source image doesn't have an alpha channel.
|
||||
int PNGU_DecodeTo4x4RGB5A3 (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u8 default_alpha);
|
||||
|
||||
// Expands selected image into a 4x4 tiled RGBA8 buffer. You need to specify context, image dimensions,
|
||||
// destination address.
|
||||
PNGU_u8 * PNGU_DecodeTo4x4RGBA8 (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, int * dstWidth, int * dstHeight, PNGU_u8 *dstPtr);
|
||||
|
||||
// Encodes an YCbYCr image in PNG format and stores it in the selected device or memory buffer. You need to
|
||||
// specify context, image dimensions, destination address and stride in pixels (stride = buffer width - image width).
|
||||
int PNGU_EncodeFromYCbYCr (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u32 stride);
|
||||
|
||||
int PNGU_EncodeFromRGB (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u32 stride);
|
||||
int PNGU_EncodeFromGXTexture (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, void *buffer, PNGU_u32 stride);
|
||||
int PNGU_EncodeFromEFB (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, PNGU_u32 stride);
|
||||
|
||||
// Macro for encoding an image stored into an YCbYCr buffer at given coordinates.
|
||||
#define PNGU_ENCODE_TO_COORDS_YCbYCr(ctx,coordX,coordY,imgWidth,imgHeight,bufferWidth,bufferHeight,buffer) \
|
||||
\
|
||||
PNGU_EncodeFromYCbYCr (ctx, imgWidth, imgHeight, ((void *) buffer) + (coordY) * (bufferWidth) * 2 + \
|
||||
(coordX) * 2, (bufferWidth) - (imgWidth))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -86,7 +86,6 @@
|
||||
#else
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/param.h>
|
||||
# include "config_types.h"
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2012 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
@ -77,6 +78,7 @@
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
@ -103,6 +105,7 @@
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
@ -388,13 +391,28 @@ typedef uLong FAR uLongf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
typedef unsigned long z_crc_t;
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
@ -404,8 +422,16 @@ typedef unsigned long z_crc_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
@ -414,7 +440,7 @@ typedef unsigned long z_crc_t;
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
@ -422,7 +448,7 @@ typedef unsigned long z_crc_t;
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE)
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.7, May 2nd, 2012
|
||||
version 1.2.8, April 28th, 2013
|
||||
|
||||
Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -37,11 +37,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.2.7"
|
||||
#define ZLIB_VERNUM 0x1270
|
||||
#define ZLIB_VERSION "1.2.8"
|
||||
#define ZLIB_VERNUM 0x1280
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 2
|
||||
#define ZLIB_VER_REVISION 7
|
||||
#define ZLIB_VER_REVISION 8
|
||||
#define ZLIB_VER_SUBREVISION 0
|
||||
|
||||
/*
|
||||
@ -839,6 +839,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
||||
inflate().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
|
||||
Bytef *dictionary,
|
||||
uInt *dictLength));
|
||||
/*
|
||||
Returns the sliding dictionary being maintained by inflate. dictLength is
|
||||
set to the number of bytes in the dictionary, and that many bytes are copied
|
||||
to dictionary. dictionary must have enough space, where 32768 bytes is
|
||||
always enough. If inflateGetDictionary() is called with dictionary equal to
|
||||
Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
||||
Similary, if dictLength is Z_NULL, then it is not set.
|
||||
|
||||
inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
|
||||
stream state is inconsistent.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
||||
/*
|
||||
Skips invalid compressed data until a possible full flush point (see above
|
||||
@ -846,7 +861,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
||||
available input is skipped. No output is provided.
|
||||
|
||||
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
|
||||
All full flush points have this pattern, but not all occurences of this
|
||||
All full flush points have this pattern, but not all occurrences of this
|
||||
pattern are full flush points.
|
||||
|
||||
inflateSync returns Z_OK if a possible full flush point has been found,
|
||||
@ -1007,7 +1022,8 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
|
||||
the version of the header file.
|
||||
*/
|
||||
|
||||
typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
|
||||
typedef unsigned (*in_func) OF((void FAR *,
|
||||
z_const unsigned char FAR * FAR *));
|
||||
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
|
||||
|
||||
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
||||
@ -1015,11 +1031,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
||||
out_func out, void FAR *out_desc));
|
||||
/*
|
||||
inflateBack() does a raw inflate with a single call using a call-back
|
||||
interface for input and output. This is more efficient than inflate() for
|
||||
file i/o applications in that it avoids copying between the output and the
|
||||
sliding window by simply making the window itself the output buffer. This
|
||||
function trusts the application to not change the output buffer passed by
|
||||
the output function, at least until inflateBack() returns.
|
||||
interface for input and output. This is potentially more efficient than
|
||||
inflate() for file i/o applications, in that it avoids copying between the
|
||||
output and the sliding window by simply making the window itself the output
|
||||
buffer. inflate() can be faster on modern CPUs when used with large
|
||||
buffers. inflateBack() trusts the application to not change the output
|
||||
buffer passed by the output function, at least until inflateBack() returns.
|
||||
|
||||
inflateBackInit() must be called first to allocate the internal state
|
||||
and to initialize the state with the user-provided window buffer.
|
||||
@ -1736,6 +1753,13 @@ ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
||||
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
||||
const char *mode));
|
||||
#endif
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
||||
const char *format,
|
||||
va_list va));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -701,7 +701,7 @@ void decodeJpeg(const u8* data, int size, VideoFrame& dest)
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "jpeglib.h"
|
||||
#include <jpeglib.h>
|
||||
#include <setjmp.h>
|
||||
}
|
||||
|
||||
|
3569
source/gui/png.h
3569
source/gui/png.h
File diff suppressed because it is too large
Load Diff
1481
source/gui/pngconf.h
1481
source/gui/pngconf.h
File diff suppressed because it is too large
Load Diff
@ -8,11 +8,12 @@ More info : http://frontier-dev.net
|
||||
|
||||
********************************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <png.h>
|
||||
|
||||
#include "pngu.h"
|
||||
#include "png.h"
|
||||
#include "gecko/gecko.hpp"
|
||||
#include "loader/utils.h"
|
||||
#include "memory/mem2.hpp"
|
||||
|
@ -44,7 +44,7 @@ static int decrypt_byte(unsigned long* pkeys)
|
||||
/***********************************************************************
|
||||
* Update the encryption keys with the next byte of plain text
|
||||
*/
|
||||
static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) {
|
||||
static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) {
|
||||
(*(pkeys+0)) = CRC32((*(pkeys+0)), c);
|
||||
(*(pkeys+1)) += (*(pkeys+0)) & 0xff;
|
||||
(*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
|
||||
@ -60,7 +60,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int
|
||||
* Initialize the encryption keys and the random header according to
|
||||
* the given password.
|
||||
*/
|
||||
static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) {
|
||||
static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab) {
|
||||
*(pkeys+0) = 305419896L;
|
||||
*(pkeys+1) = 591751049L;
|
||||
*(pkeys+2) = 878082192L;
|
||||
|
@ -145,7 +145,7 @@ typedef struct {
|
||||
int encrypted;
|
||||
# ifndef NOUNCRYPT
|
||||
unsigned long keys[3]; /* keys defining the pseudo-random sequence */
|
||||
const unsigned long* pcrc_32_tab;
|
||||
const z_crc_t* pcrc_32_tab;
|
||||
# endif
|
||||
} unz_s;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user