ModMii Edition changes
- Compile with the latest version of devkitPPC - Reports can be saved to USB storage - The console ID is masked when uploaded - All of the assets have been optimised - Added GitHub continuous integration
41
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: Build binaries
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
- '.github/FUNDING.yml'
|
||||
- '.github/**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
- '.github/FUNDING.yml'
|
||||
- '.github/**/*.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkitppc:20230110
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile
|
||||
run: make
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
mkdir -p upload/apps/SysCheckME
|
||||
cp boot.dol upload/apps/SysCheckME
|
||||
cp SysCheckME/icon.png upload/apps/SysCheckME
|
||||
cp SysCheckME/meta.xml upload/apps/SysCheckME
|
||||
echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: SysCheckME-${{ env.sha }}
|
||||
path: upload
|
11
.gitignore
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
# Ignore all of this stuff...
|
||||
*.bat
|
||||
*.dol
|
||||
*.elf
|
||||
*.exe
|
||||
*.zip
|
||||
*.7z
|
||||
.vs/
|
||||
.vscode/
|
||||
build/
|
||||
/wiiload
|
17
Makefile
@ -25,21 +25,15 @@ INCLUDES := include
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -lgrrlib
|
||||
LIBS += -lfreetype
|
||||
LIBS += -lpngu -lpng -ljpeg -lz -lfat -ldi
|
||||
LIBS += -lwiilight -lwiiuse
|
||||
#LIBS += -lmodplay -lasnd
|
||||
LIBS += -lbte -logc -lm
|
||||
LIBS += -lCheckRegion
|
||||
LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -ldi -lwiiuse \
|
||||
-lbte -logc -lm -lCheckRegion
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
@ -102,12 +96,8 @@ export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
#lets see what OS we are on and then create svnref file
|
||||
UNAME := $(shell uname)
|
||||
#and now make the build list
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@grep _V_STR $(LIBOGC_INC)/ogc/libversion.h | cut -f2 -d'"'
|
||||
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
@ -119,7 +109,6 @@ clean:
|
||||
run:
|
||||
wiiload $(TARGET).dol
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
|
Before Width: | Height: | Size: 377 KiB |
@ -1 +0,0 @@
|
||||
<Project name="SysCheck HDE"><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.c;*.cpp;*.h" name="source" path="source\"><File path="fatMounter.c"></File><File path="gecko.c"></File><File path="gui.c"></File><File path="http.c"></File><File path="languages.c"></File><File path="mload.c"></File><File path="runtimeiospatch.c"></File><File path="sha1.c"></File><File path="ssl.c"></File><File path="sys.c"></File><File path="sysCheck.c"></File><File path="SysMenuInfo.c"></File><File path="title.c"></File><File path="tmdIdentification.c"></File><File path="tools.c"></File><File path="update.c"></File><File path="upload.c"></File><File path="wiibasics.c"></File></MagicFolder><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.h" name="include" path="include\"><File path="fatMounter.h"></File><File path="gecko.h"></File><File path="gui.h"></File><File path="http.h"></File><File path="languages.h"></File><File path="mload.h"></File><File path="runtimeiospatch.h"></File><File path="sha1.h"></File><File path="ssl.h"></File><File path="sys.h"></File><File path="SysMenuInfo.h"></File><File path="title.h"></File><File path="tmdIdentification.h"></File><File path="tools.h"></File><File path="update.h"></File><File path="wiibasics.h"></File></MagicFolder><File path="Makefile"></File></Project>
|
Before Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 6.1 KiB |
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<app version="1">
|
||||
<name>SysCheck HacksDen Edition</name>
|
||||
<coder>JoostinOnline, Double_A, R2-D2199, Nano</coder>
|
||||
<version>2.4.0 HD Edition</version>
|
||||
<release_date>20151012000000</release_date>
|
||||
<short_description>System Checker HacksDen Edition</short_description>
|
||||
<long_description>Homebrew application which does several checks on installed IOS and custom IOS:
|
||||
- Base IOS Detection
|
||||
- vIOS Detection
|
||||
- Beer Ticket
|
||||
- IOS Stub
|
||||
- Fake Signature (aka Trucha Bug)
|
||||
- ES_DiVerify (aka ES_Identify)
|
||||
- Flash Access
|
||||
- NAND Access
|
||||
- Boot2 Access
|
||||
- USB 2.0
|
||||
|
||||
sysCheck generates a report on the root of the SD card (sd:/sysCheck.csv).
|
||||
|
||||
The author can not be held responsible for any damage sysCheck might cause!
|
||||
|
||||
------------------
|
||||
Changelog
|
||||
Version 2.4.0 HacksDen Edition
|
||||
-Added check for Beer ticket
|
||||
-Added skipped IOS's to list
|
||||
-Removed the need to reload the runtime IOS
|
||||
-SysCheck directory is created if it doesn't exist
|
||||
-Fixed incorrect runtime IOS type
|
||||
-Fixed vWii cIOS's sometimes showing as regular cIOS's
|
||||
-Fixed crash when the language is set to Italian, French, or Spanish
|
||||
-Fixed update function
|
||||
-Updated Spanish translation (thanks NaxoR93)
|
||||
|
||||
Version 2.3.2 HacksDen Edition
|
||||
* Disabled vIOS check on a real Wii because it was causing problems
|
||||
* Fixed the drive date bug (for real this time)
|
||||
* Fixed possible crash when there is no AHB access
|
||||
* Fixed crash when unknown System Menu version is installed
|
||||
|
||||
Version 2.3.1 HacksDen Edition
|
||||
* Added hashes for hermes cIOS 2XX[38+60]v4, 2XX[38+37]v4, and 2XX[57]v5.1 (thanks Cyan)
|
||||
* Now reports if you have a vIOS installed
|
||||
* Added support for the latest System Menu on vWii
|
||||
|
||||
Version 2.3.0 HacksDen Edition
|
||||
* Added a new argument --skipIOS, which lets you skip any specific IOS in the scan. This is useful for freezes. Multiple arguments are supported.
|
||||
* Added translations for "Homebrew Channel is not installed" message
|
||||
* Added support for GC\Classic controllers, and multiple remotes
|
||||
* Added detection for DM\DML 2.11
|
||||
* Fixed BC_NAND and BC_WFS showing up as patched
|
||||
* Fixed a translation for "Unknown"
|
||||
* Fixed the report from spilling an extra line past the frame
|
||||
* Improved timing between messages
|
||||
* Improved "Sorting Titles" speed
|
||||
* Other minor changes
|
||||
|
||||
Version 2.2.1 HacksDen Edition
|
||||
* Fixed the pesky bug that sometimes caused the slot number of a vWii cIOS to be way off. Thanks to asper for lots of testing.
|
||||
|
||||
Version 2.2.0 HacksDen Edition
|
||||
* Added support for the new vWii System Menu's.
|
||||
* Fixed the ridiculous bug (possibly intentional?) where the System Menu region is defined by setting.txt, not by what's installed.
|
||||
* Added an additional method of checking the System Menu version. The current way works fine, but it doesn't hurt to have some backup methods.
|
||||
* App now exits properly on error, and memory is cleaned up.
|
||||
* Added support for DM/DML 2.7-2.10.
|
||||
* Added libruntimeiospatch v1.6.1.
|
||||
* Rewrote logfile code so it logs directly to the file (no overflows).
|
||||
* Fixed bug where a bunch of blank lines are shown on the report when you press Right close to the end of the file.
|
||||
* Added a .5 second delay after displaying report to decrease the chance of accidental uploads.
|
||||
* Added a .2 second delay between the init messages.
|
||||
* Added check for console type (Wii or Wii U).
|
||||
* Translations added for "Shop Channel Code".
|
||||
* A fair amount of optimization and cleanup.
|
||||
|
||||
Version 2.1.0 HacksDen Edition
|
||||
* Fixed HBC 1.1.x detection for languages other than English
|
||||
* Fixed HBF detection for languages other than English, and removed German message if it doesn't exist
|
||||
* Fixed compile warnings
|
||||
* Added support for proper display in Windows Notepad
|
||||
* Fixed format of meta.xml file
|
||||
* Updated libCheckRegion so that it supports new Wii and vWii regions
|
||||
* Fixed Region report for the vWii
|
||||
* Added check for Shop Channel Country
|
||||
* Improved code readability
|
||||
* Support for custom 4.1 System Menu versions (544xx)
|
||||
* Changed the background and icon
|
||||
* Changed the English date format to MM/DD/YYYY because that's how it's used in conversation
|
||||
* Other minor changes
|
||||
|
||||
See SysCheck at Wiibrew.com for changes in other versions.</long_description>
|
||||
<arguments>
|
||||
<arg>--debug=false</arg>
|
||||
<arg>--forceNoAHBPROT=false</arg>
|
||||
<arg>--skipIOS=0</arg>
|
||||
</arguments>
|
||||
|
||||
<no_ios_reload/>
|
||||
</app>
|
BIN
SysCheckME/icon.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
29
SysCheckME/meta.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<app version="1">
|
||||
<name>SysCheck ModMii Edition</name>
|
||||
<coder>blackb0x, JoostinOnline, Double_A, R2-D2199, Nano</coder>
|
||||
<version>2.5.0</version>
|
||||
<release_date>20230309000000</release_date>
|
||||
<short_description>System Checker ModMii Edition</short_description>
|
||||
<long_description>Homebrew application which does several checks on installed IOS and custom IOS:
|
||||
- Base IOS Detection
|
||||
- vIOS Detection
|
||||
- Beer Ticket
|
||||
- IOS Stub
|
||||
- Fake Signature (aka Trucha Bug)
|
||||
- ES_DiVerify (aka ES_Identify)
|
||||
- Flash Access
|
||||
- NAND Access
|
||||
- Boot2 Access
|
||||
- USB 2.0
|
||||
|
||||
SysCheck generates a report on the root of your storage device (e.g. usb:/SysCheck.csv).
|
||||
|
||||
The author can not be held responsible for any damage SysCheck might cause!</long_description>
|
||||
<arguments>
|
||||
<arg>--debug=false</arg>
|
||||
<arg>--forceNoAHBPROT=false</arg>
|
||||
<arg>--skipIOS=0</arg>
|
||||
</arguments>
|
||||
<no_ios_reload/>
|
||||
</app>
|
@ -1 +1 @@
|
||||
Version=51
|
||||
Version=52
|
@ -1,10 +0,0 @@
|
||||
--- conf_original.c 2012-04-13 06:07:24 -0500
|
||||
+++ conf_fix.c 2013-08-20 20:50:14 -0500
|
||||
@@ -101,6 +101,7 @@
|
||||
if(delim && ((delim - line) == nlen) && !memcmp(name, line, nlen)) {
|
||||
delim++;
|
||||
end = strchr(line, '\r');
|
||||
+ if (!end) end = strchr(line, '\n');
|
||||
if(end) {
|
||||
slen = end - delim;
|
||||
if(slen < length) {
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 195 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
data/window.png
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.5 KiB |
@ -1,85 +1,87 @@
|
||||
#ifndef _LANGUAGES_H_
|
||||
#define _LANGUAGES_H_
|
||||
|
||||
const char* TXT_AppVersion;
|
||||
const char* MSG_GetConsoleRegion;
|
||||
const char* MSG_GetSysMenuVer;
|
||||
const char* MSG_GetHBCVer;
|
||||
const char* MSG_GetRunningIOS;
|
||||
const char* MSG_GetConsoleID;
|
||||
const char* MSG_GetBoot2;
|
||||
const char* MSG_Update;
|
||||
const char* MSG_NoUpdate;
|
||||
const char* MSG_UpdateSuccess;
|
||||
const char* MSG_UpdateFail;
|
||||
const char* TXT_Region;
|
||||
const char* TXT_Unknown;
|
||||
const char* MSG_GetNrOfTitles;
|
||||
const char* ERR_GetNrOfTitles;
|
||||
const char* MSG_GetTitleList;
|
||||
const char* ERR_GetTitleList;
|
||||
const char* ERR_GetIosTMDSize;
|
||||
const char* ERR_GetIosTMD;
|
||||
const char* MSG_MountSD;
|
||||
const char* MSG_UnmountSD;
|
||||
const char* MSG_InitFAT;
|
||||
const char* ERR_InitFAT;
|
||||
const char* MSG_SortTitles;
|
||||
const char* MSG_GetCertificates;
|
||||
const char* ERR_GetCertificates;
|
||||
const char* TXT_SysMenu;
|
||||
const char* TXT_SysMenu2;
|
||||
const char* TXT_SysMenu3;
|
||||
const char* TXT_HBF;
|
||||
const char* TXT_NO_HBC;
|
||||
const char* TXT_HBC;
|
||||
const char* TXT_HBC_NEW;
|
||||
const char* TXT_HBC_112;
|
||||
const char* TXT_HBC_STUB;
|
||||
const char* TXT_Hollywood;
|
||||
const char* TXT_ConsoleID;
|
||||
const char* TXT_ConsoleType;
|
||||
const char* TXT_ShopCountry;
|
||||
const char* TXT_vBoot2;
|
||||
const char* TXT_NrOfTitles;
|
||||
const char* TXT_NrOfIOS;
|
||||
const char* TXT_AppTitle;
|
||||
const char* TXT_AppIOS;
|
||||
const char* ERR_AllocateMemory;
|
||||
const char* ERR_OpenFile;
|
||||
const char* MSG_SelectIOS;
|
||||
const char* MSG_All;
|
||||
const char* MSG_TestingIOS;
|
||||
const char* MSG_ReloadIOS;
|
||||
const char* MSG_GenerateReport;
|
||||
const char* MSG_ReportSuccess;
|
||||
const char* MSG_ReportError;
|
||||
const char* TXT_Stub;
|
||||
const char* TXT_Trucha;
|
||||
const char* TXT_ES;
|
||||
const char* TXT_Flash;
|
||||
const char* TXT_NAND;
|
||||
const char* TXT_Boot2;
|
||||
const char* TXT_USB;
|
||||
const char* TXT_BeerTicket;
|
||||
const char* TXT_NoPatch;
|
||||
const char* TXT_Priiloader;
|
||||
const char* TXT_PreFiix;
|
||||
const char* BUT_HBC;
|
||||
const char* BUT_Shutoff;
|
||||
const char* BUT_SysMenu;
|
||||
const char* BUT_Update;
|
||||
const char* TXT_VersionP;
|
||||
const char* TXT_DVD;
|
||||
const char* TXT_NoDVD;
|
||||
const char* BUT_ConfirmUpload;
|
||||
const char* TXT_Upload;
|
||||
const char* BUT_OK;
|
||||
const char* TXT_OriginalRegion;
|
||||
const char* TXT_IOSSkipped;
|
||||
char TXT_ReportDate[100];
|
||||
char MSG_Buffer[1024];
|
||||
char MSG_Buffer2[1024];
|
||||
extern const char* TXT_AppVersion;
|
||||
extern const char* MSG_GetConsoleRegion;
|
||||
extern const char* MSG_GetSysMenuVer;
|
||||
extern const char* MSG_GetHBCVer;
|
||||
extern const char* MSG_GetRunningIOS;
|
||||
extern const char* MSG_GetConsoleID;
|
||||
extern const char* MSG_GetBoot2;
|
||||
extern const char* MSG_Update;
|
||||
extern const char* MSG_NoUpdate;
|
||||
extern const char* MSG_UpdateSuccess;
|
||||
extern const char* MSG_UpdateFail;
|
||||
extern const char* TXT_Region;
|
||||
extern const char* TXT_Unknown;
|
||||
extern const char* MSG_GetNrOfTitles;
|
||||
extern const char* ERR_GetNrOfTitles;
|
||||
extern const char* MSG_GetTitleList;
|
||||
extern const char* ERR_GetTitleList;
|
||||
extern const char* ERR_GetIosTMDSize;
|
||||
extern const char* ERR_GetIosTMD;
|
||||
extern const char* MSG_MountSD;
|
||||
extern const char* MSG_UnmountSD;
|
||||
extern const char* MSG_MountUSB;
|
||||
extern const char* MSG_UnmountUSB;
|
||||
extern const char* MSG_InitFAT;
|
||||
extern const char* ERR_InitFAT;
|
||||
extern const char* MSG_SortTitles;
|
||||
extern const char* MSG_GetCertificates;
|
||||
extern const char* ERR_GetCertificates;
|
||||
extern const char* TXT_SysMenu;
|
||||
extern const char* TXT_SysMenu2;
|
||||
extern const char* TXT_SysMenu3;
|
||||
extern const char* TXT_HBF;
|
||||
extern const char* TXT_NO_HBC;
|
||||
extern const char* TXT_HBC;
|
||||
extern const char* TXT_HBC_NEW;
|
||||
extern const char* TXT_HBC_112;
|
||||
extern const char* TXT_HBC_STUB;
|
||||
extern const char* TXT_Hollywood;
|
||||
extern const char* TXT_ConsoleID;
|
||||
extern const char* TXT_ConsoleType;
|
||||
extern const char* TXT_ShopCountry;
|
||||
extern const char* TXT_vBoot2;
|
||||
extern const char* TXT_NrOfTitles;
|
||||
extern const char* TXT_NrOfIOS;
|
||||
extern const char* TXT_AppTitle;
|
||||
extern const char* TXT_AppIOS;
|
||||
extern const char* ERR_AllocateMemory;
|
||||
extern const char* ERR_OpenFile;
|
||||
extern const char* MSG_SelectIOS;
|
||||
extern const char* MSG_All;
|
||||
extern const char* MSG_TestingIOS;
|
||||
extern const char* MSG_ReloadIOS;
|
||||
extern const char* MSG_GenerateReport;
|
||||
extern const char* MSG_ReportSuccess;
|
||||
extern const char* MSG_ReportError;
|
||||
extern const char* TXT_Stub;
|
||||
extern const char* TXT_Trucha;
|
||||
extern const char* TXT_ES;
|
||||
extern const char* TXT_Flash;
|
||||
extern const char* TXT_NAND;
|
||||
extern const char* TXT_Boot2;
|
||||
extern const char* TXT_USB;
|
||||
extern const char* TXT_BeerTicket;
|
||||
extern const char* TXT_NoPatch;
|
||||
extern const char* TXT_Priiloader;
|
||||
extern const char* TXT_PreFiix;
|
||||
extern const char* BUT_HBC;
|
||||
extern const char* BUT_Shutoff;
|
||||
extern const char* BUT_SysMenu;
|
||||
extern const char* BUT_Update;
|
||||
extern const char* TXT_VersionP;
|
||||
extern const char* TXT_DVD;
|
||||
extern const char* TXT_NoDVD;
|
||||
extern const char* BUT_ConfirmUpload;
|
||||
extern const char* TXT_Upload;
|
||||
extern const char* BUT_OK;
|
||||
extern const char* TXT_OriginalRegion;
|
||||
extern const char* TXT_IOSSkipped;
|
||||
extern char TXT_ReportDate[];
|
||||
extern char MSG_Buffer[];
|
||||
extern char MSG_Buffer2[];
|
||||
|
||||
int initLanguages(struct tm today);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __SYS_H__
|
||||
#define __SYS_H__
|
||||
|
||||
#include <ogc\lwp_watchdog.h>
|
||||
#include <ogc/lwp_watchdog.h>
|
||||
#include "tools.h"
|
||||
|
||||
#define AHB_ACCESS (*(vu32*)0xcd800064 == 0xFFFFFFFF)
|
||||
@ -107,7 +107,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
bool hasInfo;
|
||||
u32 realRevision;
|
||||
char info[0x10];
|
||||
char info[0x20];
|
||||
} sysMenu_t;
|
||||
|
||||
typedef struct _U8Header
|
||||
|
@ -30,6 +30,7 @@ void logfile(const char *format, ...);
|
||||
void *allocate_memory(u32 size);
|
||||
int NandStartup(void);
|
||||
void NandShutdown(void);
|
||||
void Wpad_Disconnect(void);
|
||||
u32 DetectInput(u8 DownOrHeld);
|
||||
void sort(u64 *titles, u32 cnt);
|
||||
void formatDate(u32 date, char ReportBuffer[200][100]);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
/* Constants */
|
||||
//#define REVISION 0 // For testing updateApp function
|
||||
#define REVISION 51
|
||||
#define REVISION 52
|
||||
|
||||
s32 updateApp(void);
|
||||
|
||||
|
282
libs/include/bzlib.h
Normal file
@ -0,0 +1,282 @@
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Public header file for the library. ---*/
|
||||
/*--- bzlib.h ---*/
|
||||
/*-------------------------------------------------------------*/
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
This file is part of bzip2/libbzip2, a program and library for
|
||||
lossless, block-sorting data compression.
|
||||
|
||||
bzip2/libbzip2 version 1.0.6 of 6 September 2010
|
||||
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
|
||||
|
||||
Please read the WARNING, DISCLAIMER and PATENTS sections in the
|
||||
README file.
|
||||
|
||||
This program is released under the terms of the license contained
|
||||
in the file LICENSE.
|
||||
------------------------------------------------------------------ */
|
||||
|
||||
|
||||
#ifndef _BZLIB_H
|
||||
#define _BZLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BZ_RUN 0
|
||||
#define BZ_FLUSH 1
|
||||
#define BZ_FINISH 2
|
||||
|
||||
#define BZ_OK 0
|
||||
#define BZ_RUN_OK 1
|
||||
#define BZ_FLUSH_OK 2
|
||||
#define BZ_FINISH_OK 3
|
||||
#define BZ_STREAM_END 4
|
||||
#define BZ_SEQUENCE_ERROR (-1)
|
||||
#define BZ_PARAM_ERROR (-2)
|
||||
#define BZ_MEM_ERROR (-3)
|
||||
#define BZ_DATA_ERROR (-4)
|
||||
#define BZ_DATA_ERROR_MAGIC (-5)
|
||||
#define BZ_IO_ERROR (-6)
|
||||
#define BZ_UNEXPECTED_EOF (-7)
|
||||
#define BZ_OUTBUFF_FULL (-8)
|
||||
#define BZ_CONFIG_ERROR (-9)
|
||||
|
||||
typedef
|
||||
struct {
|
||||
char *next_in;
|
||||
unsigned int avail_in;
|
||||
unsigned int total_in_lo32;
|
||||
unsigned int total_in_hi32;
|
||||
|
||||
char *next_out;
|
||||
unsigned int avail_out;
|
||||
unsigned int total_out_lo32;
|
||||
unsigned int total_out_hi32;
|
||||
|
||||
void *state;
|
||||
|
||||
void *(*bzalloc)(void *,int,int);
|
||||
void (*bzfree)(void *,void *);
|
||||
void *opaque;
|
||||
}
|
||||
bz_stream;
|
||||
|
||||
|
||||
#ifndef BZ_IMPORT
|
||||
#define BZ_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef BZ_NO_STDIO
|
||||
/* Need a definitition for FILE */
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
# ifdef small
|
||||
/* windows.h define small to char */
|
||||
# undef small
|
||||
# endif
|
||||
# ifdef BZ_EXPORT
|
||||
# define BZ_API(func) WINAPI func
|
||||
# define BZ_EXTERN extern
|
||||
# else
|
||||
/* import windows dll dynamically */
|
||||
# define BZ_API(func) (WINAPI * func)
|
||||
# define BZ_EXTERN
|
||||
# endif
|
||||
#else
|
||||
# define BZ_API(func) func
|
||||
# define BZ_EXTERN extern
|
||||
#endif
|
||||
|
||||
|
||||
/*-- Core (low-level) library functions --*/
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
|
||||
bz_stream* strm,
|
||||
int blockSize100k,
|
||||
int verbosity,
|
||||
int workFactor
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzCompress) (
|
||||
bz_stream* strm,
|
||||
int action
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
|
||||
bz_stream* strm
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
|
||||
bz_stream *strm,
|
||||
int verbosity,
|
||||
int small
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
|
||||
bz_stream* strm
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
|
||||
bz_stream *strm
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*-- High(er) level library functions --*/
|
||||
|
||||
#ifndef BZ_NO_STDIO
|
||||
#define BZ_MAX_UNUSED 5000
|
||||
|
||||
typedef void BZFILE;
|
||||
|
||||
BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
|
||||
int* bzerror,
|
||||
FILE* f,
|
||||
int verbosity,
|
||||
int small,
|
||||
void* unused,
|
||||
int nUnused
|
||||
);
|
||||
|
||||
BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
|
||||
int* bzerror,
|
||||
BZFILE* b
|
||||
);
|
||||
|
||||
BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
|
||||
int* bzerror,
|
||||
BZFILE* b,
|
||||
void** unused,
|
||||
int* nUnused
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzRead) (
|
||||
int* bzerror,
|
||||
BZFILE* b,
|
||||
void* buf,
|
||||
int len
|
||||
);
|
||||
|
||||
BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
|
||||
int* bzerror,
|
||||
FILE* f,
|
||||
int blockSize100k,
|
||||
int verbosity,
|
||||
int workFactor
|
||||
);
|
||||
|
||||
BZ_EXTERN void BZ_API(BZ2_bzWrite) (
|
||||
int* bzerror,
|
||||
BZFILE* b,
|
||||
void* buf,
|
||||
int len
|
||||
);
|
||||
|
||||
BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
|
||||
int* bzerror,
|
||||
BZFILE* b,
|
||||
int abandon,
|
||||
unsigned int* nbytes_in,
|
||||
unsigned int* nbytes_out
|
||||
);
|
||||
|
||||
BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
|
||||
int* bzerror,
|
||||
BZFILE* b,
|
||||
int abandon,
|
||||
unsigned int* nbytes_in_lo32,
|
||||
unsigned int* nbytes_in_hi32,
|
||||
unsigned int* nbytes_out_lo32,
|
||||
unsigned int* nbytes_out_hi32
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
/*-- Utility functions --*/
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
|
||||
char* dest,
|
||||
unsigned int* destLen,
|
||||
char* source,
|
||||
unsigned int sourceLen,
|
||||
int blockSize100k,
|
||||
int verbosity,
|
||||
int workFactor
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
|
||||
char* dest,
|
||||
unsigned int* destLen,
|
||||
char* source,
|
||||
unsigned int sourceLen,
|
||||
int small,
|
||||
int verbosity
|
||||
);
|
||||
|
||||
|
||||
/*--
|
||||
Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
|
||||
to support better zlib compatibility.
|
||||
This code is not _officially_ part of libbzip2 (yet);
|
||||
I haven't tested it, documented it, or considered the
|
||||
threading-safeness of it.
|
||||
If this code breaks, please contact both Yoshioka and me.
|
||||
--*/
|
||||
|
||||
BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
|
||||
void
|
||||
);
|
||||
|
||||
#ifndef BZ_NO_STDIO
|
||||
BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
|
||||
const char *path,
|
||||
const char *mode
|
||||
);
|
||||
|
||||
BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
|
||||
int fd,
|
||||
const char *mode
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzread) (
|
||||
BZFILE* b,
|
||||
void* buf,
|
||||
int len
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzwrite) (
|
||||
BZFILE* b,
|
||||
void* buf,
|
||||
int len
|
||||
);
|
||||
|
||||
BZ_EXTERN int BZ_API(BZ2_bzflush) (
|
||||
BZFILE* b
|
||||
);
|
||||
|
||||
BZ_EXTERN void BZ_API(BZ2_bzclose) (
|
||||
BZFILE* b
|
||||
);
|
||||
|
||||
BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
|
||||
BZFILE *b,
|
||||
int *errnum
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- end bzlib.h ---*/
|
||||
/*-------------------------------------------------------------*/
|
@ -1,349 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
@ -1,150 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
@ -1,251 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftlcdfil.h */
|
||||
/* */
|
||||
/* FreeType API for color filtering of subpixel bitmap glyphs */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 2006, 2007, 2008, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FT_LCD_FILTER_H__
|
||||
#define __FT_LCD_FILTER_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:
|
||||
* lcd_filtering
|
||||
*
|
||||
* @title:
|
||||
* LCD Filtering
|
||||
*
|
||||
* @abstract:
|
||||
* Reduce color fringes of LCD-optimized bitmaps.
|
||||
*
|
||||
* @description:
|
||||
* The @FT_Library_SetLcdFilter API can be used to specify a low-pass
|
||||
* filter which is then applied to LCD-optimized bitmaps generated
|
||||
* through @FT_Render_Glyph. This is useful to reduce color fringes
|
||||
* which would occur with unfiltered rendering.
|
||||
*
|
||||
* Note that no filter is active by default, and that this function is
|
||||
* *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.
|
||||
*/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_LcdFilter
|
||||
*
|
||||
* @description:
|
||||
* A list of values to identify various types of LCD filters.
|
||||
*
|
||||
* @values:
|
||||
* FT_LCD_FILTER_NONE ::
|
||||
* Do not perform filtering. When used with subpixel rendering, this
|
||||
* results in sometimes severe color fringes.
|
||||
*
|
||||
* FT_LCD_FILTER_DEFAULT ::
|
||||
* The default filter reduces color fringes considerably, at the cost
|
||||
* of a slight blurriness in the output.
|
||||
*
|
||||
* FT_LCD_FILTER_LIGHT ::
|
||||
* The light filter is a variant that produces less blurriness at the
|
||||
* cost of slightly more color fringes than the default one. It might
|
||||
* be better, depending on taste, your monitor, or your personal vision.
|
||||
*
|
||||
* FT_LCD_FILTER_LEGACY ::
|
||||
* This filter corresponds to the original libXft color filter. It
|
||||
* provides high contrast output but can exhibit really bad color
|
||||
* fringes if glyphs are not extremely well hinted to the pixel grid.
|
||||
* In other words, it only works well if the TrueType bytecode
|
||||
* interpreter is enabled *and* high-quality hinted fonts are used.
|
||||
*
|
||||
* This filter is only provided for comparison purposes, and might be
|
||||
* disabled or stay unsupported in the future.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.0
|
||||
*/
|
||||
typedef enum FT_LcdFilter_
|
||||
{
|
||||
FT_LCD_FILTER_NONE = 0,
|
||||
FT_LCD_FILTER_DEFAULT = 1,
|
||||
FT_LCD_FILTER_LIGHT = 2,
|
||||
FT_LCD_FILTER_LEGACY = 16,
|
||||
|
||||
FT_LCD_FILTER_MAX /* do not remove */
|
||||
|
||||
} FT_LcdFilter;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* FT_Library_SetLcdFilter
|
||||
*
|
||||
* @description:
|
||||
* This function is used to apply color filtering to LCD decimated
|
||||
* bitmaps, like the ones used when calling @FT_Render_Glyph with
|
||||
* @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the target library instance.
|
||||
*
|
||||
* filter ::
|
||||
* The filter type.
|
||||
*
|
||||
* You can use @FT_LCD_FILTER_NONE here to disable this feature, or
|
||||
* @FT_LCD_FILTER_DEFAULT to use a default filter that should work
|
||||
* well on most LCD screens.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* This feature is always disabled by default. Clients must make an
|
||||
* explicit call to this function with a `filter' value other than
|
||||
* @FT_LCD_FILTER_NONE in order to enable it.
|
||||
*
|
||||
* Due to *PATENTS* covering subpixel rendering, this function doesn't
|
||||
* do anything except returning `FT_Err_Unimplemented_Feature' if the
|
||||
* configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
|
||||
* defined in your build of the library, which should correspond to all
|
||||
* default builds of FreeType.
|
||||
*
|
||||
* The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
|
||||
* @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.
|
||||
*
|
||||
* It does _not_ affect the output of @FT_Outline_Render and
|
||||
* @FT_Outline_Get_Bitmap.
|
||||
*
|
||||
* If this feature is activated, the dimensions of LCD glyph bitmaps are
|
||||
* either larger or taller than the dimensions of the corresponding
|
||||
* outline with regards to the pixel grid. For example, for
|
||||
* @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and
|
||||
* up to 3~pixels to the right.
|
||||
*
|
||||
* The bitmap offset values are adjusted correctly, so clients shouldn't
|
||||
* need to modify their layout and glyph positioning code when enabling
|
||||
* the filter.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.0
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Library_SetLcdFilter( FT_Library library,
|
||||
FT_LcdFilter filter );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* FT_Library_SetLcdFilterWeights
|
||||
*
|
||||
* @description:
|
||||
* Use this function to override the filter weights selected by
|
||||
* @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
|
||||
* (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
|
||||
* 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
|
||||
* FT_LCD_FILTER_LEGACY.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the target library instance.
|
||||
*
|
||||
* weights ::
|
||||
* A pointer to an array; the function copies the first five bytes and
|
||||
* uses them to specify the filter weights.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* Due to *PATENTS* covering subpixel rendering, this function doesn't
|
||||
* do anything except returning `FT_Err_Unimplemented_Feature' if the
|
||||
* configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
|
||||
* defined in your build of the library, which should correspond to all
|
||||
* default builds of FreeType.
|
||||
*
|
||||
* This function must be called after @FT_Library_SetLcdFilter to have
|
||||
* any effect.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.0
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Library_SetLcdFilterWeights( FT_Library library,
|
||||
unsigned char *weights );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FT_LCD_FILTER_H__ */
|
||||
|
||||
|
||||
/* END */
|
@ -1,378 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftmm.h */
|
||||
/* */
|
||||
/* FreeType Multiple Master font interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2004, 2006, 2009 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 __FTMM_H__
|
||||
#define __FTMM_H__
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_TYPE1_TABLES_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* multiple_masters */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Multiple Masters */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* How to manage Multiple Masters fonts. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The following types and functions are used to manage Multiple */
|
||||
/* Master fonts, i.e., the selection of specific design instances by */
|
||||
/* setting design axis coordinates. */
|
||||
/* */
|
||||
/* George Williams has extended this interface to make it work with */
|
||||
/* both Type~1 Multiple Masters fonts and GX distortable (var) */
|
||||
/* fonts. Some of these routines only work with MM fonts, others */
|
||||
/* will work with both types. They are similar enough that a */
|
||||
/* consistent interface makes sense. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_MM_Axis */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to model a given axis in design space for */
|
||||
/* Multiple Masters fonts. */
|
||||
/* */
|
||||
/* This structure can't be used for GX var fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* name :: The axis's name. */
|
||||
/* */
|
||||
/* minimum :: The axis's minimum design coordinate. */
|
||||
/* */
|
||||
/* maximum :: The axis's maximum design coordinate. */
|
||||
/* */
|
||||
typedef struct FT_MM_Axis_
|
||||
{
|
||||
FT_String* name;
|
||||
FT_Long minimum;
|
||||
FT_Long maximum;
|
||||
|
||||
} FT_MM_Axis;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Multi_Master */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model the axes and space of a Multiple Masters */
|
||||
/* font. */
|
||||
/* */
|
||||
/* This structure can't be used for GX var fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* num_axis :: Number of axes. Cannot exceed~4. */
|
||||
/* */
|
||||
/* num_designs :: Number of designs; should be normally 2^num_axis */
|
||||
/* even though the Type~1 specification strangely */
|
||||
/* allows for intermediate designs to be present. This */
|
||||
/* number cannot exceed~16. */
|
||||
/* */
|
||||
/* axis :: A table of axis descriptors. */
|
||||
/* */
|
||||
typedef struct FT_Multi_Master_
|
||||
{
|
||||
FT_UInt num_axis;
|
||||
FT_UInt num_designs;
|
||||
FT_MM_Axis axis[T1_MAX_MM_AXIS];
|
||||
|
||||
} FT_Multi_Master;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Var_Axis */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to model a given axis in design space for */
|
||||
/* Multiple Masters and GX var fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* name :: The axis's name. */
|
||||
/* Not always meaningful for GX. */
|
||||
/* */
|
||||
/* minimum :: The axis's minimum design coordinate. */
|
||||
/* */
|
||||
/* def :: The axis's default design coordinate. */
|
||||
/* FreeType computes meaningful default values for MM; it */
|
||||
/* is then an integer value, not in 16.16 format. */
|
||||
/* */
|
||||
/* maximum :: The axis's maximum design coordinate. */
|
||||
/* */
|
||||
/* tag :: The axis's tag (the GX equivalent to `name'). */
|
||||
/* FreeType provides default values for MM if possible. */
|
||||
/* */
|
||||
/* strid :: The entry in `name' table (another GX version of */
|
||||
/* `name'). */
|
||||
/* Not meaningful for MM. */
|
||||
/* */
|
||||
typedef struct FT_Var_Axis_
|
||||
{
|
||||
FT_String* name;
|
||||
|
||||
FT_Fixed minimum;
|
||||
FT_Fixed def;
|
||||
FT_Fixed maximum;
|
||||
|
||||
FT_ULong tag;
|
||||
FT_UInt strid;
|
||||
|
||||
} FT_Var_Axis;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Var_Named_Style */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to model a named style in a GX var font. */
|
||||
/* */
|
||||
/* This structure can't be used for MM fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* coords :: The design coordinates for this style. */
|
||||
/* This is an array with one entry for each axis. */
|
||||
/* */
|
||||
/* strid :: The entry in `name' table identifying this style. */
|
||||
/* */
|
||||
typedef struct FT_Var_Named_Style_
|
||||
{
|
||||
FT_Fixed* coords;
|
||||
FT_UInt strid;
|
||||
|
||||
} FT_Var_Named_Style;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_MM_Var */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model the axes and space of a Multiple Masters */
|
||||
/* or GX var distortable font. */
|
||||
/* */
|
||||
/* Some fields are specific to one format and not to the other. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* num_axis :: The number of axes. The maximum value is~4 for */
|
||||
/* MM; no limit in GX. */
|
||||
/* */
|
||||
/* num_designs :: The number of designs; should be normally */
|
||||
/* 2^num_axis for MM fonts. Not meaningful for GX */
|
||||
/* (where every glyph could have a different */
|
||||
/* number of designs). */
|
||||
/* */
|
||||
/* num_namedstyles :: The number of named styles; only meaningful for */
|
||||
/* GX which allows certain design coordinates to */
|
||||
/* have a string ID (in the `name' table) */
|
||||
/* associated with them. The font can tell the */
|
||||
/* user that, for example, Weight=1.5 is `Bold'. */
|
||||
/* */
|
||||
/* axis :: A table of axis descriptors. */
|
||||
/* GX fonts contain slightly more data than MM. */
|
||||
/* */
|
||||
/* namedstyles :: A table of named styles. */
|
||||
/* Only meaningful with GX. */
|
||||
/* */
|
||||
typedef struct FT_MM_Var_
|
||||
{
|
||||
FT_UInt num_axis;
|
||||
FT_UInt num_designs;
|
||||
FT_UInt num_namedstyles;
|
||||
FT_Var_Axis* axis;
|
||||
FT_Var_Named_Style* namedstyle;
|
||||
|
||||
} FT_MM_Var;
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Multi_Master */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve the Multiple Master descriptor of a given font. */
|
||||
/* */
|
||||
/* This function can't be used with GX fonts. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* amaster :: The Multiple Masters descriptor. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Multi_Master( FT_Face face,
|
||||
FT_Multi_Master *amaster );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_MM_Var */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve the Multiple Master/GX var descriptor of a given font. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* amaster :: The Multiple Masters/GX var descriptor. */
|
||||
/* Allocates a data structure, which the user must free */
|
||||
/* (a single call to FT_FREE will do it). */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_MM_Var( FT_Face face,
|
||||
FT_MM_Var* *amaster );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_MM_Design_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* For Multiple Masters fonts, choose an interpolated font design */
|
||||
/* through design coordinates. */
|
||||
/* */
|
||||
/* This function can't be used with GX fonts. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* num_coords :: The number of design coordinates (must be equal to */
|
||||
/* the number of axes in the font). */
|
||||
/* */
|
||||
/* coords :: An array of design coordinates. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_MM_Design_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Long* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Var_Design_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* For Multiple Master or GX Var fonts, choose an interpolated font */
|
||||
/* design through design coordinates. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* num_coords :: The number of design coordinates (must be equal to */
|
||||
/* the number of axes in the font). */
|
||||
/* */
|
||||
/* coords :: An array of design coordinates. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Var_Design_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_MM_Blend_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* For Multiple Masters and GX var fonts, choose an interpolated font */
|
||||
/* design through normalized blend coordinates. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* num_coords :: The number of design coordinates (must be equal to */
|
||||
/* the number of axes in the font). */
|
||||
/* */
|
||||
/* coords :: The design coordinates array (each element must be */
|
||||
/* between 0 and 1.0). */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_MM_Blend_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Var_Blend_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This is another name of @FT_Set_MM_Blend_Coordinates. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Var_Blend_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTMM_H__ */
|
||||
|
||||
|
||||
/* END */
|
@ -1,59 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ttunpat.h */
|
||||
/* */
|
||||
/* Definitions for the unpatented TrueType hinting system */
|
||||
/* */
|
||||
/* Copyright 2003, 2006 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* Written by Graham Asher <graham.asher@btinternet.com> */
|
||||
/* */
|
||||
/* 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 __TTUNPAT_H__
|
||||
#define __TTUNPAT_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
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_UNPATENTED_HINTING
|
||||
*
|
||||
* @description:
|
||||
* A constant used as the tag of an @FT_Parameter structure to indicate
|
||||
* that unpatented methods only should be used by the TrueType bytecode
|
||||
* interpreter for a typeface opened by @FT_Open_Face.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __TTUNPAT_H__ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
/* */
|
||||
/* UNIX-specific configuration file (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2004, 2006-2009, 2011, 2013 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -28,15 +28,15 @@
|
||||
/* Note however that if some specific modifications are needed, we */
|
||||
/* advise you to place a modified copy in your build directory. */
|
||||
/* */
|
||||
/* The build directory is usually `freetype/builds/<system>', and */
|
||||
/* contains system-specific files that are always included first when */
|
||||
/* building the library. */
|
||||
/* The build directory is usually `builds/<system>', and contains */
|
||||
/* system-specific files that are always included first when building */
|
||||
/* the library. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTCONFIG_H__
|
||||
#define __FTCONFIG_H__
|
||||
#ifndef FTCONFIG_H_
|
||||
#define FTCONFIG_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_OPTIONS_H
|
||||
@ -53,7 +53,7 @@ FT_BEGIN_HEADER
|
||||
/* These macros can be toggled to suit a specific system. The current */
|
||||
/* ones are defaults used to compile FreeType in an ANSI C environment */
|
||||
/* (16bit compilers are also supported). Copy this file to your own */
|
||||
/* `freetype/builds/<system>' directory, and edit it to port the engine. */
|
||||
/* `builds/<system>' directory, and edit it to port the engine. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -90,7 +90,7 @@ FT_BEGIN_HEADER
|
||||
/* is copied from default include/freetype/config/ftconfig.h. */
|
||||
/* If any improvement is required for this file, it should be */
|
||||
/* applied to the original header file for the builders that */
|
||||
/* does not use configure script. */
|
||||
/* do not use configure script. */
|
||||
|
||||
/* The size of an `int' type. */
|
||||
#if FT_UINT_MAX == 0xFFFFUL
|
||||
@ -243,6 +243,18 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
typedef signed XXX FT_Int64;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_UInt64 */
|
||||
/* */
|
||||
/* A typedef for a 64bit unsigned 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 unsigned XXX FT_UInt64;
|
||||
|
||||
/* */
|
||||
|
||||
#endif
|
||||
@ -276,19 +288,46 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
/* determine whether we have a 64-bit int type for platforms without */
|
||||
/* Autoconf */
|
||||
/* determine whether we have a 64-bit int type */
|
||||
/* (mostly for environments without `autoconf') */
|
||||
#if FT_SIZEOF_LONG == 8
|
||||
|
||||
/* FT_LONG64 must be defined if a 64-bit type is available */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long
|
||||
#define FT_UINT64 unsigned long
|
||||
|
||||
/* we handle the LLP64 scheme separately for GCC and clang, */
|
||||
/* suppressing the `long long' warning */
|
||||
#elif ( FT_SIZEOF_LONG == 4 ) && \
|
||||
defined( HAVE_LONG_LONG_INT ) && \
|
||||
defined( __GNUC__ )
|
||||
#pragma GCC diagnostic ignored "-Wlong-long"
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* A 64-bit data type may create compilation problems if you compile */
|
||||
/* in strict ANSI mode. To avoid them, we disable other 64-bit data */
|
||||
/* types if __STDC__ is defined. You can however ignore this rule */
|
||||
/* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
|
||||
/* */
|
||||
#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
|
||||
|
||||
#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
|
||||
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
|
||||
|
||||
/* this compiler provides the __int64 type */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 __int64
|
||||
#define FT_UINT64 unsigned __int64
|
||||
|
||||
#elif defined( __BORLANDC__ ) /* Borland C++ */
|
||||
|
||||
@ -298,6 +337,7 @@ FT_BEGIN_HEADER
|
||||
/* this compiler provides the __int64 type */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 __int64
|
||||
#define FT_UINT64 unsigned __int64
|
||||
|
||||
#elif defined( __WATCOMC__ ) /* Watcom C++ */
|
||||
|
||||
@ -307,41 +347,39 @@ FT_BEGIN_HEADER
|
||||
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
#elif defined( __GNUC__ )
|
||||
|
||||
/* GCC provides the `long long' type */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
#endif /* __STDC_VERSION__ >= 199901L */
|
||||
|
||||
#endif /* FT_SIZEOF_LONG == 8 */
|
||||
|
||||
#ifdef FT_LONG64
|
||||
typedef FT_INT64 FT_Int64;
|
||||
typedef FT_UINT64 FT_UInt64;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WIN64
|
||||
/* only 64bit Windows uses the LLP64 data model, i.e., */
|
||||
/* 32bit integers, 64bit pointers */
|
||||
#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
|
||||
#else
|
||||
#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* A 64-bit data type will create compilation problems if you compile */
|
||||
/* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */
|
||||
/* is defined. You can however ignore this rule by defining the */
|
||||
/* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
|
||||
/* miscellaneous */
|
||||
/* */
|
||||
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
|
||||
|
||||
#ifdef __STDC__
|
||||
|
||||
/* Undefine the 64-bit macros in strict ANSI compilation mode. */
|
||||
/* Since `#undef' doesn't survive in configuration header files */
|
||||
/* we use the postprocessing facility of AC_CONFIG_HEADERS to */
|
||||
/* replace the leading `/' with `#'. */
|
||||
#undef FT_LONG64
|
||||
#undef FT_INT64
|
||||
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
|
||||
|
||||
#ifdef FT_LONG64
|
||||
typedef FT_INT64 FT_Int64;
|
||||
#endif
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#define FT_BEGIN_STMNT do {
|
||||
@ -349,148 +387,25 @@ FT_BEGIN_HEADER
|
||||
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
|
||||
|
||||
|
||||
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
|
||||
/* Provide assembler fragments for performance-critical functions. */
|
||||
/* These must be defined `static __inline__' with GCC. */
|
||||
|
||||
#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline FT_Int32
|
||||
FT_MulFix_arm( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 t, t2;
|
||||
|
||||
|
||||
__asm
|
||||
{
|
||||
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
|
||||
mov a, t, asr #31 /* a = (hi >> 31) */
|
||||
add a, a, #0x8000 /* a += 0x8000 */
|
||||
adds t2, t2, a /* t2 += a */
|
||||
adc t, t, #0 /* t += carry */
|
||||
mov a, t2, lsr #16 /* a = t2 >> 16 */
|
||||
orr a, a, t, lsl #16 /* a |= t << 16 */
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
#endif /* __CC_ARM || __ARMCC__ */
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#if defined( __arm__ ) && !defined( __thumb__ ) && \
|
||||
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline__ FT_Int32
|
||||
FT_MulFix_arm( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 t, t2;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
|
||||
"mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
|
||||
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
|
||||
"adds %1, %1, %0\n\t" /* %1 += %0 */
|
||||
"adc %2, %2, #0\n\t" /* %2 += carry */
|
||||
"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)
|
||||
: "cc" );
|
||||
return a;
|
||||
}
|
||||
|
||||
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
|
||||
|
||||
#if defined( __i386__ )
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline__ FT_Int32
|
||||
FT_MulFix_i386( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 result;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"imul %%edx\n"
|
||||
"movl %%edx, %%ecx\n"
|
||||
"sarl $31, %%ecx\n"
|
||||
"addl $0x8000, %%ecx\n"
|
||||
"addl %%ecx, %%eax\n"
|
||||
"adcl $0, %%edx\n"
|
||||
"shrl $16, %%eax\n"
|
||||
"shll $16, %%edx\n"
|
||||
"addl %%edx, %%eax\n"
|
||||
: "=a"(result), "=d"(b)
|
||||
: "a"(a), "d"(b)
|
||||
: "%ecx", "cc" );
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif /* i386 */
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
#ifdef _MSC_VER /* Visual C++ */
|
||||
|
||||
#ifdef _M_IX86
|
||||
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline FT_Int32
|
||||
FT_MulFix_i386( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 result;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov eax, a
|
||||
mov edx, b
|
||||
imul edx
|
||||
mov ecx, edx
|
||||
sar ecx, 31
|
||||
add ecx, 8000h
|
||||
add eax, ecx
|
||||
adc edx, 0
|
||||
shr eax, 16
|
||||
shl edx, 16
|
||||
add eax, edx
|
||||
mov result, eax
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif /* _M_IX86 */
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
|
||||
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
|
||||
#ifdef FT_MULFIX_ASSEMBLER
|
||||
#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
|
||||
#endif
|
||||
/* typeof condition taken from gnulib's `intprops.h' header file */
|
||||
#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \
|
||||
( defined( __IBMC__ ) && __IBMC__ >= 1210 && \
|
||||
defined( __IBM__TYPEOF__ ) ) || \
|
||||
( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
|
||||
#define FT_TYPEOF( type ) ( __typeof__ ( type ) )
|
||||
#else
|
||||
#define FT_TYPEOF( type ) /* empty */
|
||||
#endif
|
||||
|
||||
|
||||
/* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */
|
||||
/* a function that gets used only within the scope of a module. */
|
||||
/* Normally, both the header and source code files for such a */
|
||||
/* function are within a single module directory. */
|
||||
/* */
|
||||
/* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */
|
||||
/* FT_LOCAL_ARRAY_DEF. */
|
||||
/* */
|
||||
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
|
||||
|
||||
#define FT_LOCAL( x ) static x
|
||||
@ -508,7 +423,16 @@ FT_BEGIN_HEADER
|
||||
|
||||
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
|
||||
|
||||
#define FT_LOCAL_ARRAY( x ) extern const x
|
||||
#define FT_LOCAL_ARRAY_DEF( x ) const x
|
||||
|
||||
|
||||
/* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */
|
||||
/* functions that are used in more than a single module. In the */
|
||||
/* current setup this implies that the declaration is in a header */
|
||||
/* file in the `include/freetype/internal' directory, and the */
|
||||
/* function body is in a file in `src/base'. */
|
||||
/* */
|
||||
#ifndef FT_BASE
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -531,14 +455,63 @@ FT_BEGIN_HEADER
|
||||
#endif /* !FT_BASE_DEF */
|
||||
|
||||
|
||||
/* When compiling FreeType as a DLL or DSO with hidden visibility */
|
||||
/* some systems/compilers need a special attribute in front OR after */
|
||||
/* the return type of function declarations. */
|
||||
/* */
|
||||
/* Two macros are used within the FreeType source code to define */
|
||||
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
|
||||
/* */
|
||||
/* FT_EXPORT( return_type ) */
|
||||
/* */
|
||||
/* is used in a function declaration, as in */
|
||||
/* */
|
||||
/* FT_EXPORT( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ); */
|
||||
/* */
|
||||
/* */
|
||||
/* FT_EXPORT_DEF( return_type ) */
|
||||
/* */
|
||||
/* is used in a function definition, as in */
|
||||
/* */
|
||||
/* FT_EXPORT_DEF( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ) */
|
||||
/* { */
|
||||
/* ... some code ... */
|
||||
/* return FT_Err_Ok; */
|
||||
/* } */
|
||||
/* */
|
||||
/* You can provide your own implementation of FT_EXPORT and */
|
||||
/* FT_EXPORT_DEF here if you want. */
|
||||
/* */
|
||||
/* To export a variable, use FT_EXPORT_VAR. */
|
||||
/* */
|
||||
#ifndef FT_EXPORT
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef FT2_BUILD_LIBRARY
|
||||
|
||||
#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
|
||||
#define FT_EXPORT( x ) __declspec( dllexport ) x
|
||||
#elif defined( __GNUC__ ) && __GNUC__ >= 4
|
||||
#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x
|
||||
#elif defined( __cplusplus )
|
||||
#define FT_EXPORT( x ) extern "C" x
|
||||
#else
|
||||
#define FT_EXPORT( x ) extern x
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined( FT2_DLLIMPORT )
|
||||
#define FT_EXPORT( x ) __declspec( dllimport ) x
|
||||
#elif defined( __cplusplus )
|
||||
#define FT_EXPORT( x ) extern "C" x
|
||||
#else
|
||||
#define FT_EXPORT( x ) extern x
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !FT_EXPORT */
|
||||
|
||||
|
||||
@ -574,7 +547,13 @@ FT_BEGIN_HEADER
|
||||
/* functions which are accessed by (global) function pointers. */
|
||||
/* */
|
||||
/* */
|
||||
/* FT_CALLBACK_DEF is used to _define_ a callback function. */
|
||||
/* FT_CALLBACK_DEF is used to _define_ a callback function, */
|
||||
/* located in the same source code file as the structure that uses */
|
||||
/* it. */
|
||||
/* */
|
||||
/* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
|
||||
/* and define a callback function, respectively, in a similar way */
|
||||
/* as FT_BASE and FT_BASE_DEF work. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
|
||||
/* contains pointers to callback functions. */
|
||||
@ -594,6 +573,16 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
#endif /* FT_CALLBACK_DEF */
|
||||
|
||||
#ifndef FT_BASE_CALLBACK
|
||||
#ifdef __cplusplus
|
||||
#define FT_BASE_CALLBACK( x ) extern "C" x
|
||||
#define FT_BASE_CALLBACK_DEF( x ) extern "C" x
|
||||
#else
|
||||
#define FT_BASE_CALLBACK( x ) extern x
|
||||
#define FT_BASE_CALLBACK_DEF( x ) x
|
||||
#endif
|
||||
#endif /* FT_BASE_CALLBACK */
|
||||
|
||||
#ifndef FT_CALLBACK_TABLE
|
||||
#ifdef __cplusplus
|
||||
#define FT_CALLBACK_TABLE extern "C"
|
||||
@ -608,7 +597,7 @@ FT_BEGIN_HEADER
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __FTCONFIG_H__ */
|
||||
#endif /* FTCONFIG_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Build macros of the FreeType 2 library. */
|
||||
/* */
|
||||
/* Copyright 1996-2008, 2010, 2012, 2013 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -15,8 +15,8 @@
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef __FT_HEADER_H__
|
||||
#define __FT_HEADER_H__
|
||||
#ifndef FTHEADER_H_
|
||||
#define FTHEADER_H_
|
||||
|
||||
|
||||
/*@***********************************************************************/
|
||||
@ -315,6 +315,19 @@
|
||||
#define FT_RENDER_H <freetype/ftrender.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_DRIVER_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the driver modules.
|
||||
*
|
||||
*/
|
||||
#define FT_DRIVER_H <freetype/ftdriver.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
@ -324,8 +337,10 @@
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the auto-hinting module.
|
||||
*
|
||||
* Deprecated since version 2.9; use @FT_DRIVER_H instead.
|
||||
*
|
||||
*/
|
||||
#define FT_AUTOHINTER_H <freetype/ftautoh.h>
|
||||
#define FT_AUTOHINTER_H FT_DRIVER_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@ -337,8 +352,40 @@
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the CFF driver module.
|
||||
*
|
||||
* Deprecated since version 2.9; use @FT_DRIVER_H instead.
|
||||
*
|
||||
*/
|
||||
#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h>
|
||||
#define FT_CFF_DRIVER_H FT_DRIVER_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_TRUETYPE_DRIVER_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the TrueType driver module.
|
||||
*
|
||||
* Deprecated since version 2.9; use @FT_DRIVER_H instead.
|
||||
*
|
||||
*/
|
||||
#define FT_TRUETYPE_DRIVER_H FT_DRIVER_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_PCF_DRIVER_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing
|
||||
* structures and macros related to the PCF driver module.
|
||||
*
|
||||
* Deprecated since version 2.9; use @FT_DRIVER_H instead.
|
||||
*
|
||||
*/
|
||||
#define FT_PCF_DRIVER_H FT_DRIVER_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@ -528,63 +575,6 @@
|
||||
#define FT_CACHE_H <freetype/ftcache.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_CACHE_IMAGE_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* `glyph image' API of the FreeType~2 cache sub-system.
|
||||
*
|
||||
* It is used to define a cache for @FT_Glyph elements. You can also
|
||||
* use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to
|
||||
* store small glyph bitmaps, as it will use less memory.
|
||||
*
|
||||
* This macro is deprecated. Simply include @FT_CACHE_H to have all
|
||||
* glyph image-related cache declarations.
|
||||
*
|
||||
*/
|
||||
#define FT_CACHE_IMAGE_H FT_CACHE_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_CACHE_SMALL_BITMAPS_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* `small bitmaps' API of the FreeType~2 cache sub-system.
|
||||
*
|
||||
* It is used to define a cache for small glyph bitmaps in a relatively
|
||||
* memory-efficient way. You can also use the API defined in
|
||||
* @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,
|
||||
* including scalable outlines.
|
||||
*
|
||||
* This macro is deprecated. Simply include @FT_CACHE_H to have all
|
||||
* small bitmaps-related cache declarations.
|
||||
*
|
||||
*/
|
||||
#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_CACHE_CHARMAP_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* `charmap' API of the FreeType~2 cache sub-system.
|
||||
*
|
||||
* This macro is deprecated. Simply include @FT_CACHE_H to have all
|
||||
* charmap-based cache declarations.
|
||||
*
|
||||
*/
|
||||
#define FT_CACHE_CHARMAP_H FT_CACHE_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
@ -697,14 +687,16 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_XFREE86_H
|
||||
* FT_FONT_FORMATS_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which provides functions specific to the XFree86 and
|
||||
* X.Org X11 servers.
|
||||
* FreeType~2 API which provides functions specific to font formats.
|
||||
*/
|
||||
#define FT_XFREE86_H <freetype/ftxf86.h>
|
||||
#define FT_FONT_FORMATS_H <freetype/ftfntfmt.h>
|
||||
|
||||
/* deprecated */
|
||||
#define FT_XFREE86_H FT_FONT_FORMATS_H
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@ -732,18 +724,6 @@
|
||||
#define FT_LCD_FILTER_H <freetype/ftlcdfil.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_UNPATENTED_HINTING_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which performs color filtering for subpixel rendering.
|
||||
*/
|
||||
#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
@ -751,7 +731,7 @@
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which performs color filtering for subpixel rendering.
|
||||
* FreeType~2 API which performs incremental glyph loading.
|
||||
*/
|
||||
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
|
||||
|
||||
@ -782,29 +762,34 @@
|
||||
|
||||
/* */
|
||||
|
||||
/* These header files don't need to be included by the user. */
|
||||
#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
|
||||
#define FT_PARAMETER_TAGS_H <freetype/ftparams.h>
|
||||
|
||||
/* Deprecated macros. */
|
||||
#define FT_UNPATENTED_HINTING_H <freetype/ftparams.h>
|
||||
#define FT_TRUETYPE_UNPATENTED_H <freetype/ftparams.h>
|
||||
|
||||
/* FT_CACHE_H is the only header file needed for the cache subsystem. */
|
||||
#define FT_CACHE_IMAGE_H FT_CACHE_H
|
||||
#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
|
||||
#define FT_CACHE_CHARMAP_H FT_CACHE_H
|
||||
|
||||
/* The internals of the cache sub-system are no longer exposed. We */
|
||||
/* default to FT_CACHE_H at the moment just in case, but we know of */
|
||||
/* no rogue client that uses them. */
|
||||
/* */
|
||||
#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
|
||||
|
||||
|
||||
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
|
||||
|
||||
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
|
||||
#define FT_CACHE_MANAGER_H FT_CACHE_H
|
||||
#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H
|
||||
#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H
|
||||
#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H
|
||||
#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H
|
||||
#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H
|
||||
#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H
|
||||
|
||||
|
||||
/*
|
||||
* Include internal headers definitions from <freetype/internal/...>
|
||||
* Include internal headers definitions from <internal/...>
|
||||
* only when building the library.
|
||||
*/
|
||||
#ifdef FT2_BUILD_LIBRARY
|
||||
@ -813,7 +798,7 @@
|
||||
#endif /* FT2_BUILD_LIBRARY */
|
||||
|
||||
|
||||
#endif /* __FT2_BUILD_H__ */
|
||||
#endif /* FTHEADER_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* User-selectable configuration macros (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2013 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTOPTION_H__
|
||||
#define __FTOPTION_H__
|
||||
#ifndef FTOPTION_H_
|
||||
#define FTOPTION_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -75,22 +75,52 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*#***********************************************************************/
|
||||
/* */
|
||||
/* If you enable this configuration option, FreeType recognizes an */
|
||||
/* environment variable called `FREETYPE_PROPERTIES', which can be used */
|
||||
/* to control the various font drivers and modules. The controllable */
|
||||
/* properties are listed in the section @properties. */
|
||||
/* */
|
||||
/* You have to undefine this configuration option on platforms that lack */
|
||||
/* the concept of environment variables (and thus don't have the */
|
||||
/* `getenv' function), for example Windows CE. */
|
||||
/* */
|
||||
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
|
||||
/* multiple lines for better readability). */
|
||||
/* */
|
||||
/* { */
|
||||
/* <optional whitespace> */
|
||||
/* <module-name1> ':' */
|
||||
/* <property-name1> '=' <property-value1> */
|
||||
/* <whitespace> */
|
||||
/* <module-name2> ':' */
|
||||
/* <property-name2> '=' <property-value2> */
|
||||
/* ... */
|
||||
/* } */
|
||||
/* */
|
||||
/* Example: */
|
||||
/* */
|
||||
/* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */
|
||||
/* cff:no-stem-darkening=1 \ */
|
||||
/* autofitter:warping=1 */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Uncomment the line below if you want to activate sub-pixel rendering */
|
||||
/* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
|
||||
/* Uncomment the line below if you want to activate LCD rendering */
|
||||
/* technology similar to ClearType in this build of the library. This */
|
||||
/* technology triples the resolution in the direction color subpixels. */
|
||||
/* To mitigate color fringes inherent to this technology, you also need */
|
||||
/* to explicitly set up LCD filtering. */
|
||||
/* */
|
||||
/* Note that this feature is covered by several Microsoft patents */
|
||||
/* and should not be activated in any default build of the library. */
|
||||
/* */
|
||||
/* This macro has no impact on the FreeType API, only on its */
|
||||
/* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
|
||||
/* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
|
||||
/* the original size in case this macro isn't defined; however, each */
|
||||
/* triplet of subpixels has R=G=B. */
|
||||
/* */
|
||||
/* This is done to allow FreeType clients to run unmodified, forcing */
|
||||
/* them to display normal gray-level anti-aliased glyphs. */
|
||||
/* When this macro is not defined, FreeType offers alternative LCD */
|
||||
/* rendering technology that produces excellent output without LCD */
|
||||
/* filtering. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
|
||||
@ -184,7 +214,11 @@ FT_BEGIN_HEADER
|
||||
/* Do not #undef this macro here since the build system might define */
|
||||
/* it for certain configurations only. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
|
||||
/* If you use a build system like cmake or the `configure' script, */
|
||||
/* options set by those programs have precendence, overwriting the */
|
||||
/* value here with the configured one. */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_SYSTEM_ZLIB
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -200,7 +234,11 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Define this macro if you want to enable this `feature'. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_USE_BZIP2 */
|
||||
/* If you use a build system like cmake or the `configure' script, */
|
||||
/* options set by those programs have precendence, overwriting the */
|
||||
/* value here with the configured one. */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_USE_BZIP2
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -216,44 +254,37 @@ FT_BEGIN_HEADER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* DLL export compilation */
|
||||
/* PNG bitmap support. */
|
||||
/* */
|
||||
/* When compiling FreeType as a DLL, some systems/compilers need a */
|
||||
/* special keyword in front OR after the return type of function */
|
||||
/* declarations. */
|
||||
/* FreeType now handles loading color bitmap glyphs in the PNG format. */
|
||||
/* This requires help from the external libpng library. Uncompressed */
|
||||
/* color bitmaps do not need any external libraries and will be */
|
||||
/* supported regardless of this configuration. */
|
||||
/* */
|
||||
/* Two macros are used within the FreeType source code to define */
|
||||
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
|
||||
/* Define this macro if you want to enable this `feature'. */
|
||||
/* */
|
||||
/* FT_EXPORT( return_type ) */
|
||||
/* If you use a build system like cmake or the `configure' script, */
|
||||
/* options set by those programs have precendence, overwriting the */
|
||||
/* value here with the configured one. */
|
||||
/* */
|
||||
/* is used in a function declaration, as in */
|
||||
#define FT_CONFIG_OPTION_USE_PNG
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* FT_EXPORT( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ); */
|
||||
/* HarfBuzz support. */
|
||||
/* */
|
||||
/* FreeType uses the HarfBuzz library to improve auto-hinting of */
|
||||
/* OpenType fonts. If available, many glyphs not directly addressable */
|
||||
/* by a font's character map will be hinted also. */
|
||||
/* */
|
||||
/* FT_EXPORT_DEF( return_type ) */
|
||||
/* Define this macro if you want to enable this `feature'. */
|
||||
/* */
|
||||
/* is used in a function definition, as in */
|
||||
/* If you use a build system like cmake or the `configure' script, */
|
||||
/* options set by those programs have precendence, overwriting the */
|
||||
/* value here with the configured one. */
|
||||
/* */
|
||||
/* FT_EXPORT_DEF( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ) */
|
||||
/* { */
|
||||
/* ... some code ... */
|
||||
/* return FT_Err_Ok; */
|
||||
/* } */
|
||||
/* */
|
||||
/* You can provide your own implementation of FT_EXPORT and */
|
||||
/* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
|
||||
/* will be later automatically defined as `extern return_type' to */
|
||||
/* allow normal compilation. */
|
||||
/* */
|
||||
/* Do not #undef these macros here since the build system might define */
|
||||
/* them for certain configurations only. */
|
||||
/* */
|
||||
/* #define FT_EXPORT(x) extern x */
|
||||
/* #define FT_EXPORT_DEF(x) x */
|
||||
/* #undef FT_CONFIG_OPTION_USE_HARFBUZZ */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -270,7 +301,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* - The TrueType driver will provide its own set of glyph names, */
|
||||
/* if you build it to support postscript names in the TrueType */
|
||||
/* `post' table. */
|
||||
/* `post' table, but will not synthesize a missing Unicode charmap. */
|
||||
/* */
|
||||
/* - The Type 1 driver will not be able to synthesize a Unicode */
|
||||
/* charmap out of the glyphs found in the fonts. */
|
||||
@ -351,10 +382,6 @@ FT_BEGIN_HEADER
|
||||
/* The size in bytes of the render pool used by the scan-line converter */
|
||||
/* to do all of its work. */
|
||||
/* */
|
||||
/* This must be greater than 4KByte if you use FreeType to rasterize */
|
||||
/* glyphs; otherwise, you may set it to zero to avoid unnecessary */
|
||||
/* allocation of the render pool. */
|
||||
/* */
|
||||
#define FT_RENDER_POOL_SIZE 16384L
|
||||
|
||||
|
||||
@ -408,6 +435,8 @@ FT_BEGIN_HEADER
|
||||
/* af_glyph_hints_dump_points */
|
||||
/* af_glyph_hints_dump_segments */
|
||||
/* af_glyph_hints_dump_edges */
|
||||
/* af_glyph_hints_get_num_segments */
|
||||
/* af_glyph_hints_get_segment_offset */
|
||||
/* */
|
||||
/* As an argument, they use another global variable: */
|
||||
/* */
|
||||
@ -467,7 +496,21 @@ FT_BEGIN_HEADER
|
||||
/* code will be used. */
|
||||
/* */
|
||||
/* Setting this macro is needed for systems that prohibit address */
|
||||
/* fixups, such as BREW. */
|
||||
/* fixups, such as BREW. [Note that standard compilers like gcc or */
|
||||
/* clang handle PIC generation automatically; you don't have to set */
|
||||
/* FT_CONFIG_OPTION_PIC, which is only necessary for very special */
|
||||
/* compilers.] */
|
||||
/* */
|
||||
/* Note that FT_CONFIG_OPTION_PIC support is not available for all */
|
||||
/* modules (see `modules.cfg' for a complete list). For building with */
|
||||
/* FT_CONFIG_OPTION_PIC support, do the following. */
|
||||
/* */
|
||||
/* 0. Clone the repository. */
|
||||
/* 1. Define FT_CONFIG_OPTION_PIC. */
|
||||
/* 2. Remove all subdirectories in `src' that don't have */
|
||||
/* FT_CONFIG_OPTION_PIC support. */
|
||||
/* 3. Comment out the corresponding modules in `modules.cfg'. */
|
||||
/* 4. Compile. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_PIC */
|
||||
|
||||
@ -514,7 +557,7 @@ FT_BEGIN_HEADER
|
||||
/* does not contain any glyph name though. */
|
||||
/* */
|
||||
/* Accessing SFNT names is done through the functions declared in */
|
||||
/* `freetype/ftsnames.h'. */
|
||||
/* `ftsnames.h'. */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_SFNT_NAMES
|
||||
|
||||
@ -555,92 +598,68 @@ FT_BEGIN_HEADER
|
||||
/* Do not #undef this macro here, since the build system might */
|
||||
/* define it for certain configurations only. */
|
||||
/* */
|
||||
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
|
||||
#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. */
|
||||
/* subpixel hinting support into the TrueType driver. This modifies the */
|
||||
/* 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: */
|
||||
/* In particular, it modifies the bytecode interpreter to interpret (or */
|
||||
/* not) instructions in a certain way so that all TrueType fonts look */
|
||||
/* like they do in a Windows ClearType (DirectWrite) environment. See */
|
||||
/* [1] for a technical overview on what this means. See `ttinterp.h' */
|
||||
/* for more details on the LEAN option. */
|
||||
/* */
|
||||
/* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
|
||||
/* There are three possible values. */
|
||||
/* */
|
||||
/* By undefining this, you only compile the code necessary to hint */
|
||||
/* TrueType glyphs with native TT hinting. */
|
||||
/* Value 1: */
|
||||
/* This value is associated with the `Infinality' moniker, */
|
||||
/* contributed by an individual nicknamed Infinality with the goal of */
|
||||
/* making TrueType fonts render better than on Windows. A high */
|
||||
/* amount of configurability and flexibility, down to rules for */
|
||||
/* single glyphs in fonts, but also very slow. Its experimental and */
|
||||
/* slow nature and the original developer losing interest meant that */
|
||||
/* this option was never enabled in default builds. */
|
||||
/* */
|
||||
/* The corresponding interpreter version is v38. */
|
||||
/* */
|
||||
/* Value 2: */
|
||||
/* The new default mode for the TrueType driver. The Infinality code */
|
||||
/* base was stripped to the bare minimum and all configurability */
|
||||
/* removed in the name of speed and simplicity. The configurability */
|
||||
/* was mainly aimed at legacy fonts like Arial, Times New Roman, or */
|
||||
/* Courier. Legacy fonts are fonts that modify vertical stems to */
|
||||
/* achieve clean black-and-white bitmaps. The new mode focuses on */
|
||||
/* applying a minimal set of rules to all fonts indiscriminately so */
|
||||
/* that modern and web fonts render well while legacy fonts render */
|
||||
/* okay. */
|
||||
/* */
|
||||
/* The corresponding interpreter version is v40. */
|
||||
/* */
|
||||
/* Value 3: */
|
||||
/* Compile both, making both v38 and v40 available (the latter is the */
|
||||
/* default). */
|
||||
/* */
|
||||
/* By undefining these, you get rendering behavior like on Windows */
|
||||
/* without ClearType, i.e., Windows XP without ClearType enabled and */
|
||||
/* Win9x (interpreter version v35). Or not, depending on how much */
|
||||
/* hinting blood and testing tears the font designer put into a given */
|
||||
/* font. If you define one or both subpixel hinting options, you can */
|
||||
/* switch between between v35 and the ones you define (using */
|
||||
/* `FT_Property_Set'). */
|
||||
/* */
|
||||
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
|
||||
/* defined. */
|
||||
/* */
|
||||
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
|
||||
/* */
|
||||
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
|
||||
/* of the TrueType bytecode interpreter is used that doesn't implement */
|
||||
/* any of the patented opcodes and algorithms. The patents related to */
|
||||
/* TrueType hinting have expired worldwide since May 2010; this option */
|
||||
/* is now deprecated. */
|
||||
/* */
|
||||
/* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
|
||||
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
|
||||
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
|
||||
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
|
||||
/* */
|
||||
/* This macro is only useful for a small number of font files (mostly */
|
||||
/* for Asian scripts) that require bytecode interpretation to properly */
|
||||
/* load glyphs. For all other fonts, this produces unpleasant results, */
|
||||
/* thus the unpatented interpreter is never used to load glyphs from */
|
||||
/* TrueType fonts unless one of the following two options is used. */
|
||||
/* */
|
||||
/* - The unpatented interpreter is explicitly activated by the user */
|
||||
/* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
|
||||
/* when opening the FT_Face. */
|
||||
/* */
|
||||
/* - FreeType detects that the FT_Face corresponds to one of the */
|
||||
/* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */
|
||||
/* contains a hard-coded list of font names and other matching */
|
||||
/* parameters (see function `tt_face_init' in file */
|
||||
/* `src/truetype/ttobjs.c'). */
|
||||
/* */
|
||||
/* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
|
||||
/* */
|
||||
/* { */
|
||||
/* FT_Parameter parameter; */
|
||||
/* FT_Open_Args open_args; */
|
||||
/* */
|
||||
/* */
|
||||
/* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */
|
||||
/* */
|
||||
/* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */
|
||||
/* open_args.pathname = my_font_pathname; */
|
||||
/* open_args.num_params = 1; */
|
||||
/* open_args.params = ¶meter; */
|
||||
/* */
|
||||
/* error = FT_Open_Face( library, &open_args, index, &face ); */
|
||||
/* ... */
|
||||
/* } */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
|
||||
/* bytecode interpreter with a huge switch statement, rather than a call */
|
||||
/* table. This results in smaller and faster code for a number of */
|
||||
/* architectures. */
|
||||
/* */
|
||||
/* Note however that on some compiler/processor combinations, undefining */
|
||||
/* this macro will generate faster, though larger, code. */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
|
||||
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
|
||||
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
|
||||
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -656,8 +675,8 @@ FT_BEGIN_HEADER
|
||||
/* composite flags array which can be used to disambiguate, but old */
|
||||
/* fonts will not have them. */
|
||||
/* */
|
||||
/* http://www.microsoft.com/typography/otspec/glyf.htm */
|
||||
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
|
||||
/* https://www.microsoft.com/typography/otspec/glyf.htm */
|
||||
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
|
||||
/* */
|
||||
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
|
||||
|
||||
@ -680,6 +699,24 @@ FT_BEGIN_HEADER
|
||||
#define TT_CONFIG_OPTION_BDF
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */
|
||||
/* number of bytecode instructions executed for a single run of the */
|
||||
/* bytecode interpreter, needed to prevent infinite loops. You don't */
|
||||
/* want to change this except for very special situations (e.g., making */
|
||||
/* a library fuzzer spend less time to handle broken fonts). */
|
||||
/* */
|
||||
/* It is not expected that this value is ever modified by a configuring */
|
||||
/* script; instead, it gets surrounded with #ifndef ... #endif so that */
|
||||
/* the value can be set as a preprocessor option on the compiler's */
|
||||
/* command line. */
|
||||
/* */
|
||||
#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
|
||||
#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
@ -735,6 +772,86 @@ FT_BEGIN_HEADER
|
||||
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */
|
||||
/* engine gets compiled into FreeType. If defined, it is possible to */
|
||||
/* switch between the two engines using the `hinting-engine' property of */
|
||||
/* the type1 driver module. */
|
||||
/* */
|
||||
/* #define T1_CONFIG_OPTION_OLD_ENGINE */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** C F F D R I V E R C O N F I G U R A T I O N ****/
|
||||
/**** ****/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */
|
||||
/* possible to set up the default values of the four control points that */
|
||||
/* define the stem darkening behaviour of the (new) CFF engine. For */
|
||||
/* more details please read the documentation of the */
|
||||
/* `darkening-parameters' property (file `ftdriver.h'), which allows the */
|
||||
/* control at run-time. */
|
||||
/* */
|
||||
/* Do *not* undefine these macros! */
|
||||
/* */
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
|
||||
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
|
||||
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
|
||||
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
|
||||
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */
|
||||
/* engine gets compiled into FreeType. If defined, it is possible to */
|
||||
/* switch between the two engines using the `hinting-engine' property of */
|
||||
/* the cff driver module. */
|
||||
/* */
|
||||
/* #define CFF_CONFIG_OPTION_OLD_ENGINE */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** P C F D R I V E R C O N F I G U R A T I O N ****/
|
||||
/**** ****/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* There are many PCF fonts just called `Fixed' which look completely */
|
||||
/* different, and which have nothing to do with each other. When */
|
||||
/* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
|
||||
/* random, the style changes often if one changes the size and one */
|
||||
/* cannot select some fonts at all. This option makes the PCF module */
|
||||
/* prepend the foundry name (plus a space) to the family name. */
|
||||
/* */
|
||||
/* We also check whether we have `wide' characters; all put together, we */
|
||||
/* get family names like `Sony Fixed' or `Misc Fixed Wide'. */
|
||||
/* */
|
||||
/* If this option is activated, it can be controlled with the */
|
||||
/* `no-long-family-names' property of the pcf driver module. */
|
||||
/* */
|
||||
/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
@ -753,7 +870,9 @@ FT_BEGIN_HEADER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Compile autofit module with Indic script support. */
|
||||
/* Compile autofit module with fallback Indic script support, covering */
|
||||
/* some scripts that the `latin' submodule of the autofit module doesn't */
|
||||
/* (yet) handle. */
|
||||
/* */
|
||||
#define AF_CONFIG_OPTION_INDIC
|
||||
|
||||
@ -765,63 +884,94 @@ FT_BEGIN_HEADER
|
||||
/* grid. To find out the optimal scaling and shifting value, various */
|
||||
/* parameter combinations are tried and scored. */
|
||||
/* */
|
||||
/* This experimental option is only active if the render mode is */
|
||||
/* FT_RENDER_MODE_LIGHT. */
|
||||
/* This experimental option is active only if the rendering mode is */
|
||||
/* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */
|
||||
/* `warping' property of the auto-hinter (see file `ftdriver.h' for more */
|
||||
/* information; by default it is switched off). */
|
||||
/* */
|
||||
/* #define AF_CONFIG_OPTION_USE_WARPER */
|
||||
#define AF_CONFIG_OPTION_USE_WARPER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Use TrueType-like size metrics for `light' auto-hinting. */
|
||||
/* */
|
||||
/* It is strongly recommended to avoid this option, which exists only to */
|
||||
/* help some legacy applications retain its appearance and behaviour */
|
||||
/* with respect to auto-hinted TrueType fonts. */
|
||||
/* */
|
||||
/* The very reason this option exists at all are GNU/Linux distributions */
|
||||
/* like Fedora that did not un-patch the following change (which was */
|
||||
/* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */
|
||||
/* */
|
||||
/* 2011-07-16 Steven Chu <steven.f.chu@gmail.com> */
|
||||
/* */
|
||||
/* [truetype] Fix metrics on size request for scalable fonts. */
|
||||
/* */
|
||||
/* This problematic commit is now reverted (more or less). */
|
||||
/* */
|
||||
/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/*
|
||||
* Define this variable if you want to keep the layout of internal
|
||||
* structures that was used prior to FreeType 2.2. This also compiles in
|
||||
* a few obsolete functions to avoid linking problems on typical Unix
|
||||
* distributions.
|
||||
*
|
||||
* For embedded systems or building a new distribution from scratch, it
|
||||
* is recommended to disable the macro since it reduces the library's code
|
||||
* size and activates a few memory-saving optimizations as well.
|
||||
* This macro is obsolete. Support has been removed in FreeType
|
||||
* version 2.5.
|
||||
*/
|
||||
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
|
||||
/*
|
||||
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
|
||||
* we restrict the number of charmaps in a font. The current API of
|
||||
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
|
||||
* takes charcode only. To determine the passed value is for cmap_index
|
||||
* or charcode, the possible cmap_index is restricted not to exceed
|
||||
* the minimum possible charcode by a rogue client. It is also very
|
||||
* unlikely that a rogue client is interested in Unicode values 0 to 15.
|
||||
*
|
||||
* NOTE: The original threshold was 4 deduced from popular number of
|
||||
* cmap subtables in UCS-4 TrueType fonts, but now it is not
|
||||
* irregular for OpenType fonts to have more than 4 subtables,
|
||||
* because variation selector subtables are available for Apple
|
||||
* and Microsoft platforms.
|
||||
* This macro is defined if native TrueType hinting is requested by the
|
||||
* definitions above.
|
||||
*/
|
||||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
#define TT_USE_BYTECODE_INTERPRETER
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
#define FT_MAX_CHARMAP_CACHEABLE 15
|
||||
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
|
||||
#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
|
||||
#endif
|
||||
|
||||
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
|
||||
#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* This macro is defined if either unpatented or native TrueType
|
||||
* hinting is requested by the definitions above.
|
||||
* Check CFF darkening parameters. The checks are the same as in function
|
||||
* `cff_property_set' in file `cffdrivr.c'.
|
||||
*/
|
||||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
#define TT_USE_BYTECODE_INTERPRETER
|
||||
#undef TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||
#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||
#define TT_USE_BYTECODE_INTERPRETER
|
||||
#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
|
||||
\
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
|
||||
\
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
|
||||
\
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
|
||||
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
|
||||
#error "Invalid CFF darkening parameters!"
|
||||
#endif
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __FTOPTION_H__ */
|
||||
#endif /* FTOPTION_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
/* ANSI-specific library and header configuration file (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 2002-2007, 2009, 2011-2012 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -23,14 +23,13 @@
|
||||
/* FreeType normally requires. It also defines macros to rename the */
|
||||
/* standard functions within the FreeType source code. */
|
||||
/* */
|
||||
/* Load a file which defines __FTSTDLIB_H__ before this one to override */
|
||||
/* it. */
|
||||
/* Load a file which defines FTSTDLIB_H_ before this one to override it. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTSTDLIB_H__
|
||||
#define __FTSTDLIB_H__
|
||||
#ifndef FTSTDLIB_H_
|
||||
#define FTSTDLIB_H_
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
@ -64,6 +63,8 @@
|
||||
#define FT_INT_MAX INT_MAX
|
||||
#define FT_INT_MIN INT_MIN
|
||||
#define FT_UINT_MAX UINT_MAX
|
||||
#define FT_LONG_MIN LONG_MIN
|
||||
#define FT_LONG_MAX LONG_MAX
|
||||
#define FT_ULONG_MAX ULONG_MAX
|
||||
|
||||
|
||||
@ -141,8 +142,8 @@
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
#define ft_atol atol
|
||||
#define ft_labs labs
|
||||
#define ft_strtol strtol
|
||||
#define ft_getenv getenv
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
@ -168,7 +169,7 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
#endif /* __FTSTDLIB_H__ */
|
||||
#endif /* FTSTDLIB_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Quick computation of advance widths (specification only). */
|
||||
/* */
|
||||
/* Copyright 2008 by */
|
||||
/* Copyright 2008-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTADVANC_H__
|
||||
#define __FTADVANC_H__
|
||||
#ifndef FTADVANC_H_
|
||||
#define FTADVANC_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -48,6 +48,11 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* This section contains functions to quickly extract advance values
|
||||
* without handling glyph outlines, if possible.
|
||||
*
|
||||
* @order:
|
||||
* FT_Get_Advance
|
||||
* FT_Get_Advances
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -64,15 +69,15 @@ FT_BEGIN_HEADER
|
||||
/* corresponding hinting mode or font driver doesn't allow for very */
|
||||
/* quick advance computation. */
|
||||
/* */
|
||||
/* Typically, glyphs which are either unscaled, unhinted, bitmapped, */
|
||||
/* Typically, glyphs that are either unscaled, unhinted, bitmapped, */
|
||||
/* or light-hinted can have their advance width computed very */
|
||||
/* quickly. */
|
||||
/* */
|
||||
/* Normal and bytecode hinted modes, which require loading, scaling, */
|
||||
/* Normal and bytecode hinted modes that require loading, scaling, */
|
||||
/* and hinting of the glyph outline, are extremely slow by */
|
||||
/* comparison. */
|
||||
/* */
|
||||
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL
|
||||
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -82,8 +87,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve the advance value of a given glyph outline in an */
|
||||
/* @FT_Face. By default, the unhinted advance is returned in font */
|
||||
/* units. */
|
||||
/* @FT_Face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: The source @FT_Face handle. */
|
||||
@ -94,8 +98,9 @@ FT_BEGIN_HEADER
|
||||
/* calling @FT_Load_Glyph, used to determine what kind */
|
||||
/* of advances you need. */
|
||||
/* <Output> */
|
||||
/* padvance :: The advance value, in either font units or 16.16 */
|
||||
/* format. */
|
||||
/* padvance :: The advance value. If scaling is performed (based on */
|
||||
/* the value of `load_flags'), the advance value is in */
|
||||
/* 16.16 format. Otherwise, it is in font units. */
|
||||
/* */
|
||||
/* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */
|
||||
/* vertical advance corresponding to a vertical layout. */
|
||||
@ -127,8 +132,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve the advance values of several glyph outlines in an */
|
||||
/* @FT_Face. By default, the unhinted advances are returned in font */
|
||||
/* units. */
|
||||
/* @FT_Face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: The source @FT_Face handle. */
|
||||
@ -141,8 +145,12 @@ FT_BEGIN_HEADER
|
||||
/* calling @FT_Load_Glyph. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* padvance :: The advances, in either font units or 16.16 format. */
|
||||
/* This array must contain at least `count' elements. */
|
||||
/* padvance :: The advance values. This array, to be provided by the */
|
||||
/* caller, must contain at least `count' elements. */
|
||||
/* */
|
||||
/* If scaling is performed (based on the value of */
|
||||
/* `load_flags'), the advance values are in 16.16 format. */
|
||||
/* Otherwise, they are in font units. */
|
||||
/* */
|
||||
/* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */
|
||||
/* vertical advances corresponding to a vertical layout. */
|
||||
@ -173,7 +181,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTADVANC_H__ */
|
||||
#endif /* FTADVANC_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType exact bbox computation (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2007, 2011 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -27,8 +27,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTBBOX_H__
|
||||
#define __FTBBOX_H__
|
||||
#ifndef FTBBOX_H_
|
||||
#define FTBBOX_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -60,8 +60,8 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* Compute the exact bounding box of an outline. This is slower */
|
||||
/* than computing the control box. However, it uses an advanced */
|
||||
/* algorithm which returns _very_ quickly when the two boxes */
|
||||
/* coincide. Otherwise, the outline Bézier arcs are traversed to */
|
||||
/* algorithm that returns _very_ quickly when the two boxes */
|
||||
/* coincide. Otherwise, the outline Bezier arcs are traversed to */
|
||||
/* extract their extrema. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -78,20 +78,19 @@ FT_BEGIN_HEADER
|
||||
/* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
|
||||
/* reasonable values for the BBox it is necessary to load the glyph */
|
||||
/* at a large ppem value (so that the hinting instructions can */
|
||||
/* properly shift and scale the subglyphs), then extracting the BBox */
|
||||
/* properly shift and scale the subglyphs), then extracting the BBox, */
|
||||
/* which can be eventually converted back to font units. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Get_BBox( FT_Outline* outline,
|
||||
FT_BBox *abbox );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTBBOX_H__ */
|
||||
#endif /* FTBBOX_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for accessing BDF-specific strings (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2009 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTBDF_H__
|
||||
#define __FTBDF_H__
|
||||
#ifndef FTBDF_H_
|
||||
#define FTBDF_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -53,7 +53,7 @@ FT_BEGIN_HEADER
|
||||
/**********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_PropertyType
|
||||
* BDF_PropertyType
|
||||
*
|
||||
* @description:
|
||||
* A list of BDF property types.
|
||||
@ -106,7 +106,8 @@ FT_BEGIN_HEADER
|
||||
* The property type.
|
||||
*
|
||||
* u.atom ::
|
||||
* The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
|
||||
* The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be
|
||||
* NULL, indicating an empty string.
|
||||
*
|
||||
* u.integer ::
|
||||
* A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
|
||||
@ -203,7 +204,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTBDF_H__ */
|
||||
#endif /* FTBDF_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType utility functions for bitmaps (specification). */
|
||||
/* */
|
||||
/* Copyright 2004, 2005, 2006, 2008 by */
|
||||
/* Copyright 2004-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTBITMAP_H__
|
||||
#define __FTBITMAP_H__
|
||||
#ifndef FTBITMAP_H_
|
||||
#define FTBITMAP_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -45,7 +45,9 @@ FT_BEGIN_HEADER
|
||||
/* Handling FT_Bitmap objects. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains functions for converting FT_Bitmap objects. */
|
||||
/* This section contains functions for handling @FT_Bitmap objects. */
|
||||
/* Note that none of the functions changes the bitmap's `flow' (as */
|
||||
/* indicated by the sign of the `pitch' field in `FT_Bitmap'). */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -53,7 +55,7 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Bitmap_New */
|
||||
/* FT_Bitmap_Init */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Initialize a pointer to an @FT_Bitmap structure. */
|
||||
@ -61,6 +63,14 @@ FT_BEGIN_HEADER
|
||||
/* <InOut> */
|
||||
/* abitmap :: A pointer to the bitmap structure. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* A deprecated name for the same function is `FT_Bitmap_New'. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Bitmap_Init( FT_Bitmap *abitmap );
|
||||
|
||||
|
||||
/* deprecated */
|
||||
FT_EXPORT( void )
|
||||
FT_Bitmap_New( FT_Bitmap *abitmap );
|
||||
|
||||
@ -122,6 +132,9 @@ FT_BEGIN_HEADER
|
||||
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
|
||||
/* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
|
||||
/* */
|
||||
/* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */
|
||||
/* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Bitmap_Embolden( FT_Library library,
|
||||
FT_Bitmap* bitmap,
|
||||
@ -135,9 +148,9 @@ FT_BEGIN_HEADER
|
||||
/* FT_Bitmap_Convert */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */
|
||||
/* bitmap object with depth 8bpp, making the number of used bytes per */
|
||||
/* line (a.k.a. the `pitch') a multiple of `alignment'. */
|
||||
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */
|
||||
/* to a bitmap object with depth 8bpp, making the number of used */
|
||||
/* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to a library object. */
|
||||
@ -197,7 +210,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Bitmap_Done */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Destroy a bitmap object created with @FT_Bitmap_New. */
|
||||
/* Destroy a bitmap object initialized with @FT_Bitmap_Init. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to a library object. */
|
||||
@ -221,7 +234,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTBITMAP_H__ */
|
||||
#endif /* FTBITMAP_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Bzip2-compressed stream support. */
|
||||
/* */
|
||||
/* Copyright 2010 by */
|
||||
/* Copyright 2010-2018 by */
|
||||
/* Joel Klinghed. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTBZIP2_H__
|
||||
#define __FTBZIP2_H__
|
||||
#ifndef FTBZIP2_H_
|
||||
#define FTBZIP2_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -96,7 +96,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTBZIP2_H__ */
|
||||
#endif /* FTBZIP2_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType Cache subsystem (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTCACHE_H__
|
||||
#define __FTCACHE_H__
|
||||
#ifndef FTCACHE_H_
|
||||
#define FTCACHE_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -156,7 +156,7 @@ FT_BEGIN_HEADER
|
||||
* @note:
|
||||
* Never use NULL as a valid @FTC_FaceID.
|
||||
*
|
||||
* Face IDs are passed by the client to the cache manager, which calls,
|
||||
* Face IDs are passed by the client to the cache manager that calls,
|
||||
* when needed, the @FTC_Face_Requester to translate them into new
|
||||
* @FT_Face objects.
|
||||
*
|
||||
@ -209,22 +209,11 @@ FT_BEGIN_HEADER
|
||||
typedef FT_Error
|
||||
(*FTC_Face_Requester)( FTC_FaceID face_id,
|
||||
FT_Library library,
|
||||
FT_Pointer request_data,
|
||||
FT_Pointer req_data,
|
||||
FT_Face* aface );
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
/* these macros are incompatible with LLP64, should not be used */
|
||||
|
||||
#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
|
||||
|
||||
#define FTC_FACE_ID_HASH( i ) \
|
||||
((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
|
||||
( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
@ -381,7 +370,7 @@ FT_BEGIN_HEADER
|
||||
/* should never try to discard it yourself. */
|
||||
/* */
|
||||
/* The @FT_Face object doesn't necessarily have a current size object */
|
||||
/* (i.e., face->size can be 0). If you need a specific `font size', */
|
||||
/* (i.e., face->size can be~0). If you need a specific `font size', */
|
||||
/* use @FTC_Manager_LookupSize instead. */
|
||||
/* */
|
||||
/* Never change the face's transformation matrix (i.e., never call */
|
||||
@ -551,13 +540,6 @@ FT_BEGIN_HEADER
|
||||
FTC_FaceID face_id );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* cache_subsystem */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @type:
|
||||
@ -634,14 +616,6 @@ FT_BEGIN_HEADER
|
||||
FT_UInt32 char_code );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* cache_subsystem */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
@ -678,8 +652,8 @@ FT_BEGIN_HEADER
|
||||
typedef struct FTC_ImageTypeRec_
|
||||
{
|
||||
FTC_FaceID face_id;
|
||||
FT_Int width;
|
||||
FT_Int height;
|
||||
FT_UInt width;
|
||||
FT_UInt height;
|
||||
FT_Int32 flags;
|
||||
|
||||
} FTC_ImageTypeRec;
|
||||
@ -705,17 +679,6 @@ FT_BEGIN_HEADER
|
||||
(d1)->width == (d2)->width && \
|
||||
(d1)->flags == (d2)->flags )
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
/* this macro is incompatible with LLP64, should not be used */
|
||||
|
||||
#define FTC_IMAGE_TYPE_HASH( d ) \
|
||||
(FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
|
||||
( (d)->width << 8 ) ^ (d)->height ^ \
|
||||
( (d)->flags << 4 ) )
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -723,7 +686,7 @@ FT_BEGIN_HEADER
|
||||
/* FTC_ImageCache */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A handle to an glyph image cache object. They are designed to */
|
||||
/* A handle to a glyph image cache object. They are designed to */
|
||||
/* hold many distinct glyph images while not exceeding a certain */
|
||||
/* memory threshold. */
|
||||
/* */
|
||||
@ -771,7 +734,7 @@ FT_BEGIN_HEADER
|
||||
/* aglyph :: The corresponding @FT_Glyph object. 0~in case of */
|
||||
/* failure. */
|
||||
/* */
|
||||
/* anode :: Used to return the address of of the corresponding cache */
|
||||
/* anode :: Used to return the address of the corresponding cache */
|
||||
/* node after incrementing its reference count (see note */
|
||||
/* below). */
|
||||
/* */
|
||||
@ -824,7 +787,7 @@ FT_BEGIN_HEADER
|
||||
/* aglyph :: The corresponding @FT_Glyph object. 0~in case of */
|
||||
/* failure. */
|
||||
/* */
|
||||
/* anode :: Used to return the address of of the corresponding */
|
||||
/* anode :: Used to return the address of the corresponding */
|
||||
/* cache node after incrementing its reference count */
|
||||
/* (see note below). */
|
||||
/* */
|
||||
@ -979,7 +942,7 @@ FT_BEGIN_HEADER
|
||||
/* <Output> */
|
||||
/* sbit :: A handle to a small bitmap descriptor. */
|
||||
/* */
|
||||
/* anode :: Used to return the address of of the corresponding cache */
|
||||
/* anode :: Used to return the address of the corresponding cache */
|
||||
/* node after incrementing its reference count (see note */
|
||||
/* below). */
|
||||
/* */
|
||||
@ -1034,7 +997,7 @@ FT_BEGIN_HEADER
|
||||
/* <Output> */
|
||||
/* sbit :: A handle to a small bitmap descriptor. */
|
||||
/* */
|
||||
/* anode :: Used to return the address of of the corresponding */
|
||||
/* anode :: Used to return the address of the corresponding */
|
||||
/* cache node after incrementing its reference count */
|
||||
/* (see note below). */
|
||||
/* */
|
||||
@ -1068,73 +1031,12 @@ FT_BEGIN_HEADER
|
||||
FTC_SBit *sbit,
|
||||
FTC_Node *anode );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
/*@***********************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FTC_FontRec */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to describe a given `font' to the cache */
|
||||
/* manager. Note that a `font' is the combination of a given face */
|
||||
/* with a given character size. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* face_id :: The ID of the face to use. */
|
||||
/* */
|
||||
/* pix_width :: The character width in integer pixels. */
|
||||
/* */
|
||||
/* pix_height :: The character height in integer pixels. */
|
||||
/* */
|
||||
typedef struct FTC_FontRec_
|
||||
{
|
||||
FTC_FaceID face_id;
|
||||
FT_UShort pix_width;
|
||||
FT_UShort pix_height;
|
||||
|
||||
} FTC_FontRec;
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
#define FTC_FONT_COMPARE( f1, f2 ) \
|
||||
( (f1)->face_id == (f2)->face_id && \
|
||||
(f1)->pix_width == (f2)->pix_width && \
|
||||
(f1)->pix_height == (f2)->pix_height )
|
||||
|
||||
/* this macro is incompatible with LLP64, should not be used */
|
||||
#define FTC_FONT_HASH( f ) \
|
||||
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
|
||||
((f)->pix_width << 8) ^ \
|
||||
((f)->pix_height) )
|
||||
|
||||
typedef FTC_FontRec* FTC_Font;
|
||||
|
||||
|
||||
FT_EXPORT( FT_Error )
|
||||
FTC_Manager_Lookup_Face( FTC_Manager manager,
|
||||
FTC_FaceID face_id,
|
||||
FT_Face *aface );
|
||||
|
||||
FT_EXPORT( FT_Error )
|
||||
FTC_Manager_Lookup_Size( FTC_Manager manager,
|
||||
FTC_Font font,
|
||||
FT_Face *aface,
|
||||
FT_Size *asize );
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTCACHE_H__ */
|
||||
#endif /* FTCACHE_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -1,7 +1,7 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* This file defines the structure of the FreeType reference. */
|
||||
/* It is used by the python script which generates the HTML files. */
|
||||
/* It is used by the python script that generates the HTML files. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
/* General Remarks */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* header_inclusion */
|
||||
/* user_allocation */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
@ -67,27 +68,19 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
/* auto_hinter */
|
||||
/* module_specific */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* The Auto-Hinter */
|
||||
/* Controlling FreeType Modules */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* auto_hinter */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
/* cff_driver */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* The CFF Driver */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* cff_driver */
|
||||
/* t1_cid_driver */
|
||||
/* tt_driver */
|
||||
/* pcf_driver */
|
||||
/* properties */
|
||||
/* parameter_tags */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
@ -130,3 +123,17 @@
|
||||
/* lcd_filtering */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
/* error_codes */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Error Codes */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* error_enumerations */
|
||||
/* error_code_values */
|
||||
/* */
|
||||
/***************************************************************************/
|
@ -4,7 +4,8 @@
|
||||
/* */
|
||||
/* FreeType API for accessing CID font information (specification). */
|
||||
/* */
|
||||
/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */
|
||||
/* Copyright 2007-2018 by */
|
||||
/* Dereg Clegg and Michael Toftdal. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
@ -15,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTCID_H__
|
||||
#define __FTCID_H__
|
||||
#ifndef FTCID_H_
|
||||
#define FTCID_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -96,8 +97,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Retrieve the type of the input face, CID keyed or not. In
|
||||
* constrast to the @FT_IS_CID_KEYED macro this function returns
|
||||
* successfully also for CID-keyed fonts in an SNFT wrapper.
|
||||
* contrast to the @FT_IS_CID_KEYED macro this function returns
|
||||
* successfully also for CID-keyed fonts in an SFNT wrapper.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
@ -158,9 +159,10 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTCID_H__ */
|
||||
#endif /* FTCID_H_ */
|
||||
|
||||
|
||||
/* END */
|
1225
libs/include/freetype2/freetype/ftdriver.h
Normal file
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType error codes (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,234 +16,265 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
/*******************************************************************/
|
||||
/***** *****/
|
||||
/***** LIST OF ERROR CODES/MESSAGES *****/
|
||||
/***** *****/
|
||||
/*******************************************************************/
|
||||
/*******************************************************************/
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* error_code_values */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Error Code Values */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* All possible error codes returned by FreeType functions. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The list below is taken verbatim from the file `fterrdef.h' */
|
||||
/* (loaded automatically by including `FT_FREETYPE_H'). The first */
|
||||
/* argument of the `FT_ERROR_DEF_' macro is the error label; by */
|
||||
/* default, the prefix `FT_Err_' gets added so that you get error */
|
||||
/* names like `FT_Err_Cannot_Open_Resource'. The second argument is */
|
||||
/* the error code, and the last argument an error string, which is not */
|
||||
/* used by FreeType. */
|
||||
/* */
|
||||
/* Within your application you should *only* use error names and */
|
||||
/* *never* its numeric values! The latter might (and actually do) */
|
||||
/* change in forthcoming FreeType versions. */
|
||||
/* */
|
||||
/* Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero. */
|
||||
/* See the `Error Enumerations' subsection how to automatically */
|
||||
/* generate a list of error strings. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
|
||||
/* including this file. */
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* FT_Err_XXX */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* generic errors */
|
||||
|
||||
FT_NOERRORDEF_( Ok, 0x00, \
|
||||
FT_NOERRORDEF_( Ok, 0x00,
|
||||
"no error" )
|
||||
|
||||
FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \
|
||||
FT_ERRORDEF_( Cannot_Open_Resource, 0x01,
|
||||
"cannot open resource" )
|
||||
FT_ERRORDEF_( Unknown_File_Format, 0x02, \
|
||||
FT_ERRORDEF_( Unknown_File_Format, 0x02,
|
||||
"unknown file format" )
|
||||
FT_ERRORDEF_( Invalid_File_Format, 0x03, \
|
||||
FT_ERRORDEF_( Invalid_File_Format, 0x03,
|
||||
"broken file" )
|
||||
FT_ERRORDEF_( Invalid_Version, 0x04, \
|
||||
FT_ERRORDEF_( Invalid_Version, 0x04,
|
||||
"invalid FreeType version" )
|
||||
FT_ERRORDEF_( Lower_Module_Version, 0x05, \
|
||||
FT_ERRORDEF_( Lower_Module_Version, 0x05,
|
||||
"module version is too low" )
|
||||
FT_ERRORDEF_( Invalid_Argument, 0x06, \
|
||||
FT_ERRORDEF_( Invalid_Argument, 0x06,
|
||||
"invalid argument" )
|
||||
FT_ERRORDEF_( Unimplemented_Feature, 0x07, \
|
||||
FT_ERRORDEF_( Unimplemented_Feature, 0x07,
|
||||
"unimplemented feature" )
|
||||
FT_ERRORDEF_( Invalid_Table, 0x08, \
|
||||
FT_ERRORDEF_( Invalid_Table, 0x08,
|
||||
"broken table" )
|
||||
FT_ERRORDEF_( Invalid_Offset, 0x09, \
|
||||
FT_ERRORDEF_( Invalid_Offset, 0x09,
|
||||
"broken offset within table" )
|
||||
FT_ERRORDEF_( Array_Too_Large, 0x0A, \
|
||||
FT_ERRORDEF_( Array_Too_Large, 0x0A,
|
||||
"array allocation size too large" )
|
||||
FT_ERRORDEF_( Missing_Module, 0x0B, \
|
||||
FT_ERRORDEF_( Missing_Module, 0x0B,
|
||||
"missing module" )
|
||||
FT_ERRORDEF_( Missing_Property, 0x0C, \
|
||||
FT_ERRORDEF_( Missing_Property, 0x0C,
|
||||
"missing property" )
|
||||
|
||||
/* glyph/character errors */
|
||||
|
||||
FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \
|
||||
FT_ERRORDEF_( Invalid_Glyph_Index, 0x10,
|
||||
"invalid glyph index" )
|
||||
FT_ERRORDEF_( Invalid_Character_Code, 0x11, \
|
||||
FT_ERRORDEF_( Invalid_Character_Code, 0x11,
|
||||
"invalid character code" )
|
||||
FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \
|
||||
FT_ERRORDEF_( Invalid_Glyph_Format, 0x12,
|
||||
"unsupported glyph image format" )
|
||||
FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \
|
||||
FT_ERRORDEF_( Cannot_Render_Glyph, 0x13,
|
||||
"cannot render this glyph format" )
|
||||
FT_ERRORDEF_( Invalid_Outline, 0x14, \
|
||||
FT_ERRORDEF_( Invalid_Outline, 0x14,
|
||||
"invalid outline" )
|
||||
FT_ERRORDEF_( Invalid_Composite, 0x15, \
|
||||
FT_ERRORDEF_( Invalid_Composite, 0x15,
|
||||
"invalid composite glyph" )
|
||||
FT_ERRORDEF_( Too_Many_Hints, 0x16, \
|
||||
FT_ERRORDEF_( Too_Many_Hints, 0x16,
|
||||
"too many hints" )
|
||||
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \
|
||||
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17,
|
||||
"invalid pixel size" )
|
||||
|
||||
/* handle errors */
|
||||
|
||||
FT_ERRORDEF_( Invalid_Handle, 0x20, \
|
||||
FT_ERRORDEF_( Invalid_Handle, 0x20,
|
||||
"invalid object handle" )
|
||||
FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \
|
||||
FT_ERRORDEF_( Invalid_Library_Handle, 0x21,
|
||||
"invalid library handle" )
|
||||
FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \
|
||||
FT_ERRORDEF_( Invalid_Driver_Handle, 0x22,
|
||||
"invalid module handle" )
|
||||
FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \
|
||||
FT_ERRORDEF_( Invalid_Face_Handle, 0x23,
|
||||
"invalid face handle" )
|
||||
FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \
|
||||
FT_ERRORDEF_( Invalid_Size_Handle, 0x24,
|
||||
"invalid size handle" )
|
||||
FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \
|
||||
FT_ERRORDEF_( Invalid_Slot_Handle, 0x25,
|
||||
"invalid glyph slot handle" )
|
||||
FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \
|
||||
FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26,
|
||||
"invalid charmap handle" )
|
||||
FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \
|
||||
FT_ERRORDEF_( Invalid_Cache_Handle, 0x27,
|
||||
"invalid cache manager handle" )
|
||||
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \
|
||||
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28,
|
||||
"invalid stream handle" )
|
||||
|
||||
/* driver errors */
|
||||
|
||||
FT_ERRORDEF_( Too_Many_Drivers, 0x30, \
|
||||
FT_ERRORDEF_( Too_Many_Drivers, 0x30,
|
||||
"too many modules" )
|
||||
FT_ERRORDEF_( Too_Many_Extensions, 0x31, \
|
||||
FT_ERRORDEF_( Too_Many_Extensions, 0x31,
|
||||
"too many extensions" )
|
||||
|
||||
/* memory errors */
|
||||
|
||||
FT_ERRORDEF_( Out_Of_Memory, 0x40, \
|
||||
FT_ERRORDEF_( Out_Of_Memory, 0x40,
|
||||
"out of memory" )
|
||||
FT_ERRORDEF_( Unlisted_Object, 0x41, \
|
||||
FT_ERRORDEF_( Unlisted_Object, 0x41,
|
||||
"unlisted object" )
|
||||
|
||||
/* stream errors */
|
||||
|
||||
FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \
|
||||
FT_ERRORDEF_( Cannot_Open_Stream, 0x51,
|
||||
"cannot open stream" )
|
||||
FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \
|
||||
FT_ERRORDEF_( Invalid_Stream_Seek, 0x52,
|
||||
"invalid stream seek" )
|
||||
FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \
|
||||
FT_ERRORDEF_( Invalid_Stream_Skip, 0x53,
|
||||
"invalid stream skip" )
|
||||
FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \
|
||||
FT_ERRORDEF_( Invalid_Stream_Read, 0x54,
|
||||
"invalid stream read" )
|
||||
FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \
|
||||
FT_ERRORDEF_( Invalid_Stream_Operation, 0x55,
|
||||
"invalid stream operation" )
|
||||
FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \
|
||||
FT_ERRORDEF_( Invalid_Frame_Operation, 0x56,
|
||||
"invalid frame operation" )
|
||||
FT_ERRORDEF_( Nested_Frame_Access, 0x57, \
|
||||
FT_ERRORDEF_( Nested_Frame_Access, 0x57,
|
||||
"nested frame access" )
|
||||
FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \
|
||||
FT_ERRORDEF_( Invalid_Frame_Read, 0x58,
|
||||
"invalid frame read" )
|
||||
|
||||
/* raster errors */
|
||||
|
||||
FT_ERRORDEF_( Raster_Uninitialized, 0x60, \
|
||||
FT_ERRORDEF_( Raster_Uninitialized, 0x60,
|
||||
"raster uninitialized" )
|
||||
FT_ERRORDEF_( Raster_Corrupted, 0x61, \
|
||||
FT_ERRORDEF_( Raster_Corrupted, 0x61,
|
||||
"raster corrupted" )
|
||||
FT_ERRORDEF_( Raster_Overflow, 0x62, \
|
||||
FT_ERRORDEF_( Raster_Overflow, 0x62,
|
||||
"raster overflow" )
|
||||
FT_ERRORDEF_( Raster_Negative_Height, 0x63, \
|
||||
FT_ERRORDEF_( Raster_Negative_Height, 0x63,
|
||||
"negative height while rastering" )
|
||||
|
||||
/* cache errors */
|
||||
|
||||
FT_ERRORDEF_( Too_Many_Caches, 0x70, \
|
||||
FT_ERRORDEF_( Too_Many_Caches, 0x70,
|
||||
"too many registered caches" )
|
||||
|
||||
/* TrueType and SFNT errors */
|
||||
|
||||
FT_ERRORDEF_( Invalid_Opcode, 0x80, \
|
||||
FT_ERRORDEF_( Invalid_Opcode, 0x80,
|
||||
"invalid opcode" )
|
||||
FT_ERRORDEF_( Too_Few_Arguments, 0x81, \
|
||||
FT_ERRORDEF_( Too_Few_Arguments, 0x81,
|
||||
"too few arguments" )
|
||||
FT_ERRORDEF_( Stack_Overflow, 0x82, \
|
||||
FT_ERRORDEF_( Stack_Overflow, 0x82,
|
||||
"stack overflow" )
|
||||
FT_ERRORDEF_( Code_Overflow, 0x83, \
|
||||
FT_ERRORDEF_( Code_Overflow, 0x83,
|
||||
"code overflow" )
|
||||
FT_ERRORDEF_( Bad_Argument, 0x84, \
|
||||
FT_ERRORDEF_( Bad_Argument, 0x84,
|
||||
"bad argument" )
|
||||
FT_ERRORDEF_( Divide_By_Zero, 0x85, \
|
||||
FT_ERRORDEF_( Divide_By_Zero, 0x85,
|
||||
"division by zero" )
|
||||
FT_ERRORDEF_( Invalid_Reference, 0x86, \
|
||||
FT_ERRORDEF_( Invalid_Reference, 0x86,
|
||||
"invalid reference" )
|
||||
FT_ERRORDEF_( Debug_OpCode, 0x87, \
|
||||
FT_ERRORDEF_( Debug_OpCode, 0x87,
|
||||
"found debug opcode" )
|
||||
FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \
|
||||
FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88,
|
||||
"found ENDF opcode in execution stream" )
|
||||
FT_ERRORDEF_( Nested_DEFS, 0x89, \
|
||||
FT_ERRORDEF_( Nested_DEFS, 0x89,
|
||||
"nested DEFS" )
|
||||
FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \
|
||||
FT_ERRORDEF_( Invalid_CodeRange, 0x8A,
|
||||
"invalid code range" )
|
||||
FT_ERRORDEF_( Execution_Too_Long, 0x8B, \
|
||||
FT_ERRORDEF_( Execution_Too_Long, 0x8B,
|
||||
"execution context too long" )
|
||||
FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \
|
||||
FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C,
|
||||
"too many function definitions" )
|
||||
FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \
|
||||
FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D,
|
||||
"too many instruction definitions" )
|
||||
FT_ERRORDEF_( Table_Missing, 0x8E, \
|
||||
FT_ERRORDEF_( Table_Missing, 0x8E,
|
||||
"SFNT font table missing" )
|
||||
FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \
|
||||
FT_ERRORDEF_( Horiz_Header_Missing, 0x8F,
|
||||
"horizontal header (hhea) table missing" )
|
||||
FT_ERRORDEF_( Locations_Missing, 0x90, \
|
||||
FT_ERRORDEF_( Locations_Missing, 0x90,
|
||||
"locations (loca) table missing" )
|
||||
FT_ERRORDEF_( Name_Table_Missing, 0x91, \
|
||||
FT_ERRORDEF_( Name_Table_Missing, 0x91,
|
||||
"name table missing" )
|
||||
FT_ERRORDEF_( CMap_Table_Missing, 0x92, \
|
||||
FT_ERRORDEF_( CMap_Table_Missing, 0x92,
|
||||
"character map (cmap) table missing" )
|
||||
FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \
|
||||
FT_ERRORDEF_( Hmtx_Table_Missing, 0x93,
|
||||
"horizontal metrics (hmtx) table missing" )
|
||||
FT_ERRORDEF_( Post_Table_Missing, 0x94, \
|
||||
FT_ERRORDEF_( Post_Table_Missing, 0x94,
|
||||
"PostScript (post) table missing" )
|
||||
FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \
|
||||
FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95,
|
||||
"invalid horizontal metrics" )
|
||||
FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \
|
||||
FT_ERRORDEF_( Invalid_CharMap_Format, 0x96,
|
||||
"invalid character map (cmap) format" )
|
||||
FT_ERRORDEF_( Invalid_PPem, 0x97, \
|
||||
FT_ERRORDEF_( Invalid_PPem, 0x97,
|
||||
"invalid ppem value" )
|
||||
FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \
|
||||
FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98,
|
||||
"invalid vertical metrics" )
|
||||
FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \
|
||||
FT_ERRORDEF_( Could_Not_Find_Context, 0x99,
|
||||
"could not find context" )
|
||||
FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \
|
||||
FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A,
|
||||
"invalid PostScript (post) table format" )
|
||||
FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \
|
||||
FT_ERRORDEF_( Invalid_Post_Table, 0x9B,
|
||||
"invalid PostScript (post) table" )
|
||||
FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C,
|
||||
"found FDEF or IDEF opcode in glyf bytecode" )
|
||||
FT_ERRORDEF_( Missing_Bitmap, 0x9D,
|
||||
"missing bitmap in strike" )
|
||||
|
||||
/* CFF, CID, and Type 1 errors */
|
||||
|
||||
FT_ERRORDEF_( Syntax_Error, 0xA0, \
|
||||
FT_ERRORDEF_( Syntax_Error, 0xA0,
|
||||
"opcode syntax error" )
|
||||
FT_ERRORDEF_( Stack_Underflow, 0xA1, \
|
||||
FT_ERRORDEF_( Stack_Underflow, 0xA1,
|
||||
"argument stack underflow" )
|
||||
FT_ERRORDEF_( Ignore, 0xA2, \
|
||||
FT_ERRORDEF_( Ignore, 0xA2,
|
||||
"ignore" )
|
||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
|
||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3,
|
||||
"no Unicode glyph name found" )
|
||||
FT_ERRORDEF_( Glyph_Too_Big, 0xA4, \
|
||||
"glyph to big for hinting" )
|
||||
FT_ERRORDEF_( Glyph_Too_Big, 0xA4,
|
||||
"glyph too big for hinting" )
|
||||
|
||||
/* BDF errors */
|
||||
|
||||
FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \
|
||||
FT_ERRORDEF_( Missing_Startfont_Field, 0xB0,
|
||||
"`STARTFONT' field missing" )
|
||||
FT_ERRORDEF_( Missing_Font_Field, 0xB1, \
|
||||
FT_ERRORDEF_( Missing_Font_Field, 0xB1,
|
||||
"`FONT' field missing" )
|
||||
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
|
||||
FT_ERRORDEF_( Missing_Size_Field, 0xB2,
|
||||
"`SIZE' field missing" )
|
||||
FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
|
||||
FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3,
|
||||
"`FONTBOUNDINGBOX' field missing" )
|
||||
FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
|
||||
FT_ERRORDEF_( Missing_Chars_Field, 0xB4,
|
||||
"`CHARS' field missing" )
|
||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
|
||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5,
|
||||
"`STARTCHAR' field missing" )
|
||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
|
||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6,
|
||||
"`ENCODING' field missing" )
|
||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
|
||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7,
|
||||
"`BBX' field missing" )
|
||||
FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
|
||||
FT_ERRORDEF_( Bbx_Too_Big, 0xB8,
|
||||
"`BBX' too big" )
|
||||
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
|
||||
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9,
|
||||
"Font header corrupted or missing fields" )
|
||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
|
||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA,
|
||||
"Font glyphs corrupted or missing fields" )
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType error code handling (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2002, 2004, 2007, 2013 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -18,56 +18,70 @@
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This special header file is used to define the handling of FT2 */
|
||||
/* enumeration constants. It can also be used to generate error message */
|
||||
/* strings with a small macro trick explained below. */
|
||||
/* <Section> */
|
||||
/* error_enumerations */
|
||||
/* */
|
||||
/* I - Error Formats */
|
||||
/* ----------------- */
|
||||
/* <Title> */
|
||||
/* Error Enumerations */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* How to handle errors and error strings. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The header file `fterrors.h' (which is automatically included by */
|
||||
/* `freetype.h' defines the handling of FreeType's enumeration */
|
||||
/* constants. It can also be used to generate error message strings */
|
||||
/* with a small macro trick explained below. */
|
||||
/* */
|
||||
/* *Error* *Formats* */
|
||||
/* */
|
||||
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
|
||||
/* defined in ftoption.h in order to make the higher byte indicate */
|
||||
/* 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). See the file `ftmoderr.h' for */
|
||||
/* more details. */
|
||||
/* with standard builds of FreeType~2, however). See the file */
|
||||
/* `ftmoderr.h' for more details. */
|
||||
/* */
|
||||
/* *Error* *Message* *Strings* */
|
||||
/* */
|
||||
/* II - Error Message strings */
|
||||
/* -------------------------- */
|
||||
/* */
|
||||
/* The error definitions below are made through special macros that */
|
||||
/* allow client applications to build a table of error message strings */
|
||||
/* if they need it. The strings are not included in a normal build of */
|
||||
/* FreeType 2 to save space (most client applications do not use */
|
||||
/* them). */
|
||||
/* Error definitions are set up with special macros that allow client */
|
||||
/* applications to build a table of error message strings. The */
|
||||
/* strings are not included in a normal build of FreeType~2 to save */
|
||||
/* space (most client applications do not use them). */
|
||||
/* */
|
||||
/* To do so, you have to define the following macros before including */
|
||||
/* this file: */
|
||||
/* */
|
||||
/* FT_ERROR_START_LIST :: */
|
||||
/* This macro is called before anything else to define the start of */
|
||||
/* the error list. It is followed by several FT_ERROR_DEF calls */
|
||||
/* (see below). */
|
||||
/* */
|
||||
/* FT_ERROR_DEF( e, v, s ) :: */
|
||||
/* This macro is called to define one single error. */
|
||||
/* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */
|
||||
/* `v' is the error numerical value. */
|
||||
/* `s' is the corresponding error string. */
|
||||
/* */
|
||||
/* FT_ERROR_END_LIST :: */
|
||||
/* This macro ends the list. */
|
||||
/* */
|
||||
/* Additionally, you have to undefine __FTERRORS_H__ before #including */
|
||||
/* this file. */
|
||||
/* */
|
||||
/* Here is a simple example: */
|
||||
/* { */
|
||||
/* FT_ERROR_START_LIST */
|
||||
/* } */
|
||||
/* */
|
||||
/* This macro is called before anything else to define the start of */
|
||||
/* the error list. It is followed by several FT_ERROR_DEF calls. */
|
||||
/* */
|
||||
/* { */
|
||||
/* #undef __FTERRORS_H__ */
|
||||
/* FT_ERROR_DEF( e, v, s ) */
|
||||
/* } */
|
||||
/* */
|
||||
/* This macro is called to define one single error. `e' is the error */
|
||||
/* code identifier (e.g., `Invalid_Argument'), `v' is the error's */
|
||||
/* numerical value, and `s' is the corresponding error string. */
|
||||
/* */
|
||||
/* { */
|
||||
/* FT_ERROR_END_LIST */
|
||||
/* } */
|
||||
/* */
|
||||
/* This macro ends the list. */
|
||||
/* */
|
||||
/* Additionally, you have to undefine `FTERRORS_H_' before #including */
|
||||
/* this file. */
|
||||
/* */
|
||||
/* Here is a simple example. */
|
||||
/* */
|
||||
/* { */
|
||||
/* #undef FTERRORS_H_ */
|
||||
/* #define FT_ERRORDEF( e, v, s ) { e, s }, */
|
||||
/* #define FT_ERROR_START_LIST { */
|
||||
/* #define FT_ERROR_END_LIST { 0, 0 } }; */
|
||||
/* #define FT_ERROR_END_LIST { 0, NULL } }; */
|
||||
/* */
|
||||
/* const struct */
|
||||
/* { */
|
||||
@ -78,10 +92,24 @@
|
||||
/* #include FT_ERRORS_H */
|
||||
/* } */
|
||||
/* */
|
||||
/* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with */
|
||||
/* `FT_NOERRORDEF'; it is always zero. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* */
|
||||
|
||||
#ifndef __FTERRORS_H__
|
||||
/* In previous FreeType versions we used `__FTERRORS_H__'. However, */
|
||||
/* using two successive underscores in a non-system symbol name */
|
||||
/* violates the C (and C++) standard, so it was changed to the */
|
||||
/* current form. In spite of this, we have to make */
|
||||
/* */
|
||||
/* #undefine __FTERRORS_H__ */
|
||||
/* */
|
||||
/* work for backward compatibility. */
|
||||
/* */
|
||||
#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
|
||||
#define FTERRORS_H_
|
||||
#define __FTERRORS_H__
|
||||
|
||||
|
||||
@ -192,7 +220,7 @@
|
||||
#undef FT_ERR_PREFIX
|
||||
#endif
|
||||
|
||||
#endif /* __FTERRORS_H__ */
|
||||
#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
|
||||
|
||||
|
||||
/* END */
|
@ -1,10 +1,10 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftxf86.h */
|
||||
/* ftfntfmt.h */
|
||||
/* */
|
||||
/* Support functions for X11. */
|
||||
/* Support functions for font formats. */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2007 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTXF86_H__
|
||||
#define __FTXF86_H__
|
||||
#ifndef FTFNTFMT_H_
|
||||
#define FTFNTFMT_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -49,22 +49,20 @@ FT_BEGIN_HEADER
|
||||
/* however, there are special cases (like in PDF devices) where it is */
|
||||
/* important to differentiate, in spite of FreeType's uniform API. */
|
||||
/* */
|
||||
/* This function is in the X11/xf86 namespace for historical reasons */
|
||||
/* and in no way depends on that windowing system. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_X11_Font_Format */
|
||||
/* FT_Get_Font_Format */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return a string describing the format of a given face, using values */
|
||||
/* which can be used as an X11 FONT_PROPERTY. Possible values are */
|
||||
/* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
|
||||
/* `PFR', and `Windows~FNT'. */
|
||||
/* Return a string describing the format of a given face. Possible */
|
||||
/* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */
|
||||
/* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */
|
||||
/* */
|
||||
/* The return value is suitable to be used as an X11 FONT_PROPERTY. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: */
|
||||
@ -73,11 +71,25 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* Font format string. NULL in case of error. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* A deprecated name for the same function is */
|
||||
/* `FT_Get_X11_Font_Format'. */
|
||||
/* */
|
||||
FT_EXPORT( const char* )
|
||||
FT_Get_Font_Format( FT_Face face );
|
||||
|
||||
|
||||
/* deprecated */
|
||||
FT_EXPORT( const char* )
|
||||
FT_Get_X11_Font_Format( FT_Face face );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTXF86_H__ */
|
||||
#endif /* FTFNTFMT_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Access of TrueType's `gasp' table (specification). */
|
||||
/* */
|
||||
/* Copyright 2007, 2008, 2011 by */
|
||||
/* Copyright 2007-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef _FT_GASP_H_
|
||||
#define _FT_GASP_H_
|
||||
#ifndef FTGASP_H_
|
||||
#define FTGASP_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -29,6 +29,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @section:
|
||||
@ -92,8 +95,8 @@
|
||||
#define FT_GASP_NO_TABLE -1
|
||||
#define FT_GASP_DO_GRIDFIT 0x01
|
||||
#define FT_GASP_DO_GRAY 0x02
|
||||
#define FT_GASP_SYMMETRIC_GRIDFIT 0x04
|
||||
#define FT_GASP_SYMMETRIC_SMOOTHING 0x08
|
||||
#define FT_GASP_SYMMETRIC_GRIDFIT 0x10
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@ -102,17 +105,25 @@
|
||||
* FT_Get_Gasp
|
||||
*
|
||||
* @description:
|
||||
* Read the `gasp' table from a TrueType or OpenType font file and
|
||||
* return the entry corresponding to a given character pixel size.
|
||||
* For a TrueType or OpenType font file, return the rasterizer behaviour
|
||||
* flags from the font's `gasp' table corresponding to a given
|
||||
* character pixel size.
|
||||
*
|
||||
* @input:
|
||||
* face :: The source face handle.
|
||||
*
|
||||
* ppem :: The vertical character pixel size.
|
||||
*
|
||||
* @return:
|
||||
* Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
|
||||
* `gasp' table in the face.
|
||||
*
|
||||
* @note:
|
||||
* If you want to use the MM functionality of OpenType variation fonts
|
||||
* (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this
|
||||
* function *after* setting an instance since the return values can
|
||||
* change.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.0
|
||||
*/
|
||||
@ -122,7 +133,10 @@
|
||||
|
||||
/* */
|
||||
|
||||
#endif /* _FT_GASP_H_ */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTGASP_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType convenience functions to handle glyphs (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -29,8 +29,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTGLYPH_H__
|
||||
#define __FTGLYPH_H__
|
||||
#ifndef FTGLYPH_H_
|
||||
#define FTGLYPH_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -231,6 +231,12 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Because `*aglyph->advance.x' and '*aglyph->advance.y' are 16.16 */
|
||||
/* fixed-point numbers, `slot->advance.x' and `slot->advance.y' */
|
||||
/* (which are in 26.6 fixed-point format) must be in the range */
|
||||
/* ]-32768;32768[. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Glyph( FT_GlyphSlot slot,
|
||||
FT_Glyph *aglyph );
|
||||
@ -325,22 +331,8 @@ FT_BEGIN_HEADER
|
||||
} FT_Glyph_BBox_Mode;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* ft_glyph_bbox_xxx */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* These constants are deprecated. Use the corresponding */
|
||||
/* @FT_Glyph_BBox_Mode values instead. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */
|
||||
/* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */
|
||||
/* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */
|
||||
/* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */
|
||||
/* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */
|
||||
/* */
|
||||
/* these constants are deprecated; use the corresponding */
|
||||
/* `FT_Glyph_BBox_Mode' values instead */
|
||||
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
|
||||
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
|
||||
#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
|
||||
@ -355,20 +347,20 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return a glyph's `control box'. The control box encloses all the */
|
||||
/* outline's points, including Bézier control points. Though it */
|
||||
/* outline's points, including Bezier control points. Though it */
|
||||
/* coincides with the exact bounding box for most glyphs, it can be */
|
||||
/* slightly larger in some situations (like when rotating an outline */
|
||||
/* which contains Bézier outside arcs). */
|
||||
/* that contains Bezier outside arcs). */
|
||||
/* */
|
||||
/* Computing the control box is very fast, while getting the bounding */
|
||||
/* box can take much more time as it needs to walk over all segments */
|
||||
/* and arcs in the outline. To get the latter, you can use the */
|
||||
/* `ftbbox' component which is dedicated to this single task. */
|
||||
/* `ftbbox' component, which is dedicated to this single task. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* glyph :: A handle to the source glyph object. */
|
||||
/* */
|
||||
/* mode :: The mode which indicates how to interpret the returned */
|
||||
/* mode :: The mode that indicates how to interpret the returned */
|
||||
/* bounding box values. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
@ -388,7 +380,7 @@ FT_BEGIN_HEADER
|
||||
/* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
|
||||
/* reasonable values for the CBox it is necessary to load the glyph */
|
||||
/* at a large ppem value (so that the hinting instructions can */
|
||||
/* properly shift and scale the subglyphs), then extracting the CBox */
|
||||
/* properly shift and scale the subglyphs), then extracting the CBox, */
|
||||
/* which can be eventually converted back to font units. */
|
||||
/* */
|
||||
/* Note that the maximum coordinates are exclusive, which means that */
|
||||
@ -467,7 +459,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* */
|
||||
/* // load glyph */
|
||||
/* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */
|
||||
/* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); */
|
||||
/* */
|
||||
/* // extract glyph image */
|
||||
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
|
||||
@ -580,6 +572,9 @@ FT_BEGIN_HEADER
|
||||
/* <Note> */
|
||||
/* The result is undefined if either `a' or `b' is zero. */
|
||||
/* */
|
||||
/* Since the function uses wrap-around arithmetic, results become */
|
||||
/* meaningless if the arguments are very large. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Matrix_Multiply( const FT_Matrix* a,
|
||||
FT_Matrix* b );
|
||||
@ -603,13 +598,12 @@ FT_BEGIN_HEADER
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Matrix_Invert( FT_Matrix* matrix );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTGLYPH_H__ */
|
||||
#endif /* FTGLYPH_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
|
||||
/* */
|
||||
/* Copyright 2004, 2005, 2006 by */
|
||||
/* Copyright 2004-2018 by */
|
||||
/* Masatake YAMATO, Redhat K.K, */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
@ -25,8 +25,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTGXVAL_H__
|
||||
#define __FTGXVAL_H__
|
||||
#ifndef FTGXVAL_H_
|
||||
#define FTGXVAL_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -57,9 +57,19 @@ FT_BEGIN_HEADER
|
||||
/* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */
|
||||
/* trak, prop, lcar). */
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* FT_TrueTypeGX_Validate */
|
||||
/* FT_TrueTypeGX_Free */
|
||||
/* */
|
||||
/* FT_ClassicKern_Validate */
|
||||
/* FT_ClassicKern_Free */
|
||||
/* */
|
||||
/* FT_VALIDATE_GX_LENGTH */
|
||||
/* FT_VALIDATE_GXXXX */
|
||||
/* FT_VALIDATE_CKERNXXX */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* */
|
||||
@ -171,8 +181,6 @@ FT_BEGIN_HEADER
|
||||
FT_VALIDATE_lcar )
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
@ -180,7 +188,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Validate various TrueTypeGX tables to assure that all offsets and
|
||||
* indices are valid. The idea is that a higher-level library which
|
||||
* indices are valid. The idea is that a higher-level library that
|
||||
* actually does the text layout can access those tables without
|
||||
* error checking (which can be quite time consuming).
|
||||
*
|
||||
@ -189,7 +197,7 @@ FT_BEGIN_HEADER
|
||||
* A handle to the input face.
|
||||
*
|
||||
* validation_flags ::
|
||||
* A bit field which specifies the tables to be validated. See
|
||||
* A bit field that specifies the tables to be validated. See
|
||||
* @FT_VALIDATE_GXXXX for possible values.
|
||||
*
|
||||
* table_length ::
|
||||
@ -221,8 +229,6 @@ FT_BEGIN_HEADER
|
||||
FT_UInt table_length );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
@ -248,8 +254,6 @@ FT_BEGIN_HEADER
|
||||
FT_Bytes table );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
@ -277,8 +281,6 @@ FT_BEGIN_HEADER
|
||||
#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
@ -286,7 +288,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Validate classic (16-bit format) kern table to assure that the offsets
|
||||
* and indices are valid. The idea is that a higher-level library which
|
||||
* and indices are valid. The idea is that a higher-level library that
|
||||
* actually does the text layout can access those tables without error
|
||||
* checking (which can be quite time consuming).
|
||||
*
|
||||
@ -299,7 +301,7 @@ FT_BEGIN_HEADER
|
||||
* A handle to the input face.
|
||||
*
|
||||
* validation_flags ::
|
||||
* A bit field which specifies the dialect to be validated. See
|
||||
* A bit field that specifies the dialect to be validated. See
|
||||
* @FT_VALIDATE_CKERNXXX for possible values.
|
||||
*
|
||||
* @output:
|
||||
@ -320,8 +322,6 @@ FT_BEGIN_HEADER
|
||||
FT_Bytes *ckern_table );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
@ -346,13 +346,12 @@ FT_BEGIN_HEADER
|
||||
FT_ClassicKern_Free( FT_Face face,
|
||||
FT_Bytes table );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTGXVAL_H__ */
|
||||
#endif /* FTGXVAL_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Gzip-compressed stream support. */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2006 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTGZIP_H__
|
||||
#define __FTGZIP_H__
|
||||
#ifndef FTGZIP_H_
|
||||
#define FTGZIP_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -91,12 +91,61 @@ FT_BEGIN_HEADER
|
||||
FT_Stream_OpenGzip( FT_Stream stream,
|
||||
FT_Stream source );
|
||||
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Gzip_Uncompress
|
||||
*
|
||||
* @description:
|
||||
* Decompress a zipped input buffer into an output buffer. This function
|
||||
* is modeled after zlib's `uncompress' function.
|
||||
*
|
||||
* @input:
|
||||
* memory ::
|
||||
* A FreeType memory handle.
|
||||
*
|
||||
* input ::
|
||||
* The input buffer.
|
||||
*
|
||||
* input_len ::
|
||||
* The length of the input buffer.
|
||||
*
|
||||
* @output:
|
||||
* output::
|
||||
* The output buffer.
|
||||
*
|
||||
* @inout:
|
||||
* output_len ::
|
||||
* Before calling the function, this is the total size of the output
|
||||
* buffer, which must be large enough to hold the entire uncompressed
|
||||
* data (so the size of the uncompressed data must be known in
|
||||
* advance). After calling the function, `output_len' is the size of
|
||||
* the used data in `output'.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* This function may return `FT_Err_Unimplemented_Feature' if your build
|
||||
* of FreeType was not compiled with zlib support.
|
||||
*
|
||||
* @since:
|
||||
* 2.5.1
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Gzip_Uncompress( FT_Memory memory,
|
||||
FT_Byte* output,
|
||||
FT_ULong* output_len,
|
||||
const FT_Byte* input,
|
||||
FT_ULong input_len );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTGZIP_H__ */
|
||||
#endif /* FTGZIP_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,8 +5,7 @@
|
||||
/* FreeType glyph image formats and default raster interface */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
|
||||
/* 2010 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -25,12 +24,12 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTIMAGE_H__
|
||||
#define __FTIMAGE_H__
|
||||
#ifndef FTIMAGE_H_
|
||||
#define FTIMAGE_H_
|
||||
|
||||
|
||||
/* _STANDALONE_ is from ftgrays.c */
|
||||
#ifndef _STANDALONE_
|
||||
/* STANDALONE_ is from ftgrays.c */
|
||||
#ifndef STANDALONE_
|
||||
#include <ft2build.h>
|
||||
#endif
|
||||
|
||||
@ -169,6 +168,15 @@ FT_BEGIN_HEADER
|
||||
/* times taller than the original glyph image. See also */
|
||||
/* @FT_RENDER_MODE_LCD_V. */
|
||||
/* */
|
||||
/* FT_PIXEL_MODE_BGRA :: */
|
||||
/* [Since 2.5] An image with four 8-bit channels per pixel, */
|
||||
/* representing a color image (such as emoticons) with alpha */
|
||||
/* channel. For each pixel, the format is BGRA, which means, the */
|
||||
/* blue channel comes first in memory. The color channels are */
|
||||
/* pre-multiplied and in the sRGB colorspace. For example, full */
|
||||
/* red at half-translucent opacity will be represented as */
|
||||
/* `00,00,80,80', not `00,00,FF,80'. See also @FT_LOAD_COLOR. */
|
||||
/* */
|
||||
typedef enum FT_Pixel_Mode_
|
||||
{
|
||||
FT_PIXEL_MODE_NONE = 0,
|
||||
@ -178,73 +186,21 @@ FT_BEGIN_HEADER
|
||||
FT_PIXEL_MODE_GRAY4,
|
||||
FT_PIXEL_MODE_LCD,
|
||||
FT_PIXEL_MODE_LCD_V,
|
||||
FT_PIXEL_MODE_BGRA,
|
||||
|
||||
FT_PIXEL_MODE_MAX /* do not remove */
|
||||
|
||||
} FT_Pixel_Mode;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* ft_pixel_mode_xxx */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of deprecated constants. Use the corresponding */
|
||||
/* @FT_Pixel_Mode values instead. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */
|
||||
/* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */
|
||||
/* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */
|
||||
/* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */
|
||||
/* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */
|
||||
/* */
|
||||
/* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */
|
||||
/* values instead. */
|
||||
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
|
||||
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
|
||||
#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
|
||||
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
|
||||
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
|
||||
|
||||
/* */
|
||||
|
||||
#if 0
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* FT_Palette_Mode */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* THIS TYPE IS DEPRECATED. DO NOT USE IT! */
|
||||
/* */
|
||||
/* An enumeration type to describe the format of a bitmap palette, */
|
||||
/* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */
|
||||
/* records. */
|
||||
/* */
|
||||
/* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */
|
||||
/* records. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */
|
||||
/* FreeType, these types are not handled by the library itself. */
|
||||
/* */
|
||||
typedef enum FT_Palette_Mode_
|
||||
{
|
||||
ft_palette_mode_rgb = 0,
|
||||
ft_palette_mode_rgba,
|
||||
|
||||
ft_palette_mode_max /* do not remove */
|
||||
|
||||
} FT_Palette_Mode;
|
||||
|
||||
/* */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -302,20 +258,15 @@ FT_BEGIN_HEADER
|
||||
/* field is intended for paletted pixel modes. Not */
|
||||
/* used currently. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* For now, the only pixel modes supported by FreeType are mono and */
|
||||
/* grays. However, drivers might be added in the future to support */
|
||||
/* more `colorful' options. */
|
||||
/* */
|
||||
typedef struct FT_Bitmap_
|
||||
{
|
||||
int rows;
|
||||
int width;
|
||||
unsigned int rows;
|
||||
unsigned int width;
|
||||
int pitch;
|
||||
unsigned char* buffer;
|
||||
short num_grays;
|
||||
char pixel_mode;
|
||||
char palette_mode;
|
||||
unsigned short num_grays;
|
||||
unsigned char pixel_mode;
|
||||
unsigned char palette_mode;
|
||||
void* palette;
|
||||
|
||||
} FT_Bitmap;
|
||||
@ -350,11 +301,11 @@ FT_BEGIN_HEADER
|
||||
/* each outline point's type. */
|
||||
/* */
|
||||
/* If bit~0 is unset, the point is `off' the curve, */
|
||||
/* i.e., a Bézier control point, while it is `on' if */
|
||||
/* i.e., a Bezier control point, while it is `on' if */
|
||||
/* set. */
|
||||
/* */
|
||||
/* Bit~1 is meaningful for `off' points only. If set, */
|
||||
/* it indicates a third-order Bézier arc control point; */
|
||||
/* it indicates a third-order Bezier arc control point; */
|
||||
/* and a second-order control point if unset. */
|
||||
/* */
|
||||
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
|
||||
@ -372,7 +323,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* flags :: A set of bit flags used to characterize the outline */
|
||||
/* and give hints to the scan-converter and hinter on */
|
||||
/* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */
|
||||
/* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
|
||||
@ -393,6 +344,8 @@ FT_BEGIN_HEADER
|
||||
|
||||
} FT_Outline;
|
||||
|
||||
/* */
|
||||
|
||||
/* Following limits must be consistent with */
|
||||
/* FT_Outline.{n_contours,n_points} */
|
||||
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
|
||||
@ -402,7 +355,7 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* FT_OUTLINE_FLAGS */
|
||||
/* FT_OUTLINE_XXX */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of bit-field constants use for the flags in an outline's */
|
||||
@ -483,24 +436,8 @@ FT_BEGIN_HEADER
|
||||
#define FT_OUTLINE_SINGLE_PASS 0x200
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* ft_outline_flags
|
||||
*
|
||||
* @description:
|
||||
* These constants are deprecated. Please use the corresponding
|
||||
* @FT_OUTLINE_FLAGS values.
|
||||
*
|
||||
* @values:
|
||||
* ft_outline_none :: See @FT_OUTLINE_NONE.
|
||||
* ft_outline_owner :: See @FT_OUTLINE_OWNER.
|
||||
* ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL.
|
||||
* ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL.
|
||||
* ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
|
||||
* ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION.
|
||||
* ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS.
|
||||
*/
|
||||
/* these constants are deprecated; use the corresponding */
|
||||
/* `FT_OUTLINE_XXX' values instead */
|
||||
#define ft_outline_none FT_OUTLINE_NONE
|
||||
#define ft_outline_owner FT_OUTLINE_OWNER
|
||||
#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
|
||||
@ -546,7 +483,7 @@ FT_BEGIN_HEADER
|
||||
/* <Input> */
|
||||
/* to :: A pointer to the target point of the `move to'. */
|
||||
/* */
|
||||
/* user :: A typeless pointer which is passed from the caller of the */
|
||||
/* user :: A typeless pointer, which is passed from the caller of the */
|
||||
/* decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -573,7 +510,7 @@ FT_BEGIN_HEADER
|
||||
/* <Input> */
|
||||
/* to :: A pointer to the target point of the `line to'. */
|
||||
/* */
|
||||
/* user :: A typeless pointer which is passed from the caller of the */
|
||||
/* user :: A typeless pointer, which is passed from the caller of the */
|
||||
/* decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -595,7 +532,7 @@ FT_BEGIN_HEADER
|
||||
/* A function pointer type used to describe the signature of a `conic */
|
||||
/* to' function during outline walking or decomposition. */
|
||||
/* */
|
||||
/* A `conic to' is emitted to indicate a second-order Bézier arc in */
|
||||
/* A `conic to' is emitted to indicate a second-order Bezier arc in */
|
||||
/* the outline. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -604,7 +541,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* to :: A pointer to the target end point of the conic arc. */
|
||||
/* */
|
||||
/* user :: A typeless pointer which is passed from the caller of */
|
||||
/* user :: A typeless pointer, which is passed from the caller of */
|
||||
/* the decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -627,16 +564,16 @@ FT_BEGIN_HEADER
|
||||
/* A function pointer type used to describe the signature of a `cubic */
|
||||
/* to' function during outline walking or decomposition. */
|
||||
/* */
|
||||
/* A `cubic to' is emitted to indicate a third-order Bézier arc. */
|
||||
/* A `cubic to' is emitted to indicate a third-order Bezier arc. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* control1 :: A pointer to the first Bézier control point. */
|
||||
/* control1 :: A pointer to the first Bezier control point. */
|
||||
/* */
|
||||
/* control2 :: A pointer to the second Bézier control point. */
|
||||
/* control2 :: A pointer to the second Bezier control point. */
|
||||
/* */
|
||||
/* to :: A pointer to the target end point. */
|
||||
/* */
|
||||
/* user :: A typeless pointer which is passed from the caller of */
|
||||
/* user :: A typeless pointer, which is passed from the caller of */
|
||||
/* the decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -658,16 +595,16 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to hold various function pointers used during outline */
|
||||
/* decomposition in order to emit segments, conic, and cubic Béziers. */
|
||||
/* decomposition in order to emit segments, conic, and cubic Beziers. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* move_to :: The `move to' emitter. */
|
||||
/* */
|
||||
/* line_to :: The segment emitter. */
|
||||
/* */
|
||||
/* conic_to :: The second-order Bézier arc emitter. */
|
||||
/* conic_to :: The second-order Bezier arc emitter. */
|
||||
/* */
|
||||
/* cubic_to :: The third-order Bézier arc emitter. */
|
||||
/* cubic_to :: The third-order Bezier arc emitter. */
|
||||
/* */
|
||||
/* shift :: The shift that is applied to coordinates before they */
|
||||
/* are sent to the emitter. */
|
||||
@ -682,7 +619,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* { */
|
||||
/* x' = (x << shift) - delta */
|
||||
/* y' = (x << shift) - delta */
|
||||
/* y' = (y << shift) - delta */
|
||||
/* } */
|
||||
/* */
|
||||
/* Set the values of `shift' and `delta' to~0 to get the original */
|
||||
@ -764,7 +701,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* FT_GLYPH_FORMAT_OUTLINE :: */
|
||||
/* The glyph image is a vectorial outline made of line segments */
|
||||
/* and Bézier arcs; it can be described as an @FT_Outline; you */
|
||||
/* and Bezier arcs; it can be described as an @FT_Outline; you */
|
||||
/* generally want to access the `outline' field of the */
|
||||
/* @FT_GlyphSlotRec structure to read it. */
|
||||
/* */
|
||||
@ -787,22 +724,8 @@ FT_BEGIN_HEADER
|
||||
} FT_Glyph_Format;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* ft_glyph_format_xxx */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of deprecated constants. Use the corresponding */
|
||||
/* @FT_Glyph_Format values instead. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */
|
||||
/* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */
|
||||
/* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */
|
||||
/* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */
|
||||
/* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */
|
||||
/* */
|
||||
/* these constants are deprecated; use the corresponding */
|
||||
/* `FT_Glyph_Format' values instead. */
|
||||
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
|
||||
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
|
||||
#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
|
||||
@ -824,11 +747,11 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* A raster is a scan converter, in charge of rendering an outline into */
|
||||
/* a a bitmap. This section contains the public API for rasters. */
|
||||
/* a bitmap. This section contains the public API for rasters. */
|
||||
/* */
|
||||
/* Note that in FreeType 2, all rasters are now encapsulated within */
|
||||
/* specific modules called `renderers'. See `freetype/ftrender.h' for */
|
||||
/* more details on renderers. */
|
||||
/* specific modules called `renderers'. See `ftrender.h' for more */
|
||||
/* details on renderers. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -847,6 +770,21 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* This section contains technical definitions. */
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* FT_Raster */
|
||||
/* FT_Span */
|
||||
/* FT_SpanFunc */
|
||||
/* */
|
||||
/* FT_Raster_Params */
|
||||
/* FT_RASTER_FLAG_XXX */
|
||||
/* */
|
||||
/* FT_Raster_NewFunc */
|
||||
/* FT_Raster_DoneFunc */
|
||||
/* FT_Raster_ResetFunc */
|
||||
/* FT_Raster_SetModeFunc */
|
||||
/* FT_Raster_RenderFunc */
|
||||
/* FT_Raster_Funcs */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
@ -856,8 +794,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Raster */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A handle (pointer) to a raster object. Each object can be used */
|
||||
/* independently to convert an outline into a bitmap or pixmap. */
|
||||
/* An opaque handle (pointer) to a raster object. Each object can be */
|
||||
/* used independently to convert an outline into a bitmap or pixmap. */
|
||||
/* */
|
||||
typedef struct FT_RasterRec_* FT_Raster;
|
||||
|
||||
@ -868,8 +806,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Span */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a single span of gray (or black) pixels */
|
||||
/* when rendering a monochrome or anti-aliased bitmap. */
|
||||
/* A structure used to model a single span of gray pixels when */
|
||||
/* rendering an anti-aliased bitmap. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* x :: The span's horizontal start position. */
|
||||
@ -877,13 +815,12 @@ FT_BEGIN_HEADER
|
||||
/* len :: The span's length in pixels. */
|
||||
/* */
|
||||
/* coverage :: The span color/coverage, ranging from 0 (background) */
|
||||
/* to 255 (foreground). Only used for anti-aliased */
|
||||
/* rendering. */
|
||||
/* to 255 (foreground). */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* This structure is used by the span drawing callback type named */
|
||||
/* @FT_SpanFunc which takes the y~coordinate of the span as a */
|
||||
/* a parameter. */
|
||||
/* @FT_SpanFunc that takes the y~coordinate of the span as a */
|
||||
/* parameter. */
|
||||
/* */
|
||||
/* The coverage value is always between 0 and 255. If you want less */
|
||||
/* gray values, the callback function has to reduce them. */
|
||||
@ -923,16 +860,6 @@ FT_BEGIN_HEADER
|
||||
/* This can be used to write anti-aliased outlines directly to a */
|
||||
/* given background bitmap, and even perform translucency. */
|
||||
/* */
|
||||
/* Note that the `count' field cannot be greater than a fixed value */
|
||||
/* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */
|
||||
/* `ftoption.h'. By default, this value is set to~32, which means */
|
||||
/* that if there are more than 32~spans on a given scanline, the */
|
||||
/* callback is called several times with the same `y' parameter in */
|
||||
/* order to draw all callbacks. */
|
||||
/* */
|
||||
/* Otherwise, the callback is only called once per scan-line, and */
|
||||
/* only for those scanlines that do have `gray' pixels on them. */
|
||||
/* */
|
||||
typedef void
|
||||
(*FT_SpanFunc)( int y,
|
||||
int count,
|
||||
@ -948,22 +875,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Raster_BitTest_Func */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
|
||||
/* */
|
||||
/* A function used as a call-back by the monochrome scan-converter */
|
||||
/* to test whether a given target pixel is already set to the drawing */
|
||||
/* `color'. These tests are crucial to implement drop-out control */
|
||||
/* per-se the TrueType spec. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* y :: The pixel's y~coordinate. */
|
||||
/* */
|
||||
/* x :: The pixel's x~coordinate. */
|
||||
/* */
|
||||
/* user :: User-supplied data that is passed to the callback. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* 1~if the pixel is `set', 0~otherwise. */
|
||||
/* Deprecated, unimplemented. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Raster_BitTest_Func)( int y,
|
||||
@ -977,21 +889,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Raster_BitSet_Func */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
|
||||
/* */
|
||||
/* A function used as a call-back by the monochrome scan-converter */
|
||||
/* to set an individual target pixel. This is crucial to implement */
|
||||
/* drop-out control according to the TrueType specification. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* y :: The pixel's y~coordinate. */
|
||||
/* */
|
||||
/* x :: The pixel's x~coordinate. */
|
||||
/* */
|
||||
/* user :: User-supplied data that is passed to the callback. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* 1~if the pixel is `set', 0~otherwise. */
|
||||
/* Deprecated, unimplemented. */
|
||||
/* */
|
||||
typedef void
|
||||
(*FT_Raster_BitSet_Func)( int y,
|
||||
@ -1025,8 +923,8 @@ FT_BEGIN_HEADER
|
||||
/* pixmap's buffer _must_ be zeroed before */
|
||||
/* rendering. */
|
||||
/* */
|
||||
/* Note that for now, direct rendering is */
|
||||
/* only possible with anti-aliased glyphs. */
|
||||
/* Direct rendering is only possible with */
|
||||
/* anti-aliased glyphs. */
|
||||
/* */
|
||||
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
|
||||
/* rendering mode. If set, the output will */
|
||||
@ -1044,7 +942,8 @@ FT_BEGIN_HEADER
|
||||
#define FT_RASTER_FLAG_DIRECT 0x2
|
||||
#define FT_RASTER_FLAG_CLIP 0x4
|
||||
|
||||
/* deprecated */
|
||||
/* these constants are deprecated; use the corresponding */
|
||||
/* `FT_RASTER_FLAG_XXX' values instead */
|
||||
#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
|
||||
#define ft_raster_flag_aa FT_RASTER_FLAG_AA
|
||||
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
|
||||
@ -1070,11 +969,11 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* gray_spans :: The gray span drawing callback. */
|
||||
/* */
|
||||
/* black_spans :: The black span drawing callback. UNIMPLEMENTED! */
|
||||
/* black_spans :: Unused. */
|
||||
/* */
|
||||
/* bit_test :: The bit test callback. UNIMPLEMENTED! */
|
||||
/* bit_test :: Unused. */
|
||||
/* */
|
||||
/* bit_set :: The bit set callback. UNIMPLEMENTED! */
|
||||
/* bit_set :: Unused. */
|
||||
/* */
|
||||
/* user :: User-supplied data that is passed to each drawing */
|
||||
/* callback. */
|
||||
@ -1091,15 +990,9 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
|
||||
/* raster will call the `gray_spans' callback to draw gray pixel */
|
||||
/* spans, in the case of an aa glyph bitmap, it will call */
|
||||
/* `black_spans', and `bit_test' and `bit_set' in the case of a */
|
||||
/* monochrome bitmap. This allows direct composition over a */
|
||||
/* pre-existing bitmap through user-provided callbacks to perform the */
|
||||
/* span drawing/composition. */
|
||||
/* */
|
||||
/* Note that the `bit_test' and `bit_set' callbacks are required when */
|
||||
/* rendering a monochrome bitmap, as they are crucial to implement */
|
||||
/* correct drop-out control as defined in the TrueType specification. */
|
||||
/* spans. This allows direct composition over a pre-existing bitmap */
|
||||
/* through user-provided callbacks to perform the span drawing and */
|
||||
/* composition. Not supported by the monochrome rasterizer. */
|
||||
/* */
|
||||
typedef struct FT_Raster_Params_
|
||||
{
|
||||
@ -1107,9 +1000,9 @@ FT_BEGIN_HEADER
|
||||
const void* source;
|
||||
int flags;
|
||||
FT_SpanFunc gray_spans;
|
||||
FT_SpanFunc black_spans; /* doesn't work! */
|
||||
FT_Raster_BitTest_Func bit_test; /* doesn't work! */
|
||||
FT_Raster_BitSet_Func bit_set; /* doesn't work! */
|
||||
FT_SpanFunc black_spans; /* unused */
|
||||
FT_Raster_BitTest_Func bit_test; /* unused */
|
||||
FT_Raster_BitSet_Func bit_set; /* unused */
|
||||
void* user;
|
||||
FT_BBox clip_box;
|
||||
|
||||
@ -1170,26 +1063,25 @@ FT_BEGIN_HEADER
|
||||
/* FT_Raster_ResetFunc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* FreeType provides an area of memory called the `render pool', */
|
||||
/* available to all registered rasters. This pool can be freely used */
|
||||
/* during a given scan-conversion but is shared by all rasters. Its */
|
||||
/* content is thus transient. */
|
||||
/* FreeType used to provide an area of memory called the `render */
|
||||
/* pool' available to all registered rasterizers. This was not */
|
||||
/* thread safe, however, and now FreeType never allocates this pool. */
|
||||
/* */
|
||||
/* This function is called each time the render pool changes, or just */
|
||||
/* after a new raster object is created. */
|
||||
/* This function is called after a new raster object is created. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* raster :: A handle to the new raster object. */
|
||||
/* */
|
||||
/* pool_base :: The address in memory of the render pool. */
|
||||
/* pool_base :: Previously, the address in memory of the render pool. */
|
||||
/* Set this to NULL. */
|
||||
/* */
|
||||
/* pool_size :: The size in bytes of the render pool. */
|
||||
/* pool_size :: Previously, the size in bytes of the render pool. */
|
||||
/* Set this to 0. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Rasters can ignore the render pool and rely on dynamic memory */
|
||||
/* allocation if they want to (a handle to the memory allocator is */
|
||||
/* passed to the raster constructor). However, this is not */
|
||||
/* recommended for efficiency purposes. */
|
||||
/* Rasterizers should rely on dynamic or stack allocation if they */
|
||||
/* want to (a handle to the memory allocator is passed to the */
|
||||
/* rasterizer constructor). */
|
||||
/* */
|
||||
typedef void
|
||||
(*FT_Raster_ResetFunc)( FT_Raster raster,
|
||||
@ -1256,7 +1148,7 @@ FT_BEGIN_HEADER
|
||||
/* XXX: For now, the standard raster doesn't support direct */
|
||||
/* composition but this should change for the final release (see */
|
||||
/* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
|
||||
/* for examples of distinct implementations which support direct */
|
||||
/* for examples of distinct implementations that support direct */
|
||||
/* composition). */
|
||||
/* */
|
||||
typedef int
|
||||
@ -1288,6 +1180,7 @@ FT_BEGIN_HEADER
|
||||
typedef struct FT_Raster_Funcs_
|
||||
{
|
||||
FT_Glyph_Format glyph_format;
|
||||
|
||||
FT_Raster_NewFunc raster_new;
|
||||
FT_Raster_ResetFunc raster_reset;
|
||||
FT_Raster_SetModeFunc raster_set_mode;
|
||||
@ -1296,13 +1189,12 @@ FT_BEGIN_HEADER
|
||||
|
||||
} FT_Raster_Funcs;
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTIMAGE_H__ */
|
||||
#endif /* FTIMAGE_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType incremental loading (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,11 +16,12 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTINCREM_H__
|
||||
#define __FTINCREM_H__
|
||||
#ifndef FTINCREM_H_
|
||||
#define FTINCREM_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_PARAMETER_TAGS_H
|
||||
|
||||
#ifdef FREETYPE_H
|
||||
#error "freetype.h of FreeType 1 has been loaded!"
|
||||
@ -45,7 +46,7 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* This section contains various functions used to perform so-called
|
||||
* `incremental' glyph loading. This is a mode where all glyphs loaded
|
||||
* from a given @FT_Face are provided by the client application,
|
||||
* from a given @FT_Face are provided by the client application.
|
||||
*
|
||||
* Apart from that, all other tables are loaded normally from the font
|
||||
* file. This mode is useful when FreeType is used within another
|
||||
@ -331,23 +332,12 @@ FT_BEGIN_HEADER
|
||||
typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_INCREMENTAL
|
||||
*
|
||||
* @description:
|
||||
* A constant used as the tag of @FT_Parameter structures to indicate
|
||||
* an incremental loading object to be used by FreeType.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTINCREM_H__ */
|
||||
#endif /* FTINCREM_H_ */
|
||||
|
||||
|
||||
/* END */
|
309
libs/include/freetype2/freetype/ftlcdfil.h
Normal file
@ -0,0 +1,309 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftlcdfil.h */
|
||||
/* */
|
||||
/* FreeType API for color filtering of subpixel bitmap glyphs */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 2006-2018 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 FTLCDFIL_H_
|
||||
#define FTLCDFIL_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_PARAMETER_TAGS_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:
|
||||
* lcd_filtering
|
||||
*
|
||||
* @title:
|
||||
* LCD Filtering
|
||||
*
|
||||
* @abstract:
|
||||
* Reduce color fringes of subpixel-rendered bitmaps.
|
||||
*
|
||||
* @description:
|
||||
* Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your
|
||||
* `ftoption.h', which enables patented ClearType-style rendering,
|
||||
* the LCD-optimized glyph bitmaps should be filtered to reduce color
|
||||
* fringes inherent to this technology. The default FreeType LCD
|
||||
* rendering uses different technology, and API described below,
|
||||
* although available, does nothing.
|
||||
*
|
||||
* ClearType-style LCD rendering exploits the color-striped structure of
|
||||
* LCD pixels, increasing the available resolution in the direction of
|
||||
* the stripe (usually horizontal RGB) by a factor of~3. Since these
|
||||
* subpixels are color pixels, using them unfiltered creates severe
|
||||
* color fringes. Use the @FT_Library_SetLcdFilter API to specify a
|
||||
* low-pass filter, which is then applied to subpixel-rendered bitmaps
|
||||
* generated through @FT_Render_Glyph. The filter sacrifices some of
|
||||
* the higher resolution to reduce color fringes, making the glyph image
|
||||
* slightly blurrier. Positional improvements will remain.
|
||||
*
|
||||
* A filter should have two properties:
|
||||
*
|
||||
* 1) It should be normalized, meaning the sum of the 5~components
|
||||
* should be 256 (0x100). It is possible to go above or under this
|
||||
* target sum, however: going under means tossing out contrast, going
|
||||
* over means invoking clamping and thereby non-linearities that
|
||||
* increase contrast somewhat at the expense of greater distortion
|
||||
* and color-fringing. Contrast is better enhanced through stem
|
||||
* darkening.
|
||||
*
|
||||
* 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
|
||||
* where a~+ b~=~c. It distributes the computed coverage for one
|
||||
* subpixel to all subpixels equally, sacrificing some won resolution
|
||||
* but drastically reducing color-fringing. Positioning improvements
|
||||
* remain! Note that color-fringing can only really be minimized
|
||||
* when using a color-balanced filter and alpha-blending the glyph
|
||||
* onto a surface in linear space; see @FT_Render_Glyph.
|
||||
*
|
||||
* Regarding the form, a filter can be a `boxy' filter or a `beveled'
|
||||
* filter. Boxy filters are sharper but are less forgiving of non-ideal
|
||||
* gamma curves of a screen (viewing angles!), beveled filters are
|
||||
* fuzzier but more tolerant.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
|
||||
* normalized.
|
||||
*
|
||||
* - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
|
||||
* normalized.
|
||||
*
|
||||
* - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
|
||||
* balanced.
|
||||
*
|
||||
* - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not
|
||||
* balanced.
|
||||
*
|
||||
* - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost
|
||||
* balanced.
|
||||
*
|
||||
* - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
|
||||
* balanced.
|
||||
*
|
||||
* The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
|
||||
* @FT_Load_Glyph, and @FT_Load_Char. It does _not_ affect the output
|
||||
* of @FT_Outline_Render and @FT_Outline_Get_Bitmap.
|
||||
*
|
||||
* If this feature is activated, the dimensions of LCD glyph bitmaps are
|
||||
* either wider or taller than the dimensions of the corresponding
|
||||
* outline with regard to the pixel grid. For example, for
|
||||
* @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and
|
||||
* 3~subpixels to the right. The bitmap offset values are adjusted
|
||||
* accordingly, so clients shouldn't need to modify their layout and
|
||||
* glyph positioning code when enabling the filter.
|
||||
*
|
||||
* It is important to understand that linear alpha blending and gamma
|
||||
* correction is critical for correctly rendering glyphs onto surfaces
|
||||
* without artifacts and even more critical when subpixel rendering is
|
||||
* involved.
|
||||
*
|
||||
* Each of the 3~alpha values (subpixels) is independently used to blend
|
||||
* one color channel. That is, red alpha blends the red channel of the
|
||||
* text color with the red channel of the background pixel. The
|
||||
* distribution of density values by the color-balanced filter assumes
|
||||
* alpha blending is done in linear space; only then color artifacts
|
||||
* cancel out.
|
||||
*/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_LcdFilter
|
||||
*
|
||||
* @description:
|
||||
* A list of values to identify various types of LCD filters.
|
||||
*
|
||||
* @values:
|
||||
* FT_LCD_FILTER_NONE ::
|
||||
* Do not perform filtering. When used with subpixel rendering, this
|
||||
* results in sometimes severe color fringes.
|
||||
*
|
||||
* FT_LCD_FILTER_DEFAULT ::
|
||||
* The default filter reduces color fringes considerably, at the cost
|
||||
* of a slight blurriness in the output.
|
||||
*
|
||||
* It is a beveled, normalized, and color-balanced five-tap filter
|
||||
* that is more forgiving to screens with non-ideal gamma curves and
|
||||
* viewing angles. Note that while color-fringing is reduced, it can
|
||||
* only be minimized by using linear alpha blending and gamma
|
||||
* correction to render glyphs onto surfaces. The default filter
|
||||
* weights are [0x08 0x4D 0x56 0x4D 0x08].
|
||||
*
|
||||
* FT_LCD_FILTER_LIGHT ::
|
||||
* The light filter is a variant that is sharper at the cost of
|
||||
* slightly more color fringes than the default one.
|
||||
*
|
||||
* It is a boxy, normalized, and color-balanced three-tap filter that
|
||||
* is less forgiving to screens with non-ideal gamma curves and
|
||||
* viewing angles. This filter works best when the rendering system
|
||||
* uses linear alpha blending and gamma correction to render glyphs
|
||||
* onto surfaces. The light filter weights are
|
||||
* [0x00 0x55 0x56 0x55 0x00].
|
||||
*
|
||||
* FT_LCD_FILTER_LEGACY ::
|
||||
* This filter corresponds to the original libXft color filter. It
|
||||
* provides high contrast output but can exhibit really bad color
|
||||
* fringes if glyphs are not extremely well hinted to the pixel grid.
|
||||
* In other words, it only works well if the TrueType bytecode
|
||||
* interpreter is enabled *and* high-quality hinted fonts are used.
|
||||
*
|
||||
* This filter is only provided for comparison purposes, and might be
|
||||
* disabled or stay unsupported in the future.
|
||||
*
|
||||
* FT_LCD_FILTER_LEGACY1 ::
|
||||
* For historical reasons, the FontConfig library returns a different
|
||||
* enumeration value for legacy LCD filtering. To make code work that
|
||||
* (incorrectly) forwards FontConfig's enumeration value to
|
||||
* @FT_Library_SetLcdFilter without proper mapping, it is thus easiest
|
||||
* to have another enumeration value, which is completely equal to
|
||||
* `FT_LCD_FILTER_LEGACY'.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
|
||||
*/
|
||||
typedef enum FT_LcdFilter_
|
||||
{
|
||||
FT_LCD_FILTER_NONE = 0,
|
||||
FT_LCD_FILTER_DEFAULT = 1,
|
||||
FT_LCD_FILTER_LIGHT = 2,
|
||||
FT_LCD_FILTER_LEGACY1 = 3,
|
||||
FT_LCD_FILTER_LEGACY = 16,
|
||||
|
||||
FT_LCD_FILTER_MAX /* do not remove */
|
||||
|
||||
} FT_LcdFilter;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* FT_Library_SetLcdFilter
|
||||
*
|
||||
* @description:
|
||||
* This function is used to apply color filtering to LCD decimated
|
||||
* bitmaps, like the ones used when calling @FT_Render_Glyph with
|
||||
* @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the target library instance.
|
||||
*
|
||||
* filter ::
|
||||
* The filter type.
|
||||
*
|
||||
* You can use @FT_LCD_FILTER_NONE here to disable this feature, or
|
||||
* @FT_LCD_FILTER_DEFAULT to use a default filter that should work
|
||||
* well on most LCD screens.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* This feature is always disabled by default. Clients must make an
|
||||
* explicit call to this function with a `filter' value other than
|
||||
* @FT_LCD_FILTER_NONE in order to enable it.
|
||||
*
|
||||
* Due to *PATENTS* covering subpixel rendering, this function doesn't
|
||||
* do anything except returning `FT_Err_Unimplemented_Feature' if the
|
||||
* configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
|
||||
* defined in your build of the library, which should correspond to all
|
||||
* default builds of FreeType.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.0
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Library_SetLcdFilter( FT_Library library,
|
||||
FT_LcdFilter filter );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* FT_Library_SetLcdFilterWeights
|
||||
*
|
||||
* @description:
|
||||
* This function can be used to enable LCD filter with custom weights,
|
||||
* instead of using presets in @FT_Library_SetLcdFilter.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the target library instance.
|
||||
*
|
||||
* weights ::
|
||||
* A pointer to an array; the function copies the first five bytes and
|
||||
* uses them to specify the filter weights.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* Due to *PATENTS* covering subpixel rendering, this function doesn't
|
||||
* do anything except returning `FT_Err_Unimplemented_Feature' if the
|
||||
* configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
|
||||
* defined in your build of the library, which should correspond to all
|
||||
* default builds of FreeType.
|
||||
*
|
||||
* LCD filter weights can also be set per face using @FT_Face_Properties
|
||||
* with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.0
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Library_SetLcdFilterWeights( FT_Library library,
|
||||
unsigned char *weights );
|
||||
|
||||
|
||||
/*
|
||||
* @type:
|
||||
* FT_LcdFiveTapFilter
|
||||
*
|
||||
* @description:
|
||||
* A typedef for passing the five LCD filter weights to
|
||||
* @FT_Face_Properties within an @FT_Parameter structure.
|
||||
*
|
||||
* @since:
|
||||
* 2.8
|
||||
*
|
||||
*/
|
||||
#define FT_LCD_FILTER_FIVE_TAPS 5
|
||||
|
||||
typedef FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTLCDFIL_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Generic list support for FreeType (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2007, 2010 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -24,8 +24,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTLIST_H__
|
||||
#define __FTLIST_H__
|
||||
#ifndef FTLIST_H_
|
||||
#define FTLIST_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -173,7 +173,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_List_Iterator */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An FT_List iterator function which is called during a list parse */
|
||||
/* An FT_List iterator function that is called during a list parse */
|
||||
/* by @FT_List_Iterate. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -200,7 +200,7 @@ FT_BEGIN_HEADER
|
||||
/* <Input> */
|
||||
/* list :: A handle to the list. */
|
||||
/* iterator :: An iterator function, called on each node of the list. */
|
||||
/* user :: A user-supplied field which is passed as the second */
|
||||
/* user :: A user-supplied field that is passed as the second */
|
||||
/* argument to the iterator. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -218,7 +218,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_List_Destructor */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An @FT_List iterator function which is called during a list */
|
||||
/* An @FT_List iterator function that is called during a list */
|
||||
/* finalization by @FT_List_Finalize to destroy all elements in a */
|
||||
/* given list. */
|
||||
/* */
|
||||
@ -248,11 +248,11 @@ FT_BEGIN_HEADER
|
||||
/* list :: A handle to the list. */
|
||||
/* */
|
||||
/* destroy :: A list destructor that will be applied to each element */
|
||||
/* of the list. */
|
||||
/* of the list. Set this to NULL if not needed. */
|
||||
/* */
|
||||
/* memory :: The current memory object which handles deallocation. */
|
||||
/* memory :: The current memory object that handles deallocation. */
|
||||
/* */
|
||||
/* user :: A user-supplied field which is passed as the last */
|
||||
/* user :: A user-supplied field that is passed as the last */
|
||||
/* argument to the destructor. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
@ -265,13 +265,12 @@ FT_BEGIN_HEADER
|
||||
FT_Memory memory,
|
||||
void* user );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTLIST_H__ */
|
||||
#endif /* FTLIST_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* LZW-compressed stream support. */
|
||||
/* */
|
||||
/* Copyright 2004, 2006 by */
|
||||
/* Copyright 2004-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTLZW_H__
|
||||
#define __FTLZW_H__
|
||||
#ifndef FTLZW_H_
|
||||
#define FTLZW_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -93,7 +93,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTLZW_H__ */
|
||||
#endif /* FTLZW_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Additional Mac-specific API. */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2004, 2006, 2007 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -18,15 +18,15 @@
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* NOTE: Include this file after <freetype/freetype.h> and after any */
|
||||
/* NOTE: Include this file after FT_FREETYPE_H and after any */
|
||||
/* Mac-specific headers (because this header uses Mac types such as */
|
||||
/* Handle, FSSpec, FSRef, etc.) */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTMAC_H__
|
||||
#define __FTMAC_H__
|
||||
#ifndef FTMAC_H_
|
||||
#define FTMAC_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -35,10 +35,11 @@
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
|
||||
/* gcc-3.1 and later can warn about functions tagged as deprecated */
|
||||
#ifndef FT_DEPRECATED_ATTRIBUTE
|
||||
#if defined( __GNUC__ ) && \
|
||||
((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||
( ( __GNUC__ >= 4 ) || \
|
||||
( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 1 ) ) )
|
||||
#define FT_DEPRECATED_ATTRIBUTE __attribute__(( deprecated ))
|
||||
#else
|
||||
#define FT_DEPRECATED_ATTRIBUTE
|
||||
@ -168,7 +169,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return a pathname of the disk file and face index for given font */
|
||||
/* name which is handled by ATS framework. */
|
||||
/* name that is handled by ATS framework. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* fontName :: Mac OS name of the font in ATS framework. */
|
||||
@ -268,7 +269,7 @@ FT_BEGIN_HEADER
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __FTMAC_H__ */
|
||||
#endif /* FTMAC_H_ */
|
||||
|
||||
|
||||
/* END */
|
638
libs/include/freetype2/freetype/ftmm.h
Normal file
@ -0,0 +1,638 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftmm.h */
|
||||
/* */
|
||||
/* FreeType Multiple Master font interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2018 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 FTMM_H_
|
||||
#define FTMM_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_TYPE1_TABLES_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* multiple_masters */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Multiple Masters */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* How to manage Multiple Masters fonts. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The following types and functions are used to manage Multiple */
|
||||
/* Master fonts, i.e., the selection of specific design instances by */
|
||||
/* setting design axis coordinates. */
|
||||
/* */
|
||||
/* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */
|
||||
/* and OpenType variation fonts. Some of the routines only work with */
|
||||
/* Adobe MM fonts, others will work with all three types. They are */
|
||||
/* similar enough that a consistent interface makes sense. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_MM_Axis */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to model a given axis in design space for Multiple */
|
||||
/* Masters fonts. */
|
||||
/* */
|
||||
/* This structure can't be used for TrueType GX or OpenType variation */
|
||||
/* fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* name :: The axis's name. */
|
||||
/* */
|
||||
/* minimum :: The axis's minimum design coordinate. */
|
||||
/* */
|
||||
/* maximum :: The axis's maximum design coordinate. */
|
||||
/* */
|
||||
typedef struct FT_MM_Axis_
|
||||
{
|
||||
FT_String* name;
|
||||
FT_Long minimum;
|
||||
FT_Long maximum;
|
||||
|
||||
} FT_MM_Axis;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Multi_Master */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to model the axes and space of a Multiple Masters */
|
||||
/* font. */
|
||||
/* */
|
||||
/* This structure can't be used for TrueType GX or OpenType variation */
|
||||
/* fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* num_axis :: Number of axes. Cannot exceed~4. */
|
||||
/* */
|
||||
/* num_designs :: Number of designs; should be normally 2^num_axis */
|
||||
/* even though the Type~1 specification strangely */
|
||||
/* allows for intermediate designs to be present. */
|
||||
/* This number cannot exceed~16. */
|
||||
/* */
|
||||
/* axis :: A table of axis descriptors. */
|
||||
/* */
|
||||
typedef struct FT_Multi_Master_
|
||||
{
|
||||
FT_UInt num_axis;
|
||||
FT_UInt num_designs;
|
||||
FT_MM_Axis axis[T1_MAX_MM_AXIS];
|
||||
|
||||
} FT_Multi_Master;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Var_Axis */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to model a given axis in design space for Multiple */
|
||||
/* Masters, TrueType GX, and OpenType variation fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* name :: The axis's name. */
|
||||
/* Not always meaningful for TrueType GX or OpenType */
|
||||
/* variation fonts. */
|
||||
/* */
|
||||
/* minimum :: The axis's minimum design coordinate. */
|
||||
/* */
|
||||
/* def :: The axis's default design coordinate. */
|
||||
/* FreeType computes meaningful default values for Adobe */
|
||||
/* MM fonts. */
|
||||
/* */
|
||||
/* maximum :: The axis's maximum design coordinate. */
|
||||
/* */
|
||||
/* tag :: The axis's tag (the equivalent to `name' for TrueType */
|
||||
/* GX and OpenType variation fonts). FreeType provides */
|
||||
/* default values for Adobe MM fonts if possible. */
|
||||
/* */
|
||||
/* strid :: The axis name entry in the font's `name' table. This */
|
||||
/* is another (and often better) version of the `name' */
|
||||
/* field for TrueType GX or OpenType variation fonts. Not */
|
||||
/* meaningful for Adobe MM fonts. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The fields `minimum', `def', and `maximum' are 16.16 fractional */
|
||||
/* values for TrueType GX and OpenType variation fonts. For Adobe MM */
|
||||
/* fonts, the values are integers. */
|
||||
/* */
|
||||
typedef struct FT_Var_Axis_
|
||||
{
|
||||
FT_String* name;
|
||||
|
||||
FT_Fixed minimum;
|
||||
FT_Fixed def;
|
||||
FT_Fixed maximum;
|
||||
|
||||
FT_ULong tag;
|
||||
FT_UInt strid;
|
||||
|
||||
} FT_Var_Axis;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Var_Named_Style */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to model a named instance in a TrueType GX or OpenType */
|
||||
/* variation font. */
|
||||
/* */
|
||||
/* This structure can't be used for Adobe MM fonts. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* coords :: The design coordinates for this instance. */
|
||||
/* This is an array with one entry for each axis. */
|
||||
/* */
|
||||
/* strid :: The entry in `name' table identifying this instance. */
|
||||
/* */
|
||||
/* psid :: The entry in `name' table identifying a PostScript name */
|
||||
/* for this instance. Value 0xFFFF indicates a missing */
|
||||
/* entry. */
|
||||
/* */
|
||||
typedef struct FT_Var_Named_Style_
|
||||
{
|
||||
FT_Fixed* coords;
|
||||
FT_UInt strid;
|
||||
FT_UInt psid; /* since 2.7.1 */
|
||||
|
||||
} FT_Var_Named_Style;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_MM_Var */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to model the axes and space of an Adobe MM, TrueType */
|
||||
/* GX, or OpenType variation font. */
|
||||
/* */
|
||||
/* Some fields are specific to one format and not to the others. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* num_axis :: The number of axes. The maximum value is~4 for */
|
||||
/* Adobe MM fonts; no limit in TrueType GX or */
|
||||
/* OpenType variation fonts. */
|
||||
/* */
|
||||
/* num_designs :: The number of designs; should be normally */
|
||||
/* 2^num_axis for Adobe MM fonts. Not meaningful */
|
||||
/* for TrueType GX or OpenType variation fonts */
|
||||
/* (where every glyph could have a different */
|
||||
/* number of designs). */
|
||||
/* */
|
||||
/* num_namedstyles :: The number of named styles; a `named style' is */
|
||||
/* a tuple of design coordinates that has a string */
|
||||
/* ID (in the `name' table) associated with it. */
|
||||
/* The font can tell the user that, for example, */
|
||||
/* [Weight=1.5,Width=1.1] is `Bold'. Another name */
|
||||
/* for `named style' is `named instance'. */
|
||||
/* */
|
||||
/* For Adobe Multiple Masters fonts, this value is */
|
||||
/* always zero because the format does not support */
|
||||
/* named styles. */
|
||||
/* */
|
||||
/* axis :: An axis descriptor table. */
|
||||
/* TrueType GX and OpenType variation fonts */
|
||||
/* contain slightly more data than Adobe MM fonts. */
|
||||
/* Memory management of this pointer is done */
|
||||
/* internally by FreeType. */
|
||||
/* */
|
||||
/* namedstyle :: A named style (instance) table. */
|
||||
/* Only meaningful for TrueType GX and OpenType */
|
||||
/* variation fonts. Memory management of this */
|
||||
/* pointer is done internally by FreeType. */
|
||||
/* */
|
||||
typedef struct FT_MM_Var_
|
||||
{
|
||||
FT_UInt num_axis;
|
||||
FT_UInt num_designs;
|
||||
FT_UInt num_namedstyles;
|
||||
FT_Var_Axis* axis;
|
||||
FT_Var_Named_Style* namedstyle;
|
||||
|
||||
} FT_MM_Var;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Multi_Master */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve a variation descriptor of a given Adobe MM font. */
|
||||
/* */
|
||||
/* This function can't be used with TrueType GX or OpenType variation */
|
||||
/* fonts. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* amaster :: The Multiple Masters descriptor. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Multi_Master( FT_Face face,
|
||||
FT_Multi_Master *amaster );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_MM_Var */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve a variation descriptor for a given font. */
|
||||
/* */
|
||||
/* This function works with all supported variation formats. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* amaster :: The variation descriptor. */
|
||||
/* Allocates a data structure, which the user must */
|
||||
/* deallocate with a call to @FT_Done_MM_Var after use. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_MM_Var( FT_Face face,
|
||||
FT_MM_Var* *amaster );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Done_MM_Var */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Free the memory allocated by @FT_Get_MM_Var. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle of the face's parent library object that was */
|
||||
/* used in the call to @FT_Get_MM_Var to create `amaster'. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Done_MM_Var( FT_Library library,
|
||||
FT_MM_Var *amaster );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_MM_Design_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* For Adobe MM fonts, choose an interpolated font design through */
|
||||
/* design coordinates. */
|
||||
/* */
|
||||
/* This function can't be used with TrueType GX or OpenType variation */
|
||||
/* fonts. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* num_coords :: The number of available design coordinates. If it */
|
||||
/* is larger than the number of axes, ignore the excess */
|
||||
/* values. If it is smaller than the number of axes, */
|
||||
/* use default values for the remaining axes. */
|
||||
/* */
|
||||
/* coords :: An array of design coordinates. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* [Since 2.8.1] To reset all axes to the default values, call the */
|
||||
/* function with `num_coords' set to zero and `coords' set to NULL. */
|
||||
/* */
|
||||
/* [Since 2.9] If `num_coords' is larger than zero, this function */
|
||||
/* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */
|
||||
/* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */
|
||||
/* is zero, this bit flag gets unset. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_MM_Design_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Long* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Var_Design_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Choose an interpolated font design through design coordinates. */
|
||||
/* */
|
||||
/* This function works with all supported variation formats. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* num_coords :: The number of available design coordinates. If it */
|
||||
/* is larger than the number of axes, ignore the excess */
|
||||
/* values. If it is smaller than the number of axes, */
|
||||
/* use default values for the remaining axes. */
|
||||
/* */
|
||||
/* coords :: An array of design coordinates. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* [Since 2.8.1] To reset all axes to the default values, call the */
|
||||
/* function with `num_coords' set to zero and `coords' set to NULL. */
|
||||
/* [Since 2.9] `Default values' means the currently selected named */
|
||||
/* instance (or the base font if no named instance is selected). */
|
||||
/* */
|
||||
/* [Since 2.9] If `num_coords' is larger than zero, this function */
|
||||
/* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */
|
||||
/* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */
|
||||
/* is zero, this bit flag gets unset. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Var_Design_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Var_Design_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Get the design coordinates of the currently selected interpolated */
|
||||
/* font. */
|
||||
/* */
|
||||
/* This function works with all supported variation formats. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* num_coords :: The number of design coordinates to retrieve. If it */
|
||||
/* is larger than the number of axes, set the excess */
|
||||
/* values to~0. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* coords :: The design coordinates array. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.7.1 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Var_Design_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_MM_Blend_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Choose an interpolated font design through normalized blend */
|
||||
/* coordinates. */
|
||||
/* */
|
||||
/* This function works with all supported variation formats. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* num_coords :: The number of available design coordinates. If it */
|
||||
/* is larger than the number of axes, ignore the excess */
|
||||
/* values. If it is smaller than the number of axes, */
|
||||
/* use default values for the remaining axes. */
|
||||
/* */
|
||||
/* coords :: The design coordinates array (each element must be */
|
||||
/* between 0 and 1.0 for Adobe MM fonts, and between */
|
||||
/* -1.0 and 1.0 for TrueType GX and OpenType variation */
|
||||
/* fonts). */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* [Since 2.8.1] To reset all axes to the default values, call the */
|
||||
/* function with `num_coords' set to zero and `coords' set to NULL. */
|
||||
/* [Since 2.9] `Default values' means the currently selected named */
|
||||
/* instance (or the base font if no named instance is selected). */
|
||||
/* */
|
||||
/* [Since 2.9] If `num_coords' is larger than zero, this function */
|
||||
/* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */
|
||||
/* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */
|
||||
/* is zero, this bit flag gets unset. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_MM_Blend_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_MM_Blend_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Get the normalized blend coordinates of the currently selected */
|
||||
/* interpolated font. */
|
||||
/* */
|
||||
/* This function works with all supported variation formats. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* num_coords :: The number of normalized blend coordinates to */
|
||||
/* retrieve. If it is larger than the number of axes, */
|
||||
/* set the excess values to~0.5 for Adobe MM fonts, and */
|
||||
/* to~0 for TrueType GX and OpenType variation fonts. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* coords :: The normalized blend coordinates array. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.7.1 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_MM_Blend_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Var_Blend_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This is another name of @FT_Set_MM_Blend_Coordinates. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Var_Blend_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Var_Blend_Coordinates */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This is another name of @FT_Get_MM_Blend_Coordinates. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.7.1 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Var_Blend_Coordinates( FT_Face face,
|
||||
FT_UInt num_coords,
|
||||
FT_Fixed* coords );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* FT_VAR_AXIS_FLAG_XXX */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of bit flags used in the return value of */
|
||||
/* @FT_Get_Var_Axis_Flags. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* FT_VAR_AXIS_FLAG_HIDDEN :: */
|
||||
/* The variation axis should not be exposed to user interfaces. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.8.1 */
|
||||
/* */
|
||||
#define FT_VAR_AXIS_FLAG_HIDDEN 1
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Var_Axis_Flags */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Get the `flags' field of an OpenType Variation Axis Record. */
|
||||
/* */
|
||||
/* Not meaningful for Adobe MM fonts (`*flags' is always zero). */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* master :: The variation descriptor. */
|
||||
/* */
|
||||
/* axis_index :: The index of the requested variation axis. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* flags :: The `flags' field. See @FT_VAR_AXIS_FLAG_XXX for */
|
||||
/* possible values. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.8.1 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Var_Axis_Flags( FT_MM_Var* master,
|
||||
FT_UInt axis_index,
|
||||
FT_UInt* flags );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Named_Instance */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Set or change the current named instance. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* instance_index :: The index of the requested instance, starting */
|
||||
/* with value 1. If set to value 0, FreeType */
|
||||
/* switches to font access without a named */
|
||||
/* instance. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The function uses the value of `instance_index' to set bits 16-30 */
|
||||
/* of the face's `face_index' field. It also resets any variation */
|
||||
/* applied to the font, and the @FT_FACE_FLAG_VARIATION bit of the */
|
||||
/* face's `face_flags' field gets reset to zero (i.e., */
|
||||
/* @FT_IS_VARIATION will return false). */
|
||||
/* */
|
||||
/* For Adobe MM fonts (which don't have named instances) this */
|
||||
/* function simply resets the current face to the default instance. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.9 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Named_Instance( FT_Face face,
|
||||
FT_UInt instance_index );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTMM_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType modules public interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2003, 2006, 2008-2010, 2012 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTMODAPI_H__
|
||||
#define __FTMODAPI_H__
|
||||
#ifndef FTMODAPI_H_
|
||||
#define FTMODAPI_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -63,7 +63,7 @@ FT_BEGIN_HEADER
|
||||
/* psaux */
|
||||
/* pshinter */
|
||||
/* psnames */
|
||||
/* raster1, raster5 */
|
||||
/* raster1 */
|
||||
/* sfnt */
|
||||
/* smooth, smooth-lcd, smooth-lcdv */
|
||||
/* truetype */
|
||||
@ -75,6 +75,34 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Note that the FreeType Cache sub-system is not a FreeType module. */
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* FT_Module */
|
||||
/* FT_Module_Constructor */
|
||||
/* FT_Module_Destructor */
|
||||
/* FT_Module_Requester */
|
||||
/* FT_Module_Class */
|
||||
/* */
|
||||
/* FT_Add_Module */
|
||||
/* FT_Get_Module */
|
||||
/* FT_Remove_Module */
|
||||
/* FT_Add_Default_Modules */
|
||||
/* */
|
||||
/* FT_Property_Set */
|
||||
/* FT_Property_Get */
|
||||
/* FT_Set_Default_Properties */
|
||||
/* */
|
||||
/* FT_New_Library */
|
||||
/* FT_Done_Library */
|
||||
/* FT_Reference_Library */
|
||||
/* */
|
||||
/* FT_Renderer */
|
||||
/* FT_Renderer_Class */
|
||||
/* */
|
||||
/* FT_Get_Renderer */
|
||||
/* FT_Set_Renderer */
|
||||
/* */
|
||||
/* FT_Set_Debug_Hook */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
@ -90,6 +118,8 @@ FT_BEGIN_HEADER
|
||||
/* support vector outlines */
|
||||
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
||||
/* own hinter */
|
||||
#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */
|
||||
/* produces LIGHT hints */
|
||||
|
||||
|
||||
/* deprecated values */
|
||||
@ -101,6 +131,7 @@ FT_BEGIN_HEADER
|
||||
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
||||
#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
|
||||
#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
|
||||
#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY
|
||||
|
||||
|
||||
typedef FT_Pointer FT_Module_Interface;
|
||||
@ -292,16 +323,15 @@ FT_BEGIN_HEADER
|
||||
* The module name.
|
||||
*
|
||||
* property_name ::
|
||||
* The property name. Properties are described in the `Synopsis'
|
||||
* subsection of the module's documentation.
|
||||
* The property name. Properties are described in section
|
||||
* @properties.
|
||||
*
|
||||
* Note that only a few modules have properties.
|
||||
*
|
||||
* value ::
|
||||
* A generic pointer to a variable or structure which gives the new
|
||||
* A generic pointer to a variable or structure that 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.
|
||||
* dependent on the property; see section @properties.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
@ -322,14 +352,21 @@ FT_BEGIN_HEADER
|
||||
* FT_Property_Set( library, "foo", "bar", &bar );
|
||||
* }
|
||||
*
|
||||
* Note that the FreeType Cache sub-system doesn't recognize module
|
||||
* property changes. To avoid glyph lookup confusion within the cache
|
||||
* you should call @FTC_Manager_Reset to completely flush the cache if
|
||||
* a module property gets changed after @FTC_Manager_New has been
|
||||
* called.
|
||||
*
|
||||
* It is not possible to set properties of the FreeType Cache
|
||||
* sub-system with FT_Property_Set; use @FTC_Property_Set instead.
|
||||
* sub-system itself with FT_Property_Set; use @FTC_Property_Set
|
||||
* instead.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.11
|
||||
*
|
||||
*/
|
||||
FT_Error
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Property_Set( FT_Library library,
|
||||
const FT_String* module_name,
|
||||
const FT_String* property_name,
|
||||
@ -352,15 +389,14 @@ FT_BEGIN_HEADER
|
||||
* The module name.
|
||||
*
|
||||
* property_name ::
|
||||
* The property name. Properties are described in the `Synopsis'
|
||||
* subsection of the module's documentation.
|
||||
* The property name. Properties are described in section
|
||||
* @properties.
|
||||
*
|
||||
* @inout:
|
||||
* value ::
|
||||
* A generic pointer to a variable or structure which gives the
|
||||
* A generic pointer to a variable or structure that 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.
|
||||
* dependent on the property; see section @properties.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
@ -393,13 +429,57 @@ FT_BEGIN_HEADER
|
||||
* 2.4.11
|
||||
*
|
||||
*/
|
||||
FT_Error
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Property_Get( FT_Library library,
|
||||
const FT_String* module_name,
|
||||
const FT_String* property_name,
|
||||
void* value );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Default_Properties */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */
|
||||
/* set, this function reads the `FREETYPE_PROPERTIES' environment */
|
||||
/* variable to control driver properties. See section @properties */
|
||||
/* for more. */
|
||||
/* */
|
||||
/* If the compilation option is not set, this function does nothing. */
|
||||
/* */
|
||||
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here */
|
||||
/* into multiple lines for better readability). */
|
||||
/* */
|
||||
/* { */
|
||||
/* <optional whitespace> */
|
||||
/* <module-name1> ':' */
|
||||
/* <property-name1> '=' <property-value1> */
|
||||
/* <whitespace> */
|
||||
/* <module-name2> ':' */
|
||||
/* <property-name2> '=' <property-value2> */
|
||||
/* ... */
|
||||
/* } */
|
||||
/* */
|
||||
/* Example: */
|
||||
/* */
|
||||
/* { */
|
||||
/* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */
|
||||
/* cff:no-stem-darkening=1 \ */
|
||||
/* autofitter:warping=1 */
|
||||
/* } */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* library :: A handle to a new library object. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.8 */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Set_Default_Properties( FT_Library library );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
@ -411,7 +491,7 @@ FT_BEGIN_HEADER
|
||||
/* @FT_Done_Library then only destroys a library if the counter is~1, */
|
||||
/* otherwise it simply decrements the counter. */
|
||||
/* */
|
||||
/* This function helps in managing life-cycles of structures which */
|
||||
/* This function helps in managing life-cycles of structures that */
|
||||
/* reference @FT_Library objects. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -435,11 +515,14 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* This function is used to create a new FreeType library instance */
|
||||
/* from a given memory object. It is thus possible to use libraries */
|
||||
/* with distinct memory allocators within the same program. */
|
||||
/* with distinct memory allocators within the same program. Note, */
|
||||
/* however, that the used @FT_Memory structure is expected to remain */
|
||||
/* valid for the life of the @FT_Library object. */
|
||||
/* */
|
||||
/* Normally, you would call this function (followed by a call to */
|
||||
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
|
||||
/* instead of @FT_Init_FreeType to initialize the FreeType library. */
|
||||
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, */
|
||||
/* and a call to @FT_Set_Default_Properties) instead of */
|
||||
/* @FT_Init_FreeType to initialize the FreeType library. */
|
||||
/* */
|
||||
/* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */
|
||||
/* library instance. */
|
||||
@ -574,12 +657,7 @@ FT_BEGIN_HEADER
|
||||
* The library doesn't implement any kind of bytecode interpreter.
|
||||
*
|
||||
* FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
|
||||
* The library implements a bytecode interpreter that doesn't
|
||||
* support the patented operations of the TrueType virtual machine.
|
||||
*
|
||||
* Its main use is to load certain Asian fonts which position and
|
||||
* scale glyph components with bytecode instructions. It produces
|
||||
* bad output for most other fonts.
|
||||
* Deprecated and removed.
|
||||
*
|
||||
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
|
||||
* The library implements a bytecode interpreter that covers
|
||||
@ -622,13 +700,12 @@ FT_BEGIN_HEADER
|
||||
FT_EXPORT( FT_TrueTypeEngineType )
|
||||
FT_Get_TrueType_Engine_Type( FT_Library library );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTMODAPI_H__ */
|
||||
#endif /* FTMODAPI_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType module error offsets (specification). */
|
||||
/* */
|
||||
/* Copyright 2001-2005, 2010, 2013 by */
|
||||
/* Copyright 2001-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -74,7 +74,7 @@
|
||||
/* with something like */
|
||||
/* */
|
||||
/* { */
|
||||
/* #undef __FTMODERR_H__ */
|
||||
/* #undef FTMODERR_H_ */
|
||||
/* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */
|
||||
/* #define FT_MODERR_START_LIST { */
|
||||
/* #define FT_MODERR_END_LIST { 0, 0 } }; */
|
||||
@ -91,8 +91,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTMODERR_H__
|
||||
#define __FTMODERR_H__
|
||||
#ifndef FTMODERR_H_
|
||||
#define FTMODERR_H_
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
@ -188,7 +188,7 @@
|
||||
#undef FT_NEED_EXTERN_C
|
||||
|
||||
|
||||
#endif /* __FTMODERR_H__ */
|
||||
#endif /* FTMODERR_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for validating OpenType tables (specification). */
|
||||
/* */
|
||||
/* Copyright 2004, 2005, 2006, 2007 by */
|
||||
/* Copyright 2004-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -27,8 +27,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTOTVAL_H__
|
||||
#define __FTOTVAL_H__
|
||||
#ifndef FTOTVAL_H_
|
||||
#define FTOTVAL_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -58,6 +58,12 @@ FT_BEGIN_HEADER
|
||||
/* This section contains the declaration of functions to validate */
|
||||
/* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* FT_OpenType_Validate */
|
||||
/* FT_OpenType_Free */
|
||||
/* */
|
||||
/* FT_VALIDATE_OTXXX */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
@ -100,14 +106,12 @@ FT_BEGIN_HEADER
|
||||
#define FT_VALIDATE_JSTF 0x1000
|
||||
#define FT_VALIDATE_MATH 0x2000
|
||||
|
||||
#define FT_VALIDATE_OT FT_VALIDATE_BASE | \
|
||||
#define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \
|
||||
FT_VALIDATE_GDEF | \
|
||||
FT_VALIDATE_GPOS | \
|
||||
FT_VALIDATE_GSUB | \
|
||||
FT_VALIDATE_JSTF | \
|
||||
FT_VALIDATE_MATH
|
||||
|
||||
/* */
|
||||
FT_VALIDATE_MATH )
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
@ -116,7 +120,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Validate various OpenType tables to assure that all offsets and
|
||||
* indices are valid. The idea is that a higher-level library which
|
||||
* indices are valid. The idea is that a higher-level library that
|
||||
* actually does the text layout can access those tables without
|
||||
* error checking (which can be quite time consuming).
|
||||
*
|
||||
@ -125,7 +129,7 @@ FT_BEGIN_HEADER
|
||||
* A handle to the input face.
|
||||
*
|
||||
* validation_flags ::
|
||||
* A bit field which specifies the tables to be validated. See
|
||||
* A bit field that specifies the tables to be validated. See
|
||||
* @FT_VALIDATE_OTXXX for possible values.
|
||||
*
|
||||
* @output:
|
||||
@ -165,8 +169,6 @@ FT_BEGIN_HEADER
|
||||
FT_Bytes *GSUB_table,
|
||||
FT_Bytes *JSTF_table );
|
||||
|
||||
/* */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
@ -191,13 +193,12 @@ FT_BEGIN_HEADER
|
||||
FT_OpenType_Free( FT_Face face,
|
||||
FT_Bytes table );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTOTVAL_H__ */
|
||||
#endif /* FTOTVAL_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
/* Support for the FT_Outline type used to store glyph shapes of */
|
||||
/* most scalable font formats (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2003, 2005-2012 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -17,8 +17,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTOUTLN_H__
|
||||
#define __FTOUTLN_H__
|
||||
#ifndef FTOUTLN_H_
|
||||
#define FTOUTLN_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -52,7 +52,6 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* FT_Outline */
|
||||
/* FT_OUTLINE_FLAGS */
|
||||
/* FT_Outline_New */
|
||||
/* FT_Outline_Done */
|
||||
/* FT_Outline_Copy */
|
||||
@ -68,13 +67,17 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* FT_Outline_Get_Bitmap */
|
||||
/* FT_Outline_Render */
|
||||
/* */
|
||||
/* FT_Outline_Decompose */
|
||||
/* FT_Outline_Funcs */
|
||||
/* FT_Outline_MoveTo_Func */
|
||||
/* FT_Outline_LineTo_Func */
|
||||
/* FT_Outline_ConicTo_Func */
|
||||
/* FT_Outline_CubicTo_Func */
|
||||
/* FT_Outline_MoveToFunc */
|
||||
/* FT_Outline_LineToFunc */
|
||||
/* FT_Outline_ConicToFunc */
|
||||
/* FT_Outline_CubicToFunc */
|
||||
/* */
|
||||
/* FT_Orientation */
|
||||
/* FT_Outline_Get_Orientation */
|
||||
/* */
|
||||
/* FT_OUTLINE_XXX */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -86,7 +89,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Walk over an outline's structure to decompose it into individual */
|
||||
/* segments and Bézier arcs. This function also emits `move to' */
|
||||
/* segments and Bezier arcs. This function also emits `move to' */
|
||||
/* operations to indicate the start of new contours in the outline. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -97,7 +100,7 @@ FT_BEGIN_HEADER
|
||||
/* operations. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* user :: A typeless pointer which is passed to each */
|
||||
/* user :: A typeless pointer that is passed to each */
|
||||
/* emitter during the decomposition. It can be */
|
||||
/* used to store the state during the */
|
||||
/* decomposition. */
|
||||
@ -105,6 +108,17 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* A contour that contains a single point only is represented by a */
|
||||
/* `move to' operation followed by `line to' to the same point. In */
|
||||
/* most cases, it is best to filter this out before using the */
|
||||
/* outline for stroking purposes (otherwise it would result in a */
|
||||
/* visible dot when round caps are used). */
|
||||
/* */
|
||||
/* Similarly, the function returns success for an empty outline also */
|
||||
/* (doing nothing, this is, not calling any emitter); if necessary, */
|
||||
/* you should filter this out, too. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Decompose( FT_Outline* outline,
|
||||
const FT_Outline_Funcs* func_interface,
|
||||
@ -176,9 +190,6 @@ FT_BEGIN_HEADER
|
||||
/* If the outline's `owner' field is not set, only the outline */
|
||||
/* descriptor will be released. */
|
||||
/* */
|
||||
/* The reason why this function takes an `library' parameter is */
|
||||
/* simply to use ft_mem_free(). */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline );
|
||||
@ -203,6 +214,10 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* An empty outline, or an outline with a single point only is also */
|
||||
/* valid. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Check( FT_Outline* outline );
|
||||
|
||||
@ -214,15 +229,15 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return an outline's `control box'. The control box encloses all */
|
||||
/* the outline's points, including Bézier control points. Though it */
|
||||
/* the outline's points, including Bezier control points. Though it */
|
||||
/* coincides with the exact bounding box for most glyphs, it can be */
|
||||
/* slightly larger in some situations (like when rotating an outline */
|
||||
/* which contains Bézier outside arcs). */
|
||||
/* that contains Bezier outside arcs). */
|
||||
/* */
|
||||
/* Computing the control box is very fast, while getting the bounding */
|
||||
/* box can take much more time as it needs to walk over all segments */
|
||||
/* and arcs in the outline. To get the latter, you can use the */
|
||||
/* `ftbbox' component which is dedicated to this single task. */
|
||||
/* `ftbbox' component, which is dedicated to this single task. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* outline :: A pointer to the source outline descriptor. */
|
||||
@ -344,10 +359,13 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* { */
|
||||
/* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
|
||||
/* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */
|
||||
/* FT_Outline_Embolden( &face->slot->outline, strength ); */
|
||||
/* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) */
|
||||
/* FT_Outline_Embolden( &face->glyph->outline, strength ); */
|
||||
/* } */
|
||||
/* */
|
||||
/* To get meaningful results, font scaling values must be set with */
|
||||
/* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Embolden( FT_Outline* outline,
|
||||
FT_Pos strength );
|
||||
@ -364,6 +382,9 @@ FT_BEGIN_HEADER
|
||||
/* @FT_Outline_Embolden, which uses the same strength in both */
|
||||
/* directions. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.4.10 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_EmboldenXY( FT_Outline* outline,
|
||||
FT_Pos xstrength,
|
||||
@ -525,9 +546,11 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* This function analyzes a glyph outline and tries to compute its
|
||||
* fill orientation (see @FT_Orientation). This is done by computing
|
||||
* the direction of each global horizontal and/or vertical extrema
|
||||
* within the outline.
|
||||
* fill orientation (see @FT_Orientation). This is done by integrating
|
||||
* the total area covered by the outline. The positive integral
|
||||
* corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
|
||||
* is returned. The negative integral corresponds to the counter-clockwise
|
||||
* orientation and @FT_ORIENTATION_TRUETYPE is returned.
|
||||
*
|
||||
* Note that this will return @FT_ORIENTATION_TRUETYPE for empty
|
||||
* outlines.
|
||||
@ -543,13 +566,12 @@ FT_BEGIN_HEADER
|
||||
FT_EXPORT( FT_Orientation )
|
||||
FT_Outline_Get_Orientation( FT_Outline* outline );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTOUTLN_H__ */
|
||||
#endif /* FTOUTLN_H_ */
|
||||
|
||||
|
||||
/* END */
|
205
libs/include/freetype2/freetype/ftparams.h
Normal file
@ -0,0 +1,205 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftparams.h */
|
||||
/* */
|
||||
/* FreeType API for possible FT_Parameter tags (specification only). */
|
||||
/* */
|
||||
/* Copyright 2017-2018 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 FTPARAMS_H_
|
||||
#define FTPARAMS_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:
|
||||
* parameter_tags
|
||||
*
|
||||
* @title:
|
||||
* Parameter Tags
|
||||
*
|
||||
* @abstract:
|
||||
* Macros for driver property and font loading parameter tags.
|
||||
*
|
||||
* @description:
|
||||
* This section contains macros for the @FT_Parameter structure that are
|
||||
* used with various functions to activate some special functionality or
|
||||
* different behaviour of various components of FreeType.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
|
||||
*
|
||||
* @description:
|
||||
* A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
|
||||
* family names in the `name' table (introduced in OpenType version
|
||||
* 1.4). Use this for backward compatibility with legacy systems that
|
||||
* have a four-faces-per-family restriction.
|
||||
*
|
||||
* @since:
|
||||
* 2.8
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
|
||||
FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
|
||||
|
||||
|
||||
/* this constant is deprecated */
|
||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
|
||||
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
|
||||
*
|
||||
* @description:
|
||||
* A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
|
||||
* subfamily names in the `name' table (introduced in OpenType version
|
||||
* 1.4). Use this for backward compatibility with legacy systems that
|
||||
* have a four-faces-per-family restriction.
|
||||
*
|
||||
* @since:
|
||||
* 2.8
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
|
||||
FT_MAKE_TAG( 'i', 'g', 'p', 's' )
|
||||
|
||||
|
||||
/* this constant is deprecated */
|
||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
|
||||
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_INCREMENTAL
|
||||
*
|
||||
* @description:
|
||||
* An @FT_Parameter tag to be used with @FT_Open_Face to indicate
|
||||
* incremental glyph loading.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_INCREMENTAL \
|
||||
FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_LCD_FILTER_WEIGHTS
|
||||
*
|
||||
* @description:
|
||||
* An @FT_Parameter tag to be used with @FT_Face_Properties. The
|
||||
* corresponding argument specifies the five LCD filter weights for a
|
||||
* given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
|
||||
* the global default values or the values set up with
|
||||
* @FT_Library_SetLcdFilterWeights.
|
||||
*
|
||||
* @since:
|
||||
* 2.8
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
|
||||
FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_RANDOM_SEED
|
||||
*
|
||||
* @description:
|
||||
* An @FT_Parameter tag to be used with @FT_Face_Properties. The
|
||||
* corresponding 32bit signed integer argument overrides the font
|
||||
* driver's random seed value with a face-specific one; see
|
||||
* @random-seed.
|
||||
*
|
||||
* @since:
|
||||
* 2.8
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_RANDOM_SEED \
|
||||
FT_MAKE_TAG( 's', 'e', 'e', 'd' )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_STEM_DARKENING
|
||||
*
|
||||
* @description:
|
||||
* An @FT_Parameter tag to be used with @FT_Face_Properties. The
|
||||
* corresponding Boolean argument specifies whether to apply stem
|
||||
* darkening, overriding the global default values or the values set up
|
||||
* with @FT_Property_Set (see @no-stem-darkening).
|
||||
*
|
||||
* This is a passive setting that only takes effect if the font driver
|
||||
* or autohinter honors it, which the CFF, Type~1, and CID drivers
|
||||
* always do, but the autohinter only in `light' hinting mode (as of
|
||||
* version 2.9).
|
||||
*
|
||||
* @since:
|
||||
* 2.8
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_STEM_DARKENING \
|
||||
FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_UNPATENTED_HINTING
|
||||
*
|
||||
* @description:
|
||||
* Deprecated, no effect.
|
||||
*
|
||||
* Previously: A constant used as the tag of an @FT_Parameter structure to
|
||||
* indicate that unpatented methods only should be used by the TrueType
|
||||
* bytecode interpreter for a typeface opened by @FT_Open_Face.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_UNPATENTED_HINTING \
|
||||
FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* FTPARAMS_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for accessing PFR-specific data (specification only). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTPFR_H__
|
||||
#define __FTPFR_H__
|
||||
#ifndef FTPFR_H_
|
||||
#define FTPFR_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -71,7 +71,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* ametrics_x_scale ::
|
||||
* A 16.16 fixed-point number used to scale distance expressed
|
||||
* in metrics units to device sub-pixels. This is equivalent to
|
||||
* in metrics units to device subpixels. This is equivalent to
|
||||
* `face->size->x_scale', but for metrics only. Optional (parameter
|
||||
* can be NULL).
|
||||
*
|
||||
@ -123,7 +123,7 @@ FT_BEGIN_HEADER
|
||||
* mode, which always returns distances converted to outline units.
|
||||
*
|
||||
* You can use the value of the `x_scale' and `y_scale' parameters
|
||||
* returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
|
||||
* returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_PFR_Kerning( FT_Face face,
|
||||
@ -154,7 +154,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @note:
|
||||
* You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
|
||||
* to convert the advance to device sub-pixels (i.e., 1/64th of pixels).
|
||||
* to convert the advance to device subpixels (i.e., 1/64th of pixels).
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_PFR_Advance( FT_Face face,
|
||||
@ -166,7 +166,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTPFR_H__ */
|
||||
#endif /* FTPFR_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType renderer modules public interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2005, 2006, 2010 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTRENDER_H__
|
||||
#define __FTRENDER_H__
|
||||
#ifndef FTRENDER_H_
|
||||
#define FTRENDER_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -75,6 +75,7 @@ FT_BEGIN_HEADER
|
||||
{
|
||||
FT_Long glyph_size;
|
||||
FT_Glyph_Format glyph_format;
|
||||
|
||||
FT_Glyph_InitFunc glyph_init;
|
||||
FT_Glyph_DoneFunc glyph_done;
|
||||
FT_Glyph_CopyFunc glyph_copy;
|
||||
@ -87,7 +88,7 @@ FT_BEGIN_HEADER
|
||||
typedef FT_Error
|
||||
(*FT_Renderer_RenderFunc)( FT_Renderer renderer,
|
||||
FT_GlyphSlot slot,
|
||||
FT_UInt mode,
|
||||
FT_Render_Mode mode,
|
||||
const FT_Vector* origin );
|
||||
|
||||
typedef FT_Error
|
||||
@ -212,13 +213,8 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* This doesn't change the current renderer for other formats. */
|
||||
/* */
|
||||
/* Currently, only the B/W renderer, if compiled with */
|
||||
/* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */
|
||||
/* anti-aliasing mode; this option must be set directly in */
|
||||
/* `ftraster.c' and is undefined by default) accepts a single tag */
|
||||
/* `pal5' to set its gray palette as a character string with */
|
||||
/* 5~elements. Consequently, the third and fourth argument are zero */
|
||||
/* normally. */
|
||||
/* Currently, no FreeType renderer module uses `parameters'; you */
|
||||
/* should thus always pass NULL as the value. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Renderer( FT_Library library,
|
||||
@ -226,13 +222,12 @@ FT_BEGIN_HEADER
|
||||
FT_UInt num_params,
|
||||
FT_Parameter* parameters );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTRENDER_H__ */
|
||||
#endif /* FTRENDER_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType size objects management (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -25,8 +25,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTSIZES_H__
|
||||
#define __FTSIZES_H__
|
||||
#ifndef FTSIZES_H_
|
||||
#define FTSIZES_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -129,7 +129,7 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* Even though it is possible to create several size objects for a */
|
||||
/* given face (see @FT_New_Size for details), functions like */
|
||||
/* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */
|
||||
/* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */
|
||||
/* activated last to determine the `current character pixel size'. */
|
||||
/* */
|
||||
/* This function can be used to `activate' a previously created size */
|
||||
@ -153,7 +153,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTSIZES_H__ */
|
||||
#endif /* FTSIZES_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -2,12 +2,12 @@
|
||||
/* */
|
||||
/* ftsnames.h */
|
||||
/* */
|
||||
/* Simple interface to access SFNT name tables (which are used */
|
||||
/* Simple interface to access SFNT `name' tables (which are used */
|
||||
/* to hold font names, copyright info, notices, etc.) (specification). */
|
||||
/* */
|
||||
/* This is _not_ used to retrieve glyph names! */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -19,12 +19,13 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FT_SFNT_NAMES_H__
|
||||
#define __FT_SFNT_NAMES_H__
|
||||
#ifndef FTSNAMES_H_
|
||||
#define FTSNAMES_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_PARAMETER_TAGS_H
|
||||
|
||||
#ifdef FREETYPE_H
|
||||
#error "freetype.h of FreeType 1 has been loaded!"
|
||||
@ -49,7 +50,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The TrueType and OpenType specifications allow the inclusion of */
|
||||
/* a special `names table' in font files. This table contains */
|
||||
/* a special names table (`name') in font files. This table contains */
|
||||
/* textual (and internationalized) information regarding the font, */
|
||||
/* like family name, copyright, version, etc. */
|
||||
/* */
|
||||
@ -70,30 +71,37 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* platform_id :: The platform ID for `string'. */
|
||||
/* See @TT_PLATFORM_XXX for possible values. */
|
||||
/* */
|
||||
/* encoding_id :: The encoding ID for `string'. */
|
||||
/* See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */
|
||||
/* @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */
|
||||
/* for possible values. */
|
||||
/* */
|
||||
/* language_id :: The language ID for `string'. */
|
||||
/* See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for */
|
||||
/* possible values. */
|
||||
/* */
|
||||
/* Registered OpenType values for `language_id' are */
|
||||
/* always smaller than 0x8000; values equal or larger */
|
||||
/* than 0x8000 usually indicate a language tag string */
|
||||
/* (introduced in OpenType version 1.6). Use function */
|
||||
/* @FT_Get_Sfnt_LangTag with `language_id' as its */
|
||||
/* argument to retrieve the associated language tag. */
|
||||
/* */
|
||||
/* name_id :: An identifier for `string'. */
|
||||
/* See @TT_NAME_ID_XXX for possible values. */
|
||||
/* */
|
||||
/* string :: The `name' string. Note that its format differs */
|
||||
/* depending on the (platform,encoding) pair. It can */
|
||||
/* be a Pascal String, a UTF-16 one, etc. */
|
||||
/* */
|
||||
/* Generally speaking, the string is not */
|
||||
/* zero-terminated. Please refer to the TrueType */
|
||||
/* specification for details. */
|
||||
/* depending on the (platform,encoding) pair, being */
|
||||
/* either a string of bytes (without a terminating */
|
||||
/* NULL byte) or containing UTF-16BE entities. */
|
||||
/* */
|
||||
/* string_len :: The length of `string' in bytes. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Possible values for `platform_id', `encoding_id', `language_id', */
|
||||
/* and `name_id' are given in the file `ttnameid.h'. For details */
|
||||
/* please refer to the TrueType or OpenType specification. */
|
||||
/* */
|
||||
/* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */
|
||||
/* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */
|
||||
/* Please refer to the TrueType or OpenType specification for more */
|
||||
/* details. */
|
||||
/* */
|
||||
typedef struct FT_SfntName_
|
||||
{
|
||||
@ -147,54 +155,99 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The `string' array returned in the `aname' structure is not */
|
||||
/* null-terminated. The application should deallocate it if it is no */
|
||||
/* longer in use. */
|
||||
/* null-terminated. Note that you don't have to deallocate `string' */
|
||||
/* by yourself; FreeType takes care of it if you call @FT_Done_Face. */
|
||||
/* */
|
||||
/* Use @FT_Get_Sfnt_Name_Count to get the total number of available */
|
||||
/* `name' table entries, then do a loop until you get the right */
|
||||
/* platform, encoding, and name ID. */
|
||||
/* */
|
||||
/* `name' table format~1 entries can use language tags also, see */
|
||||
/* @FT_Get_Sfnt_LangTag. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Sfnt_Name( FT_Face face,
|
||||
FT_UInt idx,
|
||||
FT_SfntName *aname );
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
|
||||
*
|
||||
* @description:
|
||||
* A constant used as the tag of @FT_Parameter structures to make
|
||||
* FT_Open_Face() ignore preferred family subfamily names in `name'
|
||||
* table since OpenType version 1.4. For backwards compatibility with
|
||||
* legacy systems which has 4-face-per-family restriction.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_SfntLangTag */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to model a language tag entry from an SFNT `name' */
|
||||
/* table. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* string :: The language tag string, encoded in UTF-16BE */
|
||||
/* (without trailing NULL bytes). */
|
||||
/* */
|
||||
/* string_len :: The length of `string' in *bytes*. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Please refer to the TrueType or OpenType specification for more */
|
||||
/* details. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.8 */
|
||||
/* */
|
||||
typedef struct FT_SfntLangTag_
|
||||
{
|
||||
FT_Byte* string; /* this string is *not* null-terminated! */
|
||||
FT_UInt string_len; /* in bytes */
|
||||
|
||||
} FT_SfntLangTag;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
|
||||
*
|
||||
* @description:
|
||||
* A constant used as the tag of @FT_Parameter structures to make
|
||||
* FT_Open_Face() ignore preferred subfamily names in `name' table since
|
||||
* OpenType version 1.4. For backwards compatibility with legacy
|
||||
* systems which has 4-face-per-family restriction.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Sfnt_LangTag */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieve the language tag associated with a language ID of an SFNT */
|
||||
/* `name' table entry. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* langID :: The language ID, as returned by @FT_Get_Sfnt_Name. */
|
||||
/* This is always a value larger than 0x8000. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* alangTag :: The language tag associated with the `name' table */
|
||||
/* entry's language ID. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The `string' array returned in the `alangTag' structure is not */
|
||||
/* null-terminated. Note that you don't have to deallocate `string' */
|
||||
/* by yourself; FreeType takes care of it if you call @FT_Done_Face. */
|
||||
/* */
|
||||
/* Only `name' table format~1 supports language tags. For format~0 */
|
||||
/* tables, this function always returns FT_Err_Invalid_Table. For */
|
||||
/* invalid format~1 language ID values, FT_Err_Invalid_Argument is */
|
||||
/* returned. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.8 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Sfnt_LangTag( FT_Face face,
|
||||
FT_UInt langID,
|
||||
FT_SfntLangTag *alangTag );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FT_SFNT_NAMES_H__ */
|
||||
#endif /* FTSNAMES_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType path stroker (specification). */
|
||||
/* */
|
||||
/* Copyright 2002-2006, 2008, 2009, 2011-2012 by */
|
||||
/* Copyright 2002-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FT_STROKE_H__
|
||||
#define __FT_STROKE_H__
|
||||
#ifndef FTSTROKE_H_
|
||||
#define FTSTROKE_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_OUTLINE_H
|
||||
@ -46,6 +46,38 @@ FT_BEGIN_HEADER
|
||||
* This can be useful to generate `bordered' glyph, i.e., glyphs
|
||||
* displayed with a coloured (and anti-aliased) border around their
|
||||
* shape.
|
||||
*
|
||||
* @order:
|
||||
* FT_Stroker
|
||||
*
|
||||
* FT_Stroker_LineJoin
|
||||
* FT_Stroker_LineCap
|
||||
* FT_StrokerBorder
|
||||
*
|
||||
* FT_Outline_GetInsideBorder
|
||||
* FT_Outline_GetOutsideBorder
|
||||
*
|
||||
* FT_Glyph_Stroke
|
||||
* FT_Glyph_StrokeBorder
|
||||
*
|
||||
* FT_Stroker_New
|
||||
* FT_Stroker_Set
|
||||
* FT_Stroker_Rewind
|
||||
* FT_Stroker_ParseOutline
|
||||
* FT_Stroker_Done
|
||||
*
|
||||
* FT_Stroker_BeginSubPath
|
||||
* FT_Stroker_EndSubPath
|
||||
*
|
||||
* FT_Stroker_LineTo
|
||||
* FT_Stroker_ConicTo
|
||||
* FT_Stroker_CubicTo
|
||||
*
|
||||
* FT_Stroker_GetBorderCounts
|
||||
* FT_Stroker_ExportBorder
|
||||
* FT_Stroker_GetCounts
|
||||
* FT_Stroker_Export
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -55,7 +87,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Stroker
|
||||
*
|
||||
* @description:
|
||||
* Opaque handler to a path stroker object.
|
||||
* Opaque handle to a path stroker object.
|
||||
*/
|
||||
typedef struct FT_StrokerRec_* FT_Stroker;
|
||||
|
||||
@ -104,7 +136,7 @@ FT_BEGIN_HEADER
|
||||
* FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
|
||||
* join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
|
||||
* for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
|
||||
* backwards compatibility.
|
||||
* backward compatibility.
|
||||
*/
|
||||
typedef enum FT_Stroker_LineJoin_
|
||||
{
|
||||
@ -276,6 +308,8 @@ FT_BEGIN_HEADER
|
||||
* @note:
|
||||
* The radius is expressed in the same units as the outline
|
||||
* coordinates.
|
||||
*
|
||||
* This function calls @FT_Stroker_Rewind automatically.
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Stroker_Set( FT_Stroker stroker,
|
||||
@ -432,7 +466,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Stroker_ConicTo
|
||||
*
|
||||
* @description:
|
||||
* `Draw' a single quadratic Bézier in the stroker's current sub-path,
|
||||
* `Draw' a single quadratic Bezier in the stroker's current sub-path,
|
||||
* from the last position.
|
||||
*
|
||||
* @input:
|
||||
@ -440,7 +474,7 @@ FT_BEGIN_HEADER
|
||||
* The target stroker handle.
|
||||
*
|
||||
* control ::
|
||||
* A pointer to a Bézier control point.
|
||||
* A pointer to a Bezier control point.
|
||||
*
|
||||
* to ::
|
||||
* A pointer to the destination point.
|
||||
@ -464,7 +498,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Stroker_CubicTo
|
||||
*
|
||||
* @description:
|
||||
* `Draw' a single cubic Bézier in the stroker's current sub-path,
|
||||
* `Draw' a single cubic Bezier in the stroker's current sub-path,
|
||||
* from the last position.
|
||||
*
|
||||
* @input:
|
||||
@ -472,10 +506,10 @@ FT_BEGIN_HEADER
|
||||
* The target stroker handle.
|
||||
*
|
||||
* control1 ::
|
||||
* A pointer to the first Bézier control point.
|
||||
* A pointer to the first Bezier control point.
|
||||
*
|
||||
* control2 ::
|
||||
* A pointer to second Bézier control point.
|
||||
* A pointer to second Bezier control point.
|
||||
*
|
||||
* to ::
|
||||
* A pointer to the destination point.
|
||||
@ -570,7 +604,7 @@ FT_BEGIN_HEADER
|
||||
* receive all new data.
|
||||
*
|
||||
* When an outline, or a sub-path, is `closed', the stroker generates
|
||||
* two independent `border' outlines, named `left' and `right'
|
||||
* two independent `border' outlines, named `left' and `right'.
|
||||
*
|
||||
* When the outline, or a sub-path, is `opened', the stroker merges
|
||||
* the `border' outlines with caps. The `left' border receives all
|
||||
@ -740,7 +774,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FT_STROKE_H__ */
|
||||
#endif /* FTSTROKE_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
/* FreeType synthesizing code for emboldening and slanting */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 2000-2001, 2003, 2006, 2008, 2012 by */
|
||||
/* Copyright 2000-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -37,12 +37,12 @@
|
||||
/* Main reason for not lifting the functions in this module to a */
|
||||
/* `standard' API is that the used parameters for emboldening and */
|
||||
/* slanting are not configurable. Consider the functions as a */
|
||||
/* code resource which should be copied into the application and */
|
||||
/* code resource that should be copied into the application and */
|
||||
/* adapted to the particular needs. */
|
||||
|
||||
|
||||
#ifndef __FTSYNTH_H__
|
||||
#define __FTSYNTH_H__
|
||||
#ifndef FTSYNTH_H_
|
||||
#define FTSYNTH_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -62,8 +62,10 @@ FT_BEGIN_HEADER
|
||||
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
|
||||
/* */
|
||||
/* For emboldened outlines the height, width, and advance metrics are */
|
||||
/* increased by the strength of the emboldening. You can also call */
|
||||
/* @FT_Outline_Get_CBox to get precise values. */
|
||||
/* increased by the strength of the emboldening -- this even affects */
|
||||
/* mono-width fonts! */
|
||||
/* */
|
||||
/* You can also call @FT_Outline_Get_CBox to get precise values. */
|
||||
FT_EXPORT( void )
|
||||
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
|
||||
|
||||
@ -73,9 +75,10 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTSYNTH_H__ */
|
||||
#endif /* FTSYNTH_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType low-level system interface definition (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2005, 2010 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTSYSTEM_H__
|
||||
#define __FTSYSTEM_H__
|
||||
#ifndef FTSYSTEM_H_
|
||||
#define FTSYSTEM_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -192,6 +192,10 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* A handle to an input stream.
|
||||
*
|
||||
* @also:
|
||||
* See @FT_StreamRec for the publicly accessible fields of a given
|
||||
* stream object.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_StreamRec_* FT_Stream;
|
||||
|
||||
@ -285,6 +289,11 @@ FT_BEGIN_HEADER
|
||||
* size ::
|
||||
* The stream size in bytes.
|
||||
*
|
||||
* In case of compressed streams where the size is unknown before
|
||||
* actually doing the decompression, the value is set to 0x7FFFFFFF.
|
||||
* (Note that this size value can occur for normal streams also; it is
|
||||
* thus just a hint.)
|
||||
*
|
||||
* pos ::
|
||||
* The current position within the stream.
|
||||
*
|
||||
@ -335,13 +344,12 @@ FT_BEGIN_HEADER
|
||||
|
||||
} FT_StreamRec;
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTSYSTEM_H__ */
|
||||
#endif /* FTSYSTEM_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType trigonometric functions (specification). */
|
||||
/* */
|
||||
/* Copyright 2001, 2003, 2005, 2007, 2013 by */
|
||||
/* Copyright 2001-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTTRIGON_H__
|
||||
#define __FTTRIGON_H__
|
||||
#ifndef FTTRIGON_H_
|
||||
#define FTTRIGON_H_
|
||||
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
@ -225,8 +225,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Return the unit vector corresponding to a given angle. After the
|
||||
* call, the value of `vec.x' will be `sin(angle)', and the value of
|
||||
* `vec.y' will be `cos(angle)'.
|
||||
* call, the value of `vec.x' will be `cos(angle)', and the value of
|
||||
* `vec.y' will be `sin(angle)'.
|
||||
*
|
||||
* This function is useful to retrieve both the sinus and cosinus of a
|
||||
* given angle quickly.
|
||||
@ -237,7 +237,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @input:
|
||||
* angle ::
|
||||
* The address of angle.
|
||||
* The input angle.
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
@ -259,7 +259,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @input:
|
||||
* angle ::
|
||||
* The address of angle.
|
||||
* The input angle.
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
@ -344,7 +344,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTTRIGON_H__ */
|
||||
#endif /* FTTRIGON_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType simple types definitions (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2002, 2004, 2006-2009, 2012, 2013 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTTYPES_H__
|
||||
#define __FTTYPES_H__
|
||||
#ifndef FTTYPES_H_
|
||||
#define FTTYPES_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -57,6 +57,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_UInt16 */
|
||||
/* FT_Int32 */
|
||||
/* FT_UInt32 */
|
||||
/* FT_Int64 */
|
||||
/* FT_UInt64 */
|
||||
/* FT_Short */
|
||||
/* FT_UShort */
|
||||
/* FT_Long */
|
||||
@ -78,7 +80,9 @@ FT_BEGIN_HEADER
|
||||
/* FT_F2Dot14 */
|
||||
/* FT_UnitVector */
|
||||
/* FT_F26Dot6 */
|
||||
/* FT_Data */
|
||||
/* */
|
||||
/* FT_MAKE_TAG */
|
||||
/* */
|
||||
/* FT_Generic */
|
||||
/* FT_Generic_Finalizer */
|
||||
@ -418,7 +422,7 @@ FT_BEGIN_HEADER
|
||||
/* details of usage. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* The address of the FreeType object which is under finalization. */
|
||||
/* The address of the FreeType object that is under finalization. */
|
||||
/* Its client data is accessed through its `generic' field. */
|
||||
/* */
|
||||
typedef void (*FT_Generic_Finalizer)( void* object );
|
||||
@ -466,8 +470,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_MAKE_TAG */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This macro converts four-letter tags which are used to label */
|
||||
/* TrueType tables into an unsigned long to be used within FreeType. */
|
||||
/* This macro converts four-letter tags that are used to label */
|
||||
/* TrueType tables into an unsigned long, to be used within FreeType. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The produced values *must* be 32-bit integers. Don't redefine */
|
||||
@ -567,9 +571,9 @@ FT_BEGIN_HEADER
|
||||
|
||||
} FT_ListRec;
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
||||
#define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
||||
|
||||
@ -592,7 +596,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTTYPES_H__ */
|
||||
#endif /* FTTYPES_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for accessing Windows fnt-specific data. */
|
||||
/* */
|
||||
/* Copyright 2003, 2004, 2008 by */
|
||||
/* Copyright 2003-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTWINFNT_H__
|
||||
#define __FTWINFNT_H__
|
||||
#ifndef FTWINFNT_H_
|
||||
#define FTWINFNT_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -58,9 +58,10 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* A list of valid values for the `charset' byte in
|
||||
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
|
||||
* encodings (except for cp1361) can be found at ftp://ftp.unicode.org
|
||||
* in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
|
||||
* roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
|
||||
* encodings (except for cp1361) can be found at
|
||||
* ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
|
||||
* subdirectory. cp1361 is roughly a superset of
|
||||
* MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
|
||||
*
|
||||
* @values:
|
||||
* FT_WinFNT_ID_DEFAULT ::
|
||||
@ -77,7 +78,7 @@ FT_BEGIN_HEADER
|
||||
* Mac Roman encoding.
|
||||
*
|
||||
* FT_WinFNT_ID_OEM ::
|
||||
* From Michael Pöttgen <michael@poettgen.de>:
|
||||
* From Michael Poettgen <michael@poettgen.de>:
|
||||
*
|
||||
* The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
|
||||
* is used for the charset of vector fonts, like `modern.fon',
|
||||
@ -94,7 +95,7 @@ FT_BEGIN_HEADER
|
||||
* second default codepage that most international versions of
|
||||
* Windows have. It is one of the OEM codepages from
|
||||
*
|
||||
* http://www.microsoft.com/globaldev/reference/cphome.mspx,
|
||||
* https://msdn.microsoft.com/en-us/goglobal/bb964655,
|
||||
*
|
||||
* and is used for the `DOS boxes', to support legacy applications.
|
||||
* A German Windows version for example usually uses ANSI codepage
|
||||
@ -258,12 +259,12 @@ FT_BEGIN_HEADER
|
||||
FT_Get_WinFNT_Header( FT_Face face,
|
||||
FT_WinFNT_HeaderRec *aheader );
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTWINFNT_H__ */
|
||||
#endif /* FTWINFNT_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
/* Basic Type 1/Type 2 tables definitions and interface (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -17,8 +17,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __T1TABLES_H__
|
||||
#define __T1TABLES_H__
|
||||
#ifndef T1TABLES_H_
|
||||
#define T1TABLES_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -49,6 +49,26 @@ FT_BEGIN_HEADER
|
||||
/* This section contains the definition of Type 1-specific tables, */
|
||||
/* including structures related to other PostScript font formats. */
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* PS_FontInfoRec */
|
||||
/* PS_FontInfo */
|
||||
/* PS_PrivateRec */
|
||||
/* PS_Private */
|
||||
/* */
|
||||
/* CID_FaceDictRec */
|
||||
/* CID_FaceDict */
|
||||
/* CID_FaceInfoRec */
|
||||
/* CID_FaceInfo */
|
||||
/* */
|
||||
/* FT_Has_PS_Glyph_Names */
|
||||
/* FT_Get_PS_Font_Info */
|
||||
/* FT_Get_PS_Font_Private */
|
||||
/* FT_Get_PS_Font_Value */
|
||||
/* */
|
||||
/* T1_Blend_Flags */
|
||||
/* T1_EncodingType */
|
||||
/* PS_Dict_Keys */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
@ -190,14 +210,30 @@ FT_BEGIN_HEADER
|
||||
/* given blend dictionary (font info or private). Used to support */
|
||||
/* Multiple Masters fonts. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* T1_BLEND_UNDERLINE_POSITION :: */
|
||||
/* T1_BLEND_UNDERLINE_THICKNESS :: */
|
||||
/* T1_BLEND_ITALIC_ANGLE :: */
|
||||
/* T1_BLEND_BLUE_VALUES :: */
|
||||
/* T1_BLEND_OTHER_BLUES :: */
|
||||
/* T1_BLEND_STANDARD_WIDTH :: */
|
||||
/* T1_BLEND_STANDARD_HEIGHT :: */
|
||||
/* T1_BLEND_STEM_SNAP_WIDTHS :: */
|
||||
/* T1_BLEND_STEM_SNAP_HEIGHTS :: */
|
||||
/* T1_BLEND_BLUE_SCALE :: */
|
||||
/* T1_BLEND_BLUE_SHIFT :: */
|
||||
/* T1_BLEND_FAMILY_BLUES :: */
|
||||
/* T1_BLEND_FAMILY_OTHER_BLUES :: */
|
||||
/* T1_BLEND_FORCE_BOLD :: */
|
||||
/* */
|
||||
typedef enum T1_Blend_Flags_
|
||||
{
|
||||
/*# required fields in a FontInfo blend dictionary */
|
||||
/* required fields in a FontInfo blend dictionary */
|
||||
T1_BLEND_UNDERLINE_POSITION = 0,
|
||||
T1_BLEND_UNDERLINE_THICKNESS,
|
||||
T1_BLEND_ITALIC_ANGLE,
|
||||
|
||||
/*# required fields in a Private blend dictionary */
|
||||
/* required fields in a Private blend dictionary */
|
||||
T1_BLEND_BLUE_VALUES,
|
||||
T1_BLEND_OTHER_BLUES,
|
||||
T1_BLEND_STANDARD_WIDTH,
|
||||
@ -210,15 +246,13 @@ FT_BEGIN_HEADER
|
||||
T1_BLEND_FAMILY_OTHER_BLUES,
|
||||
T1_BLEND_FORCE_BOLD,
|
||||
|
||||
/*# never remove */
|
||||
T1_BLEND_MAX
|
||||
T1_BLEND_MAX /* do not remove */
|
||||
|
||||
} T1_Blend_Flags;
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/*# backwards compatible definitions */
|
||||
/* these constants are deprecated; use the corresponding */
|
||||
/* `T1_Blend_Flags' values instead */
|
||||
#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
|
||||
#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
|
||||
#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
|
||||
@ -235,6 +269,8 @@ FT_BEGIN_HEADER
|
||||
#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
|
||||
#define t1_blend_max T1_BLEND_MAX
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/* maximum number of Multiple Masters designs, as defined in the spec */
|
||||
#define T1_MAX_MM_DESIGNS 16
|
||||
@ -255,7 +291,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
} PS_DesignMapRec, *PS_DesignMap;
|
||||
|
||||
/* backwards-compatible definition */
|
||||
/* backward compatible definition */
|
||||
typedef PS_DesignMapRec T1_DesignMap;
|
||||
|
||||
|
||||
@ -290,7 +326,7 @@ FT_BEGIN_HEADER
|
||||
} PS_BlendRec, *PS_Blend;
|
||||
|
||||
|
||||
/* backwards-compatible definition */
|
||||
/* backward compatible definition */
|
||||
typedef PS_BlendRec T1_Blend;
|
||||
|
||||
|
||||
@ -333,10 +369,17 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
typedef struct CID_FaceDictRec_* CID_FaceDict;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* CID_FontDict */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This type is equivalent to @CID_FaceDictRec. It is deprecated but */
|
||||
/* kept to maintain source compatibility between various versions of */
|
||||
/* FreeType. */
|
||||
/* */
|
||||
|
||||
|
||||
/* backwards-compatible definition */
|
||||
typedef CID_FaceDictRec CID_FontDict;
|
||||
|
||||
|
||||
@ -449,8 +492,9 @@ FT_BEGIN_HEADER
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* The string pointers within the font info structure are owned by
|
||||
* the face and don't need to be freed by the caller.
|
||||
* String pointers within the @PS_FontInfoRec structure are owned by
|
||||
* the face and don't need to be freed by the caller. Missing entries
|
||||
* in the font's FontInfo dictionary are represented by NULL pointers.
|
||||
*
|
||||
* If the font's format is not PostScript-based, this function will
|
||||
* return the `FT_Err_Invalid_Argument' error code.
|
||||
@ -503,6 +547,16 @@ FT_BEGIN_HEADER
|
||||
/* An enumeration describing the `Encoding' entry in a Type 1 */
|
||||
/* dictionary. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* T1_ENCODING_TYPE_NONE :: */
|
||||
/* T1_ENCODING_TYPE_ARRAY :: */
|
||||
/* T1_ENCODING_TYPE_STANDARD :: */
|
||||
/* T1_ENCODING_TYPE_ISOLATIN1 :: */
|
||||
/* T1_ENCODING_TYPE_EXPERT :: */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.4.8 */
|
||||
/* */
|
||||
typedef enum T1_EncodingType_
|
||||
{
|
||||
T1_ENCODING_TYPE_NONE = 0,
|
||||
@ -523,6 +577,57 @@ FT_BEGIN_HEADER
|
||||
/* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */
|
||||
/* the Type~1 dictionary entry to retrieve. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* PS_DICT_FONT_TYPE :: */
|
||||
/* PS_DICT_FONT_MATRIX :: */
|
||||
/* PS_DICT_FONT_BBOX :: */
|
||||
/* PS_DICT_PAINT_TYPE :: */
|
||||
/* PS_DICT_FONT_NAME :: */
|
||||
/* PS_DICT_UNIQUE_ID :: */
|
||||
/* PS_DICT_NUM_CHAR_STRINGS :: */
|
||||
/* PS_DICT_CHAR_STRING_KEY :: */
|
||||
/* PS_DICT_CHAR_STRING :: */
|
||||
/* PS_DICT_ENCODING_TYPE :: */
|
||||
/* PS_DICT_ENCODING_ENTRY :: */
|
||||
/* PS_DICT_NUM_SUBRS :: */
|
||||
/* PS_DICT_SUBR :: */
|
||||
/* PS_DICT_STD_HW :: */
|
||||
/* PS_DICT_STD_VW :: */
|
||||
/* PS_DICT_NUM_BLUE_VALUES :: */
|
||||
/* PS_DICT_BLUE_VALUE :: */
|
||||
/* PS_DICT_BLUE_FUZZ :: */
|
||||
/* PS_DICT_NUM_OTHER_BLUES :: */
|
||||
/* PS_DICT_OTHER_BLUE :: */
|
||||
/* PS_DICT_NUM_FAMILY_BLUES :: */
|
||||
/* PS_DICT_FAMILY_BLUE :: */
|
||||
/* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */
|
||||
/* PS_DICT_FAMILY_OTHER_BLUE :: */
|
||||
/* PS_DICT_BLUE_SCALE :: */
|
||||
/* PS_DICT_BLUE_SHIFT :: */
|
||||
/* PS_DICT_NUM_STEM_SNAP_H :: */
|
||||
/* PS_DICT_STEM_SNAP_H :: */
|
||||
/* PS_DICT_NUM_STEM_SNAP_V :: */
|
||||
/* PS_DICT_STEM_SNAP_V :: */
|
||||
/* PS_DICT_FORCE_BOLD :: */
|
||||
/* PS_DICT_RND_STEM_UP :: */
|
||||
/* PS_DICT_MIN_FEATURE :: */
|
||||
/* PS_DICT_LEN_IV :: */
|
||||
/* PS_DICT_PASSWORD :: */
|
||||
/* PS_DICT_LANGUAGE_GROUP :: */
|
||||
/* PS_DICT_VERSION :: */
|
||||
/* PS_DICT_NOTICE :: */
|
||||
/* PS_DICT_FULL_NAME :: */
|
||||
/* PS_DICT_FAMILY_NAME :: */
|
||||
/* PS_DICT_WEIGHT :: */
|
||||
/* PS_DICT_IS_FIXED_PITCH :: */
|
||||
/* PS_DICT_UNDERLINE_POSITION :: */
|
||||
/* PS_DICT_UNDERLINE_THICKNESS :: */
|
||||
/* PS_DICT_FS_TYPE :: */
|
||||
/* PS_DICT_ITALIC_ANGLE :: */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.4.8 */
|
||||
/* */
|
||||
typedef enum PS_Dict_Keys_
|
||||
{
|
||||
/* conventionally in the font dictionary */
|
||||
@ -644,6 +749,9 @@ FT_BEGIN_HEADER
|
||||
* If the font's format is not PostScript-based, this function returns
|
||||
* the `FT_Err_Invalid_Argument' error code.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.8
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Long )
|
||||
FT_Get_PS_Font_Value( FT_Face face,
|
||||
@ -656,7 +764,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __T1TABLES_H__ */
|
||||
#endif /* T1TABLES_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* TrueType name ID definitions (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2004, 2006-2008, 2012 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __TTNAMEID_H__
|
||||
#define __TTNAMEID_H__
|
||||
#ifndef TTNAMEID_H_
|
||||
#define TTNAMEID_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -36,7 +36,7 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Possible values for the `platform' identifier code in the name */
|
||||
/* records of the TTF `name' table. */
|
||||
/* records of an SFNT `name' table. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -119,6 +119,10 @@ FT_BEGIN_HEADER
|
||||
* TT_APPLE_ID_VARIANT_SELECTOR ::
|
||||
* From Adobe, not Apple. Not a normal cmap. Specifies variations
|
||||
* on a real cmap.
|
||||
*
|
||||
* TT_APPLE_ID_FULL_UNICODE ::
|
||||
* Used for fallback fonts that provide complete Unicode coverage with
|
||||
* a type~13 cmap.
|
||||
*/
|
||||
|
||||
#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
|
||||
@ -127,6 +131,7 @@ FT_BEGIN_HEADER
|
||||
#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
|
||||
#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */
|
||||
#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */
|
||||
#define TT_APPLE_ID_FULL_UNICODE 6 /* used with type 13 cmaps */
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
@ -137,42 +142,6 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* A list of valid values for the `encoding_id' for
|
||||
* @TT_PLATFORM_MACINTOSH charmaps and name entries.
|
||||
*
|
||||
* @values:
|
||||
* TT_MAC_ID_ROMAN ::
|
||||
* TT_MAC_ID_JAPANESE ::
|
||||
* TT_MAC_ID_TRADITIONAL_CHINESE ::
|
||||
* TT_MAC_ID_KOREAN ::
|
||||
* TT_MAC_ID_ARABIC ::
|
||||
* TT_MAC_ID_HEBREW ::
|
||||
* TT_MAC_ID_GREEK ::
|
||||
* TT_MAC_ID_RUSSIAN ::
|
||||
* TT_MAC_ID_RSYMBOL ::
|
||||
* TT_MAC_ID_DEVANAGARI ::
|
||||
* TT_MAC_ID_GURMUKHI ::
|
||||
* TT_MAC_ID_GUJARATI ::
|
||||
* TT_MAC_ID_ORIYA ::
|
||||
* TT_MAC_ID_BENGALI ::
|
||||
* TT_MAC_ID_TAMIL ::
|
||||
* TT_MAC_ID_TELUGU ::
|
||||
* TT_MAC_ID_KANNADA ::
|
||||
* TT_MAC_ID_MALAYALAM ::
|
||||
* TT_MAC_ID_SINHALESE ::
|
||||
* TT_MAC_ID_BURMESE ::
|
||||
* TT_MAC_ID_KHMER ::
|
||||
* TT_MAC_ID_THAI ::
|
||||
* TT_MAC_ID_LAOTIAN ::
|
||||
* TT_MAC_ID_GEORGIAN ::
|
||||
* TT_MAC_ID_ARMENIAN ::
|
||||
* TT_MAC_ID_MALDIVIAN ::
|
||||
* TT_MAC_ID_SIMPLIFIED_CHINESE ::
|
||||
* TT_MAC_ID_TIBETAN ::
|
||||
* TT_MAC_ID_MONGOLIAN ::
|
||||
* TT_MAC_ID_GEEZ ::
|
||||
* TT_MAC_ID_SLAVIC ::
|
||||
* TT_MAC_ID_VIETNAMESE ::
|
||||
* TT_MAC_ID_SINDHI ::
|
||||
* TT_MAC_ID_UNINTERP ::
|
||||
*/
|
||||
|
||||
#define TT_MAC_ID_ROMAN 0
|
||||
@ -247,44 +216,47 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @values:
|
||||
* TT_MS_ID_SYMBOL_CS ::
|
||||
* Corresponds to Microsoft symbol encoding. See
|
||||
* @FT_ENCODING_MS_SYMBOL.
|
||||
* Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL.
|
||||
*
|
||||
* TT_MS_ID_UNICODE_CS ::
|
||||
* Corresponds to a Microsoft WGL4 charmap, matching Unicode. See
|
||||
* Microsoft WGL4 charmap, matching Unicode. See
|
||||
* @FT_ENCODING_UNICODE.
|
||||
*
|
||||
* TT_MS_ID_SJIS ::
|
||||
* Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS.
|
||||
* Shift JIS Japanese encoding. See @FT_ENCODING_SJIS.
|
||||
*
|
||||
* TT_MS_ID_GB2312 ::
|
||||
* Corresponds to Simplified Chinese as used in Mainland China. See
|
||||
* @FT_ENCODING_GB2312.
|
||||
* TT_MS_ID_PRC ::
|
||||
* Chinese encodings as used in the People's Republic of China (PRC).
|
||||
* This means the encodings GB~2312 and its supersets GBK and
|
||||
* GB~18030. See @FT_ENCODING_PRC.
|
||||
*
|
||||
* TT_MS_ID_BIG_5 ::
|
||||
* Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.
|
||||
* See @FT_ENCODING_BIG5.
|
||||
* Traditional Chinese as used in Taiwan and Hong Kong. See
|
||||
* @FT_ENCODING_BIG5.
|
||||
*
|
||||
* TT_MS_ID_WANSUNG ::
|
||||
* Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG.
|
||||
* Korean Extended Wansung encoding. See @FT_ENCODING_WANSUNG.
|
||||
*
|
||||
* TT_MS_ID_JOHAB ::
|
||||
* Corresponds to Johab encoding. See @FT_ENCODING_JOHAB.
|
||||
* Korean Johab encoding. See @FT_ENCODING_JOHAB.
|
||||
*
|
||||
* TT_MS_ID_UCS_4 ::
|
||||
* Corresponds to UCS-4 or UTF-32 charmaps. This has been added to
|
||||
* the OpenType specification version 1.4 (mid-2001.)
|
||||
* UCS-4 or UTF-32 charmaps. This has been added to the OpenType
|
||||
* specification version 1.4 (mid-2001).
|
||||
*/
|
||||
|
||||
#define TT_MS_ID_SYMBOL_CS 0
|
||||
#define TT_MS_ID_UNICODE_CS 1
|
||||
#define TT_MS_ID_SJIS 2
|
||||
#define TT_MS_ID_GB2312 3
|
||||
#define TT_MS_ID_PRC 3
|
||||
#define TT_MS_ID_BIG_5 4
|
||||
#define TT_MS_ID_WANSUNG 5
|
||||
#define TT_MS_ID_JOHAB 6
|
||||
#define TT_MS_ID_UCS_4 10
|
||||
|
||||
/* this value is deprecated */
|
||||
#define TT_MS_ID_GB2312 TT_MS_ID_PRC
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@ -312,17 +284,22 @@ FT_BEGIN_HEADER
|
||||
#define TT_ADOBE_ID_LATIN_1 3
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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. 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 */
|
||||
/* */
|
||||
/* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */
|
||||
/* */
|
||||
/***********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* TT_MAC_LANGID_XXX
|
||||
*
|
||||
* @description:
|
||||
* Possible values of the language identifier field in the name records
|
||||
* of the SFNT `name' table if the `platform' identifier code is
|
||||
* @TT_PLATFORM_MACINTOSH. These values are also used as return values
|
||||
* for function @FT_Get_CMap_Language_ID.
|
||||
*
|
||||
* The canonical source for Apple's IDs is
|
||||
*
|
||||
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html
|
||||
*/
|
||||
|
||||
#define TT_MAC_LANGID_ENGLISH 0
|
||||
#define TT_MAC_LANGID_FRENCH 1
|
||||
#define TT_MAC_LANGID_GERMAN 2
|
||||
@ -433,15 +410,6 @@ FT_BEGIN_HEADER
|
||||
#define TT_MAC_LANGID_JAVANESE 138
|
||||
#define TT_MAC_LANGID_SUNDANESE 139
|
||||
|
||||
|
||||
#if 0 /* these seem to be errors that have been dropped */
|
||||
|
||||
#define TT_MAC_LANGID_SCOTTISH_GAELIC 140
|
||||
#define TT_MAC_LANGID_IRISH_GAELIC 141
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* The following codes are new as of 2000-03-10 */
|
||||
#define TT_MAC_LANGID_GALICIAN 140
|
||||
#define TT_MAC_LANGID_AFRIKAANS 141
|
||||
@ -456,138 +424,112 @@ FT_BEGIN_HEADER
|
||||
#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Possible values of the language identifier field in the name records */
|
||||
/* of the TTF `name' table if the `platform' identifier code is */
|
||||
/* TT_PLATFORM_MICROSOFT. */
|
||||
/* */
|
||||
/* The canonical source for the MS assigned LCIDs is */
|
||||
/* */
|
||||
/* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */
|
||||
/* */
|
||||
/***********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* TT_MS_LANGID_XXX
|
||||
*
|
||||
* @description:
|
||||
* Possible values of the language identifier field in the name records
|
||||
* of the SFNT `name' table if the `platform' identifier code is
|
||||
* @TT_PLATFORM_MICROSOFT. These values are also used as return values
|
||||
* for function @FT_Get_CMap_Language_ID.
|
||||
*
|
||||
* The canonical source for Microsoft's IDs is
|
||||
*
|
||||
* https://www.microsoft.com/globaldev/reference/lcid-all.mspx ,
|
||||
*
|
||||
* however, we only provide macros for language identifiers present in
|
||||
* the OpenType specification: Microsoft has abandoned the concept of
|
||||
* LCIDs (language code identifiers), and format~1 of the `name' table
|
||||
* provides a better mechanism for languages not covered here.
|
||||
*
|
||||
* More legacy values not listed in the reference can be found in the
|
||||
* @FT_TRUETYPE_IDS_H header file.
|
||||
*/
|
||||
|
||||
#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
|
||||
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
|
||||
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801
|
||||
#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01
|
||||
#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01
|
||||
#define TT_MS_LANGID_ARABIC_LIBYA 0x1001
|
||||
#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401
|
||||
#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801
|
||||
#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01
|
||||
#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01
|
||||
#define TT_MS_LANGID_ARABIC_OMAN 0x2001
|
||||
#define TT_MS_LANGID_ARABIC_YEMEN 0x2401
|
||||
#define TT_MS_LANGID_ARABIC_SYRIA 0x2801
|
||||
#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01
|
||||
#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01
|
||||
#define TT_MS_LANGID_ARABIC_LEBANON 0x3001
|
||||
#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401
|
||||
#define TT_MS_LANGID_ARABIC_UAE 0x3801
|
||||
#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01
|
||||
#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01
|
||||
#define TT_MS_LANGID_ARABIC_QATAR 0x4001
|
||||
#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402
|
||||
#define TT_MS_LANGID_CATALAN_SPAIN 0x0403
|
||||
#define TT_MS_LANGID_CHINESE_GENERAL 0x0004
|
||||
#define TT_MS_LANGID_CATALAN_CATALAN 0x0403
|
||||
#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404
|
||||
#define TT_MS_LANGID_CHINESE_PRC 0x0804
|
||||
#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04
|
||||
#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04
|
||||
#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004
|
||||
|
||||
#if 1 /* this looks like the correct value */
|
||||
#define TT_MS_LANGID_CHINESE_MACAU 0x1404
|
||||
#else /* but beware, Microsoft may change its mind...
|
||||
the most recent Word reference has the following: */
|
||||
#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG
|
||||
#endif
|
||||
|
||||
#if 0 /* used only with .NET `cultures'; commented out */
|
||||
#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04
|
||||
#endif
|
||||
|
||||
#define TT_MS_LANGID_CHINESE_MACAO 0x1404
|
||||
#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405
|
||||
#define TT_MS_LANGID_DANISH_DENMARK 0x0406
|
||||
#define TT_MS_LANGID_GERMAN_GERMANY 0x0407
|
||||
#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807
|
||||
#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07
|
||||
#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07
|
||||
#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007
|
||||
#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407
|
||||
#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN 0x1407
|
||||
#define TT_MS_LANGID_GREEK_GREECE 0x0408
|
||||
|
||||
/* don't ask what this one means... It is commented out currently. */
|
||||
#if 0
|
||||
#define TT_MS_LANGID_GREEK_GREECE2 0x2008
|
||||
#endif
|
||||
|
||||
#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009
|
||||
#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409
|
||||
#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809
|
||||
#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09
|
||||
#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09
|
||||
#define TT_MS_LANGID_ENGLISH_CANADA 0x1009
|
||||
#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409
|
||||
#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809
|
||||
#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09
|
||||
#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09
|
||||
#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009
|
||||
#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409
|
||||
#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809
|
||||
#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09
|
||||
#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09
|
||||
#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009
|
||||
#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409
|
||||
#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809
|
||||
#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09
|
||||
#define TT_MS_LANGID_ENGLISH_INDIA 0x4009
|
||||
#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409
|
||||
#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809
|
||||
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a
|
||||
#define TT_MS_LANGID_SPANISH_MEXICO 0x080a
|
||||
#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a
|
||||
#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a
|
||||
#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a
|
||||
#define TT_MS_LANGID_SPANISH_PANAMA 0x180a
|
||||
#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a
|
||||
#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a
|
||||
#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a
|
||||
#define TT_MS_LANGID_SPANISH_PERU 0x280a
|
||||
#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a
|
||||
#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a
|
||||
#define TT_MS_LANGID_SPANISH_CHILE 0x340a
|
||||
#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a
|
||||
#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a
|
||||
#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a
|
||||
#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a
|
||||
#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a
|
||||
#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a
|
||||
#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a
|
||||
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a
|
||||
/* The following ID blatantly violate MS specs by using a */
|
||||
/* sublanguage > 0x1F. */
|
||||
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU
|
||||
#define TT_MS_LANGID_FINNISH_FINLAND 0x040b
|
||||
#define TT_MS_LANGID_FRENCH_FRANCE 0x040c
|
||||
#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c
|
||||
#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c
|
||||
#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c
|
||||
#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c
|
||||
#define TT_MS_LANGID_FRENCH_MONACO 0x180c
|
||||
#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c
|
||||
#define TT_MS_LANGID_FRENCH_REUNION 0x200c
|
||||
#define TT_MS_LANGID_FRENCH_CONGO 0x240c
|
||||
/* which was formerly: */
|
||||
#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO
|
||||
#define TT_MS_LANGID_FRENCH_SENEGAL 0x280c
|
||||
#define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c
|
||||
#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c
|
||||
#define TT_MS_LANGID_FRENCH_MALI 0x340c
|
||||
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
|
||||
#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c
|
||||
/* and another violation of the spec (see 0xE40aU) */
|
||||
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU
|
||||
#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d
|
||||
#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e
|
||||
#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f
|
||||
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A
|
||||
#define TT_MS_LANGID_SPANISH_MEXICO 0x080A
|
||||
#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT 0x0C0A
|
||||
#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A
|
||||
#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A
|
||||
#define TT_MS_LANGID_SPANISH_PANAMA 0x180A
|
||||
#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A
|
||||
#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A
|
||||
#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A
|
||||
#define TT_MS_LANGID_SPANISH_PERU 0x280A
|
||||
#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A
|
||||
#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A
|
||||
#define TT_MS_LANGID_SPANISH_CHILE 0x340A
|
||||
#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A
|
||||
#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A
|
||||
#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A
|
||||
#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A
|
||||
#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A
|
||||
#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A
|
||||
#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A
|
||||
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A
|
||||
#define TT_MS_LANGID_FINNISH_FINLAND 0x040B
|
||||
#define TT_MS_LANGID_FRENCH_FRANCE 0x040C
|
||||
#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C
|
||||
#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C
|
||||
#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C
|
||||
#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C
|
||||
#define TT_MS_LANGID_FRENCH_MONACO 0x180C
|
||||
#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D
|
||||
#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E
|
||||
#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F
|
||||
#define TT_MS_LANGID_ITALIAN_ITALY 0x0410
|
||||
#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810
|
||||
#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411
|
||||
#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412
|
||||
#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812
|
||||
#define TT_MS_LANGID_KOREAN_KOREA 0x0412
|
||||
#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413
|
||||
#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813
|
||||
#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414
|
||||
@ -595,208 +537,259 @@ FT_BEGIN_HEADER
|
||||
#define TT_MS_LANGID_POLISH_POLAND 0x0415
|
||||
#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416
|
||||
#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816
|
||||
#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417
|
||||
#define TT_MS_LANGID_ROMANSH_SWITZERLAND 0x0417
|
||||
#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418
|
||||
#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818
|
||||
#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419
|
||||
#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819
|
||||
#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a
|
||||
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a
|
||||
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a
|
||||
|
||||
#if 0 /* this used to be this value, but it looks like we were wrong */
|
||||
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a
|
||||
#else /* current sources say */
|
||||
#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a
|
||||
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a
|
||||
/* and XPsp2 Platform SDK added (2004-07-26) */
|
||||
/* Names are shortened to be significant within 40 chars. */
|
||||
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a
|
||||
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a
|
||||
#endif
|
||||
|
||||
#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b
|
||||
#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c
|
||||
#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d
|
||||
#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d
|
||||
#define TT_MS_LANGID_THAI_THAILAND 0x041e
|
||||
#define TT_MS_LANGID_TURKISH_TURKEY 0x041f
|
||||
#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A
|
||||
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A
|
||||
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A
|
||||
#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A
|
||||
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A
|
||||
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A
|
||||
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x1C1A
|
||||
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC 0x201A
|
||||
#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B
|
||||
#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C
|
||||
#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D
|
||||
#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D
|
||||
#define TT_MS_LANGID_THAI_THAILAND 0x041E
|
||||
#define TT_MS_LANGID_TURKISH_TURKEY 0x041F
|
||||
#define TT_MS_LANGID_URDU_PAKISTAN 0x0420
|
||||
#define TT_MS_LANGID_URDU_INDIA 0x0820
|
||||
#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421
|
||||
#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422
|
||||
#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423
|
||||
#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424
|
||||
#define TT_MS_LANGID_SLOVENIAN_SLOVENIA 0x0424
|
||||
#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425
|
||||
#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426
|
||||
#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427
|
||||
#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827
|
||||
#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428
|
||||
#define TT_MS_LANGID_FARSI_IRAN 0x0429
|
||||
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a
|
||||
#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b
|
||||
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c
|
||||
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c
|
||||
#define TT_MS_LANGID_BASQUE_SPAIN 0x042d
|
||||
#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e
|
||||
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f
|
||||
#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430
|
||||
#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431
|
||||
#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432
|
||||
#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433
|
||||
#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434
|
||||
#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435
|
||||
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A
|
||||
#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B
|
||||
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C
|
||||
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C
|
||||
#define TT_MS_LANGID_BASQUE_BASQUE 0x042D
|
||||
#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY 0x042E
|
||||
#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY 0x082E
|
||||
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F
|
||||
#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA 0x0432
|
||||
#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA 0x0434
|
||||
#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA 0x0435
|
||||
#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436
|
||||
#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437
|
||||
#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438
|
||||
#define TT_MS_LANGID_HINDI_INDIA 0x0439
|
||||
#define TT_MS_LANGID_MALTESE_MALTA 0x043a
|
||||
/* Added by XPsp2 Platform SDK (2004-07-26) */
|
||||
#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b
|
||||
#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b
|
||||
#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b
|
||||
#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b
|
||||
#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b
|
||||
#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b
|
||||
#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b
|
||||
#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b
|
||||
#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b
|
||||
/* ... and we also keep our old identifier... */
|
||||
#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b
|
||||
|
||||
#if 0 /* this seems to be a previous inversion */
|
||||
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c
|
||||
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c
|
||||
#else
|
||||
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c
|
||||
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c
|
||||
#endif
|
||||
|
||||
#define TT_MS_LANGID_YIDDISH_GERMANY 0x043d
|
||||
#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e
|
||||
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e
|
||||
#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f
|
||||
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440
|
||||
/* alias declared in Windows 2000 */
|
||||
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
|
||||
TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN
|
||||
|
||||
#define TT_MS_LANGID_SWAHILI_KENYA 0x0441
|
||||
#define TT_MS_LANGID_MALTESE_MALTA 0x043A
|
||||
#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B
|
||||
#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B
|
||||
#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B
|
||||
#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B
|
||||
#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B
|
||||
#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B
|
||||
#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B
|
||||
#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B
|
||||
#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B
|
||||
#define TT_MS_LANGID_IRISH_IRELAND 0x083C
|
||||
#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E
|
||||
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E
|
||||
#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN 0x043F
|
||||
#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/ 0x0440
|
||||
#define TT_MS_LANGID_KISWAHILI_KENYA 0x0441
|
||||
#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442
|
||||
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443
|
||||
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843
|
||||
#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444
|
||||
#define TT_MS_LANGID_TATAR_RUSSIA 0x0444
|
||||
#define TT_MS_LANGID_BENGALI_INDIA 0x0445
|
||||
#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845
|
||||
#define TT_MS_LANGID_PUNJABI_INDIA 0x0446
|
||||
#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846
|
||||
#define TT_MS_LANGID_GUJARATI_INDIA 0x0447
|
||||
#define TT_MS_LANGID_ORIYA_INDIA 0x0448
|
||||
#define TT_MS_LANGID_ODIA_INDIA 0x0448
|
||||
#define TT_MS_LANGID_TAMIL_INDIA 0x0449
|
||||
#define TT_MS_LANGID_TELUGU_INDIA 0x044a
|
||||
#define TT_MS_LANGID_KANNADA_INDIA 0x044b
|
||||
#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c
|
||||
#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d
|
||||
#define TT_MS_LANGID_MARATHI_INDIA 0x044e
|
||||
#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f
|
||||
#define TT_MS_LANGID_TELUGU_INDIA 0x044A
|
||||
#define TT_MS_LANGID_KANNADA_INDIA 0x044B
|
||||
#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C
|
||||
#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D
|
||||
#define TT_MS_LANGID_MARATHI_INDIA 0x044E
|
||||
#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F
|
||||
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
|
||||
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850
|
||||
#define TT_MS_LANGID_TIBETAN_CHINA 0x0451
|
||||
/* Don't use the next constant! It has */
|
||||
/* (1) the wrong spelling (Dzonghka) */
|
||||
/* (2) Microsoft doesn't officially define it -- */
|
||||
/* at least it is not in the List of Local */
|
||||
/* ID Values. */
|
||||
/* (3) Dzongkha is not the same language as */
|
||||
/* Tibetan, so merging it is wrong anyway. */
|
||||
/* */
|
||||
/* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */
|
||||
#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851
|
||||
|
||||
#if 0
|
||||
/* the following used to be defined */
|
||||
#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451
|
||||
/* ... but it was changed; */
|
||||
#else
|
||||
/* So we will continue to #define it, but with the correct value */
|
||||
#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN
|
||||
#endif
|
||||
|
||||
#define TT_MS_LANGID_WELSH_WALES 0x0452
|
||||
#define TT_MS_LANGID_MONGOLIAN_PRC 0x0850
|
||||
#define TT_MS_LANGID_TIBETAN_PRC 0x0451
|
||||
#define TT_MS_LANGID_WELSH_UNITED_KINGDOM 0x0452
|
||||
#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453
|
||||
#define TT_MS_LANGID_LAO_LAOS 0x0454
|
||||
#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455
|
||||
#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456
|
||||
#define TT_MS_LANGID_GALICIAN_GALICIAN 0x0456
|
||||
#define TT_MS_LANGID_KONKANI_INDIA 0x0457
|
||||
#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458
|
||||
#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459
|
||||
#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859
|
||||
/* Missing a LCID for Sindhi in Devanagari script */
|
||||
#define TT_MS_LANGID_SYRIAC_SYRIA 0x045a
|
||||
#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b
|
||||
#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c
|
||||
#define TT_MS_LANGID_INUKTITUT_CANADA 0x045d
|
||||
#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e
|
||||
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f
|
||||
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f
|
||||
/* Missing a LCID for Tifinagh script */
|
||||
#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460
|
||||
/* Spelled this way by XPsp2 Platform SDK (2004-07-26) */
|
||||
/* script is yet unclear... might be Arabic, Nagari or Sharada */
|
||||
#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860
|
||||
/* ... and aliased (by MS) for compatibility reasons. */
|
||||
#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA
|
||||
#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A
|
||||
#define TT_MS_LANGID_SINHALA_SRI_LANKA 0x045B
|
||||
#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D
|
||||
#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN 0x085D
|
||||
#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E
|
||||
#define TT_MS_LANGID_TAMAZIGHT_ALGERIA 0x085F
|
||||
#define TT_MS_LANGID_NEPALI_NEPAL 0x0461
|
||||
#define TT_MS_LANGID_NEPALI_INDIA 0x0861
|
||||
#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462
|
||||
#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463
|
||||
#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464
|
||||
#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465
|
||||
/* alias declared in Windows 2000 */
|
||||
#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES
|
||||
#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468
|
||||
#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A
|
||||
#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B
|
||||
#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B
|
||||
#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B
|
||||
#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA 0x046C
|
||||
#define TT_MS_LANGID_BASHKIR_RUSSIA 0x046D
|
||||
#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG 0x046E
|
||||
#define TT_MS_LANGID_GREENLANDIC_GREENLAND 0x046F
|
||||
#define TT_MS_LANGID_IGBO_NIGERIA 0x0470
|
||||
#define TT_MS_LANGID_YI_PRC 0x0478
|
||||
#define TT_MS_LANGID_MAPUDUNGUN_CHILE 0x047A
|
||||
#define TT_MS_LANGID_MOHAWK_MOHAWK 0x047C
|
||||
#define TT_MS_LANGID_BRETON_FRANCE 0x047E
|
||||
#define TT_MS_LANGID_UIGHUR_PRC 0x0480
|
||||
#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
|
||||
#define TT_MS_LANGID_OCCITAN_FRANCE 0x0482
|
||||
#define TT_MS_LANGID_CORSICAN_FRANCE 0x0483
|
||||
#define TT_MS_LANGID_ALSATIAN_FRANCE 0x0484
|
||||
#define TT_MS_LANGID_YAKUT_RUSSIA 0x0485
|
||||
#define TT_MS_LANGID_KICHE_GUATEMALA 0x0486
|
||||
#define TT_MS_LANGID_KINYARWANDA_RWANDA 0x0487
|
||||
#define TT_MS_LANGID_WOLOF_SENEGAL 0x0488
|
||||
#define TT_MS_LANGID_DARI_AFGHANISTAN 0x048C
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/* legacy macro definitions not present in OpenType 1.8.1 */
|
||||
#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
|
||||
#define TT_MS_LANGID_CATALAN_SPAIN \
|
||||
TT_MS_LANGID_CATALAN_CATALAN
|
||||
#define TT_MS_LANGID_CHINESE_GENERAL 0x0004
|
||||
#define TT_MS_LANGID_CHINESE_MACAU \
|
||||
TT_MS_LANGID_CHINESE_MACAO
|
||||
#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \
|
||||
TT_MS_LANGID_GERMAN_LIECHTENSTEIN
|
||||
#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009
|
||||
#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809
|
||||
#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09
|
||||
#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \
|
||||
TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT
|
||||
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU
|
||||
#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C
|
||||
#define TT_MS_LANGID_FRENCH_REUNION 0x200C
|
||||
#define TT_MS_LANGID_FRENCH_CONGO 0x240C
|
||||
/* which was formerly: */
|
||||
#define TT_MS_LANGID_FRENCH_ZAIRE \
|
||||
TT_MS_LANGID_FRENCH_CONGO
|
||||
#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C
|
||||
#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C
|
||||
#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C
|
||||
#define TT_MS_LANGID_FRENCH_MALI 0x340C
|
||||
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C
|
||||
#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C
|
||||
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU
|
||||
#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \
|
||||
TT_MS_LANGID_KOREAN_KOREA
|
||||
#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812
|
||||
#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \
|
||||
TT_MS_LANGID_ROMANSH_SWITZERLAND
|
||||
#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818
|
||||
#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819
|
||||
#define TT_MS_LANGID_URDU_INDIA 0x0820
|
||||
#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827
|
||||
#define TT_MS_LANGID_SLOVENE_SLOVENIA \
|
||||
TT_MS_LANGID_SLOVENIAN_SLOVENIA
|
||||
#define TT_MS_LANGID_FARSI_IRAN 0x0429
|
||||
#define TT_MS_LANGID_BASQUE_SPAIN \
|
||||
TT_MS_LANGID_BASQUE_BASQUE
|
||||
#define TT_MS_LANGID_SORBIAN_GERMANY \
|
||||
TT_MS_LANGID_UPPER_SORBIAN_GERMANY
|
||||
#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430
|
||||
#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431
|
||||
#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \
|
||||
TT_MS_LANGID_SETSWANA_SOUTH_AFRICA
|
||||
#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433
|
||||
#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \
|
||||
TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA
|
||||
#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \
|
||||
TT_MS_LANGID_ISIZULU_SOUTH_AFRICA
|
||||
#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B
|
||||
/* the next two values are incorrectly inverted */
|
||||
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
|
||||
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
|
||||
#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D
|
||||
#define TT_MS_LANGID_KAZAK_KAZAKSTAN \
|
||||
TT_MS_LANGID_KAZAKH_KAZAKHSTAN
|
||||
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
|
||||
TT_MS_LANGID_KYRGYZ_KYRGYZSTAN
|
||||
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \
|
||||
TT_MS_LANGID_KYRGYZ_KYRGYZSTAN
|
||||
#define TT_MS_LANGID_SWAHILI_KENYA \
|
||||
TT_MS_LANGID_KISWAHILI_KENYA
|
||||
#define TT_MS_LANGID_TATAR_TATARSTAN \
|
||||
TT_MS_LANGID_TATAR_RUSSIA
|
||||
#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846
|
||||
#define TT_MS_LANGID_ORIYA_INDIA \
|
||||
TT_MS_LANGID_ODIA_INDIA
|
||||
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \
|
||||
TT_MS_LANGID_MONGOLIAN_PRC
|
||||
#define TT_MS_LANGID_TIBETAN_CHINA \
|
||||
TT_MS_LANGID_TIBETAN_PRC
|
||||
#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851
|
||||
#define TT_MS_LANGID_TIBETAN_BHUTAN \
|
||||
TT_MS_LANGID_DZONGHKA_BHUTAN
|
||||
#define TT_MS_LANGID_WELSH_WALES \
|
||||
TT_MS_LANGID_WELSH_UNITED_KINGDOM
|
||||
#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455
|
||||
#define TT_MS_LANGID_GALICIAN_SPAIN \
|
||||
TT_MS_LANGID_GALICIAN_GALICIAN
|
||||
#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458
|
||||
#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459
|
||||
#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859
|
||||
#define TT_MS_LANGID_SINHALESE_SRI_LANKA \
|
||||
TT_MS_LANGID_SINHALA_SRI_LANKA
|
||||
#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C
|
||||
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F
|
||||
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \
|
||||
TT_MS_LANGID_TAMAZIGHT_ALGERIA
|
||||
#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460
|
||||
#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860
|
||||
#define TT_MS_LANGID_KASHMIRI_INDIA \
|
||||
TT_MS_LANGID_KASHMIRI_SASIA
|
||||
#define TT_MS_LANGID_NEPALI_INDIA 0x0861
|
||||
#define TT_MS_LANGID_DIVEHI_MALDIVES \
|
||||
TT_MS_LANGID_DHIVEHI_MALDIVES
|
||||
#define TT_MS_LANGID_EDO_NIGERIA 0x0466
|
||||
#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467
|
||||
#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468
|
||||
#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469
|
||||
#define TT_MS_LANGID_YORUBA_NIGERIA 0x046a
|
||||
#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b
|
||||
#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b
|
||||
#define TT_MS_LANGID_QUECHUA_PERU 0x0c6b
|
||||
#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c
|
||||
/* Also spelled by XPsp2 Platform SDK (2004-07-26) */
|
||||
#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \
|
||||
TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA
|
||||
#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
|
||||
TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
|
||||
/* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */
|
||||
#define TT_MS_LANGID_IGBO_NIGERIA 0x0470
|
||||
TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA
|
||||
#define TT_MS_LANGID_KANURI_NIGERIA 0x0471
|
||||
#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472
|
||||
#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473
|
||||
#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873
|
||||
/* also spelled in the `Passport SDK' list as: */
|
||||
#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA
|
||||
#define TT_MS_LANGID_TIGRIGNA_ERYTREA \
|
||||
TT_MS_LANGID_TIGRIGNA_ERYTHREA
|
||||
#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474
|
||||
#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475
|
||||
#define TT_MS_LANGID_LATIN 0x0476
|
||||
#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477
|
||||
/* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */
|
||||
/* not written (but OTOH the peculiar writing system is worth */
|
||||
/* studying). */
|
||||
#define TT_MS_LANGID_YI_CHINA 0x0478
|
||||
#define TT_MS_LANGID_YI_CHINA \
|
||||
TT_MS_LANGID_YI_PRC
|
||||
#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479
|
||||
/* language codes from 0x047a to 0x047f are (still) unknown. */
|
||||
#define TT_MS_LANGID_UIGHUR_CHINA 0x0480
|
||||
#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
|
||||
|
||||
#if 0 /* not deemed useful for fonts */
|
||||
#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff
|
||||
#endif
|
||||
#define TT_MS_LANGID_UIGHUR_CHINA \
|
||||
TT_MS_LANGID_UIGHUR_PRC
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Possible values of the `name' identifier field in the name records of */
|
||||
/* the TTF `name' table. These values are platform independent. */
|
||||
/* */
|
||||
/***********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* TT_NAME_ID_XXX
|
||||
*
|
||||
* @description:
|
||||
* Possible values of the `name' identifier field in the name records of
|
||||
* an SFNT `name' table. These values are platform independent.
|
||||
*/
|
||||
|
||||
#define TT_NAME_ID_COPYRIGHT 0
|
||||
#define TT_NAME_ID_FONT_FAMILY 1
|
||||
#define TT_NAME_ID_FONT_SUBFAMILY 2
|
||||
@ -815,8 +808,8 @@ FT_BEGIN_HEADER
|
||||
#define TT_NAME_ID_LICENSE 13
|
||||
#define TT_NAME_ID_LICENSE_URL 14
|
||||
/* number 15 is reserved */
|
||||
#define TT_NAME_ID_PREFERRED_FAMILY 16
|
||||
#define TT_NAME_ID_PREFERRED_SUBFAMILY 17
|
||||
#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16
|
||||
#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17
|
||||
#define TT_NAME_ID_MAC_FULL_NAME 18
|
||||
|
||||
/* The following code is new as of 2000-01-21 */
|
||||
@ -829,13 +822,30 @@ FT_BEGIN_HEADER
|
||||
#define TT_NAME_ID_WWS_FAMILY 21
|
||||
#define TT_NAME_ID_WWS_SUBFAMILY 22
|
||||
|
||||
/* This is new in OpenType 1.7 */
|
||||
#define TT_NAME_ID_LIGHT_BACKGROUND 23
|
||||
#define TT_NAME_ID_DARK_BACKGROUND 24
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */
|
||||
/* */
|
||||
/* Updated 08-Nov-2008. */
|
||||
/* */
|
||||
/* This is new in OpenType 1.8 */
|
||||
#define TT_NAME_ID_VARIATIONS_PREFIX 25
|
||||
|
||||
/* these two values are deprecated */
|
||||
#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY
|
||||
#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* TT_UCR_XXX
|
||||
*
|
||||
* @description:
|
||||
* Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT
|
||||
* `OS/2' table.
|
||||
*/
|
||||
|
||||
/* ulUnicodeRange1 */
|
||||
/* --------------- */
|
||||
|
||||
/* Bit 0 Basic Latin */
|
||||
#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */
|
||||
@ -857,7 +867,7 @@ FT_BEGIN_HEADER
|
||||
/* U+A700-U+A71F */
|
||||
/* Bit 6 Combining Diacritical Marks */
|
||||
/* Combining Diacritical Marks Supplement */
|
||||
#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */
|
||||
#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L << 6) /* U+0300-U+036F */
|
||||
/* U+1DC0-U+1DFF */
|
||||
/* Bit 7 Greek and Coptic */
|
||||
#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */
|
||||
@ -925,12 +935,17 @@ FT_BEGIN_HEADER
|
||||
/* Supplemental Punctuation */
|
||||
#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */
|
||||
/* U+2E00-U+2E7F */
|
||||
|
||||
/* ulUnicodeRange2 */
|
||||
/* --------------- */
|
||||
|
||||
/* Bit 32 Superscripts And Subscripts */
|
||||
#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */
|
||||
/* Bit 33 Currency Symbols */
|
||||
#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */
|
||||
/* Bit 34 Combining Diacritical Marks For Symbols */
|
||||
#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */
|
||||
#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
|
||||
(1L << 2) /* U+20D0-U+20FF */
|
||||
/* Bit 35 Letterlike Symbols */
|
||||
#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */
|
||||
/* Bit 36 Number Forms */
|
||||
@ -996,13 +1011,13 @@ FT_BEGIN_HEADER
|
||||
/* Bit 57 High Surrogates */
|
||||
/* High Private Use Surrogates */
|
||||
/* Low Surrogates */
|
||||
/* */
|
||||
|
||||
/* According to OpenType specs v.1.3+, */
|
||||
/* setting bit 57 implies that there is */
|
||||
/* at least one codepoint beyond the */
|
||||
/* Basic Multilingual Plane that is */
|
||||
/* supported by this font. So it really */
|
||||
/* means >= U+10000 */
|
||||
/* means >= U+10000. */
|
||||
#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */
|
||||
/* U+DB80-U+DBFF */
|
||||
/* U+DC00-U+DFFF */
|
||||
@ -1034,7 +1049,11 @@ FT_BEGIN_HEADER
|
||||
/* Bit 62 Alphabetic Presentation Forms */
|
||||
#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */
|
||||
/* Bit 63 Arabic Presentation Forms-A */
|
||||
#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */
|
||||
#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L << 31) /* U+FB50-U+FDFF */
|
||||
|
||||
/* ulUnicodeRange3 */
|
||||
/* --------------- */
|
||||
|
||||
/* Bit 64 Combining Half Marks */
|
||||
#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */
|
||||
/* Bit 65 Vertical forms */
|
||||
@ -1044,7 +1063,7 @@ FT_BEGIN_HEADER
|
||||
/* Bit 66 Small Form Variants */
|
||||
#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */
|
||||
/* Bit 67 Arabic Presentation Forms-B */
|
||||
#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */
|
||||
#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L << 3) /* U+FE70-U+FEFE */
|
||||
/* Bit 68 Halfwidth and Fullwidth Forms */
|
||||
#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */
|
||||
/* Bit 69 Specials */
|
||||
@ -1123,6 +1142,10 @@ FT_BEGIN_HEADER
|
||||
#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */
|
||||
/* Bit 95 New Tai Lue */
|
||||
#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */
|
||||
|
||||
/* ulUnicodeRange4 */
|
||||
/* --------------- */
|
||||
|
||||
/* Bit 96 Buginese */
|
||||
#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */
|
||||
/* Bit 97 Glagolitic */
|
||||
@ -1191,47 +1214,23 @@ FT_BEGIN_HEADER
|
||||
/*U+1F000-U+1F02F*/
|
||||
/* Bit 123-127 Reserved for process-internal usage */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Some compilers have a very limited length of identifiers. */
|
||||
/* */
|
||||
#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )
|
||||
#define HAVE_LIMIT_ON_IDENTS
|
||||
#endif
|
||||
|
||||
/* for backward compatibility with older FreeType versions */
|
||||
#define TT_UCR_ARABIC_PRESENTATION_A \
|
||||
TT_UCR_ARABIC_PRESENTATION_FORMS_A
|
||||
#define TT_UCR_ARABIC_PRESENTATION_B \
|
||||
TT_UCR_ARABIC_PRESENTATION_FORMS_B
|
||||
|
||||
#ifndef HAVE_LIMIT_ON_IDENTS
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Here some alias #defines in order to be clearer. */
|
||||
/* */
|
||||
/* These are not always #defined to stay within the 31~character limit */
|
||||
/* which some compilers have. */
|
||||
/* */
|
||||
/* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */
|
||||
/* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */
|
||||
/* If you get a warning with such a compiler, use the -i40 switch. */
|
||||
/* */
|
||||
#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \
|
||||
TT_UCR_ARABIC_PRESENTATIONS_A
|
||||
#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \
|
||||
TT_UCR_ARABIC_PRESENTATIONS_B
|
||||
|
||||
#define TT_UCR_COMBINING_DIACRITICAL_MARKS \
|
||||
TT_UCR_COMBINING_DIACRITICS
|
||||
#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
|
||||
TT_UCR_COMBINING_DIACRITICS_SYMB
|
||||
|
||||
|
||||
#endif /* !HAVE_LIMIT_ON_IDENTS */
|
||||
#define TT_UCR_COMBINING_DIACRITICS \
|
||||
TT_UCR_COMBINING_DIACRITICAL_MARKS
|
||||
#define TT_UCR_COMBINING_DIACRITICS_SYMB \
|
||||
TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __TTNAMEID_H__ */
|
||||
#endif /* TTNAMEID_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
/* Basic SFNT/TrueType tables definitions and interface */
|
||||
/* (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2005, 2008-2012 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -17,8 +17,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __TTTABLES_H__
|
||||
#define __TTTABLES_H__
|
||||
#ifndef TTTABLES_H_
|
||||
#define TTTABLES_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -45,8 +45,28 @@ FT_BEGIN_HEADER
|
||||
/* TrueType specific table types and functions. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains the definition of TrueType-specific tables */
|
||||
/* as well as some routines used to access and process them. */
|
||||
/* This section contains definitions of some basic tables specific to */
|
||||
/* TrueType and OpenType as well as some routines used to access and */
|
||||
/* process them. */
|
||||
/* */
|
||||
/* <Order> */
|
||||
/* TT_Header */
|
||||
/* TT_HoriHeader */
|
||||
/* TT_VertHeader */
|
||||
/* TT_OS2 */
|
||||
/* TT_Postscript */
|
||||
/* TT_PCLT */
|
||||
/* TT_MaxProfile */
|
||||
/* */
|
||||
/* FT_Sfnt_Tag */
|
||||
/* FT_Get_Sfnt_Table */
|
||||
/* FT_Load_Sfnt_Table */
|
||||
/* FT_Sfnt_Table_Info */
|
||||
/* */
|
||||
/* FT_Get_CMap_Language_ID */
|
||||
/* FT_Get_CMap_Format */
|
||||
/* */
|
||||
/* FT_PARAM_TAG_UNPATENTED_HINTING */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -57,8 +77,8 @@ FT_BEGIN_HEADER
|
||||
/* TT_Header */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a TrueType font header table. All */
|
||||
/* fields follow the TrueType specification. */
|
||||
/* A structure to model a TrueType font header table. All fields */
|
||||
/* follow the OpenType specification. */
|
||||
/* */
|
||||
typedef struct TT_Header_
|
||||
{
|
||||
@ -95,9 +115,9 @@ FT_BEGIN_HEADER
|
||||
/* TT_HoriHeader */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a TrueType horizontal header, the `hhea' */
|
||||
/* A structure to model a TrueType horizontal header, the `hhea' */
|
||||
/* table, as well as the corresponding horizontal metrics table, */
|
||||
/* i.e., the `hmtx' table. */
|
||||
/* `hmtx'. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* Version :: The table version. */
|
||||
@ -112,7 +132,7 @@ FT_BEGIN_HEADER
|
||||
/* glyphs found in the font (maybe ASCII). */
|
||||
/* */
|
||||
/* You should use the `sTypoAscender' field */
|
||||
/* of the OS/2 table instead if you want */
|
||||
/* of the `OS/2' table instead if you want */
|
||||
/* the correct one. */
|
||||
/* */
|
||||
/* Descender :: The font's descender, i.e., the distance */
|
||||
@ -126,7 +146,7 @@ FT_BEGIN_HEADER
|
||||
/* glyphs found in the font (maybe ASCII). */
|
||||
/* */
|
||||
/* You should use the `sTypoDescender' */
|
||||
/* field of the OS/2 table instead if you */
|
||||
/* field of the `OS/2' table instead if you */
|
||||
/* want the correct one. */
|
||||
/* */
|
||||
/* Line_Gap :: The font's line gap, i.e., the distance */
|
||||
@ -156,6 +176,8 @@ FT_BEGIN_HEADER
|
||||
/* caret_Slope_Run :: The run coefficient of the cursor's */
|
||||
/* slope. */
|
||||
/* */
|
||||
/* caret_Offset :: The cursor's offset for slanted fonts. */
|
||||
/* */
|
||||
/* Reserved :: 8~reserved bytes. */
|
||||
/* */
|
||||
/* metric_Data_Format :: Always~0. */
|
||||
@ -169,13 +191,10 @@ FT_BEGIN_HEADER
|
||||
/* short_metrics :: A pointer into the `hmtx' table. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
|
||||
/* be identical except for the names of their fields which */
|
||||
/* are different. */
|
||||
/* */
|
||||
/* This ensures that a single function in the `ttload' */
|
||||
/* module is able to read both the horizontal and vertical */
|
||||
/* headers. */
|
||||
/* For an OpenType variation font, the values of the following fields */
|
||||
/* can change after a call to @FT_Set_Var_Design_Coordinates (and */
|
||||
/* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */
|
||||
/* `caret_Slope_Run', and `caret_Offset'. */
|
||||
/* */
|
||||
typedef struct TT_HoriHeader_
|
||||
{
|
||||
@ -198,9 +217,9 @@ FT_BEGIN_HEADER
|
||||
FT_Short metric_Data_Format;
|
||||
FT_UShort number_Of_HMetrics;
|
||||
|
||||
/* The following fields are not defined by the TrueType specification */
|
||||
/* The following fields are not defined by the OpenType specification */
|
||||
/* but they are used to connect the metrics header to the relevant */
|
||||
/* `HMTX' table. */
|
||||
/* `hmtx' table. */
|
||||
|
||||
void* long_metrics;
|
||||
void* short_metrics;
|
||||
@ -215,8 +234,8 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a TrueType vertical header, the `vhea' */
|
||||
/* table, as well as the corresponding vertical metrics table, i.e., */
|
||||
/* the `vmtx' table. */
|
||||
/* table, as well as the corresponding vertical metrics table, */
|
||||
/* `vmtx'. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* Version :: The table version. */
|
||||
@ -232,8 +251,8 @@ FT_BEGIN_HEADER
|
||||
/* ASCII). */
|
||||
/* */
|
||||
/* You should use the `sTypoAscender' */
|
||||
/* field of the OS/2 table instead if you */
|
||||
/* want the correct one. */
|
||||
/* field of the `OS/2' table instead if */
|
||||
/* you want the correct one. */
|
||||
/* */
|
||||
/* Descender :: The font's descender, i.e., the */
|
||||
/* distance from the baseline to the */
|
||||
@ -247,8 +266,8 @@ FT_BEGIN_HEADER
|
||||
/* ASCII). */
|
||||
/* */
|
||||
/* You should use the `sTypoDescender' */
|
||||
/* field of the OS/2 table instead if you */
|
||||
/* want the correct one. */
|
||||
/* field of the `OS/2' table instead if */
|
||||
/* you want the correct one. */
|
||||
/* */
|
||||
/* Line_Gap :: The font's line gap, i.e., the distance */
|
||||
/* to add to the ascender and descender to */
|
||||
@ -278,14 +297,12 @@ FT_BEGIN_HEADER
|
||||
/* slope. */
|
||||
/* */
|
||||
/* caret_Offset :: The cursor's offset for slanted fonts. */
|
||||
/* This value is `reserved' in vmtx */
|
||||
/* version 1.0. */
|
||||
/* */
|
||||
/* Reserved :: 8~reserved bytes. */
|
||||
/* */
|
||||
/* metric_Data_Format :: Always~0. */
|
||||
/* */
|
||||
/* number_Of_HMetrics :: Number of VMetrics entries in the */
|
||||
/* number_Of_VMetrics :: Number of VMetrics entries in the */
|
||||
/* `vmtx' table -- this value can be */
|
||||
/* smaller than the total number of glyphs */
|
||||
/* in the font. */
|
||||
@ -295,13 +312,11 @@ FT_BEGIN_HEADER
|
||||
/* short_metrics :: A pointer into the `vmtx' table. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
|
||||
/* be identical except for the names of their fields which */
|
||||
/* are different. */
|
||||
/* */
|
||||
/* This ensures that a single function in the `ttload' */
|
||||
/* module is able to read both the horizontal and vertical */
|
||||
/* headers. */
|
||||
/* For an OpenType variation font, the values of the following fields */
|
||||
/* can change after a call to @FT_Set_Var_Design_Coordinates (and */
|
||||
/* friends) if the font contains an `MVAR' table: `Ascender', */
|
||||
/* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', */
|
||||
/* and `caret_Offset'. */
|
||||
/* */
|
||||
typedef struct TT_VertHeader_
|
||||
{
|
||||
@ -312,9 +327,9 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_UShort advance_Height_Max; /* advance height maximum */
|
||||
|
||||
FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */
|
||||
FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */
|
||||
FT_Short yMax_Extent; /* xmax or ymax extents */
|
||||
FT_Short min_Top_Side_Bearing; /* minimum top-sb */
|
||||
FT_Short min_Bottom_Side_Bearing; /* minimum bottom-sb */
|
||||
FT_Short yMax_Extent; /* ymax extents */
|
||||
FT_Short caret_Slope_Rise;
|
||||
FT_Short caret_Slope_Run;
|
||||
FT_Short caret_Offset;
|
||||
@ -324,9 +339,9 @@ FT_BEGIN_HEADER
|
||||
FT_Short metric_Data_Format;
|
||||
FT_UShort number_Of_VMetrics;
|
||||
|
||||
/* The following fields are not defined by the TrueType specification */
|
||||
/* but they're used to connect the metrics header to the relevant */
|
||||
/* `HMTX' or `VMTX' table. */
|
||||
/* The following fields are not defined by the OpenType specification */
|
||||
/* but they are used to connect the metrics header to the relevant */
|
||||
/* `vmtx' table. */
|
||||
|
||||
void* long_metrics;
|
||||
void* short_metrics;
|
||||
@ -340,20 +355,35 @@ FT_BEGIN_HEADER
|
||||
/* TT_OS2 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a TrueType OS/2 table. This is the long */
|
||||
/* table version. All fields comply to the TrueType specification. */
|
||||
/* A structure to model a TrueType `OS/2' table. All fields comply */
|
||||
/* to the OpenType specification. */
|
||||
/* */
|
||||
/* Note that we now support old Mac fonts which do not include an */
|
||||
/* OS/2 table. In this case, the `version' field is always set to */
|
||||
/* Note that we now support old Mac fonts that do not include an */
|
||||
/* `OS/2' table. In this case, the `version' field is always set to */
|
||||
/* 0xFFFF. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* For an OpenType variation font, the values of the following fields */
|
||||
/* can change after a call to @FT_Set_Var_Design_Coordinates (and */
|
||||
/* friends) if the font contains an `MVAR' table: `sCapHeight', */
|
||||
/* `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight', */
|
||||
/* `usWinAscent', `usWinDescent', `yStrikeoutPosition', */
|
||||
/* `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize', */
|
||||
/* `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset', */
|
||||
/* `ySuperscriptXSize', `ySuperscriptYOffset', and */
|
||||
/* `ySuperscriptYSize'. */
|
||||
/* */
|
||||
/* Possible values for bits in the `ulUnicodeRangeX' fields are given */
|
||||
/* by the @TT_UCR_XXX macros. */
|
||||
/* */
|
||||
|
||||
typedef struct TT_OS2_
|
||||
{
|
||||
FT_UShort version; /* 0x0001 - more or 0xFFFF */
|
||||
FT_Short xAvgCharWidth;
|
||||
FT_UShort usWeightClass;
|
||||
FT_UShort usWidthClass;
|
||||
FT_Short fsType;
|
||||
FT_UShort fsType;
|
||||
FT_Short ySubscriptXSize;
|
||||
FT_Short ySubscriptYSize;
|
||||
FT_Short ySubscriptXOffset;
|
||||
@ -384,12 +414,12 @@ FT_BEGIN_HEADER
|
||||
FT_UShort usWinAscent;
|
||||
FT_UShort usWinDescent;
|
||||
|
||||
/* only version 1 tables: */
|
||||
/* only version 1 and higher: */
|
||||
|
||||
FT_ULong ulCodePageRange1; /* Bits 0-31 */
|
||||
FT_ULong ulCodePageRange2; /* Bits 32-63 */
|
||||
|
||||
/* only version 2 tables: */
|
||||
/* only version 2 and higher: */
|
||||
|
||||
FT_Short sxHeight;
|
||||
FT_Short sCapHeight;
|
||||
@ -397,6 +427,11 @@ FT_BEGIN_HEADER
|
||||
FT_UShort usBreakChar;
|
||||
FT_UShort usMaxContext;
|
||||
|
||||
/* only version 5 and higher: */
|
||||
|
||||
FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */
|
||||
FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */
|
||||
|
||||
} TT_OS2;
|
||||
|
||||
|
||||
@ -406,10 +441,16 @@ FT_BEGIN_HEADER
|
||||
/* TT_Postscript */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a TrueType PostScript table. All fields */
|
||||
/* comply to the TrueType specification. This structure does not */
|
||||
/* reference the PostScript glyph names, which can be nevertheless */
|
||||
/* accessed with the `ttpost' module. */
|
||||
/* A structure to model a TrueType `post' table. All fields comply */
|
||||
/* to the OpenType specification. This structure does not reference */
|
||||
/* a font's PostScript glyph names; use @FT_Get_Glyph_Name to */
|
||||
/* retrieve them. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* For an OpenType variation font, the values of the following fields */
|
||||
/* can change after a call to @FT_Set_Var_Design_Coordinates (and */
|
||||
/* friends) if the font contains an `MVAR' table: `underlinePosition' */
|
||||
/* and `underlineThickness'. */
|
||||
/* */
|
||||
typedef struct TT_Postscript_
|
||||
{
|
||||
@ -423,8 +464,8 @@ FT_BEGIN_HEADER
|
||||
FT_ULong minMemType1;
|
||||
FT_ULong maxMemType1;
|
||||
|
||||
/* Glyph names follow in the file, but we don't */
|
||||
/* load them by default. See the ttpost.c file. */
|
||||
/* Glyph names follow in the `post' table, but we don't */
|
||||
/* load them by default. */
|
||||
|
||||
} TT_Postscript;
|
||||
|
||||
@ -435,8 +476,8 @@ FT_BEGIN_HEADER
|
||||
/* TT_PCLT */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a TrueType PCLT table. All fields */
|
||||
/* comply to the TrueType specification. */
|
||||
/* A structure to model a TrueType `PCLT' table. All fields comply */
|
||||
/* to the OpenType specification. */
|
||||
/* */
|
||||
typedef struct TT_PCLT_
|
||||
{
|
||||
@ -465,9 +506,9 @@ FT_BEGIN_HEADER
|
||||
/* TT_MaxProfile */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The maximum profile is a table containing many max values which */
|
||||
/* can be used to pre-allocate arrays. This ensures that no memory */
|
||||
/* allocation occurs during a glyph load. */
|
||||
/* The maximum profile (`maxp') table contains many max values, which */
|
||||
/* can be used to pre-allocate arrays for speeding up glyph loading */
|
||||
/* and hinting. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* version :: The version number. */
|
||||
@ -477,21 +518,19 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* maxPoints :: The maximum number of points in a */
|
||||
/* non-composite TrueType glyph. See also */
|
||||
/* the structure element */
|
||||
/* `maxCompositePoints'. */
|
||||
/* */
|
||||
/* maxContours :: The maximum number of contours in a */
|
||||
/* non-composite TrueType glyph. See also */
|
||||
/* the structure element */
|
||||
/* `maxCompositeContours'. */
|
||||
/* */
|
||||
/* maxCompositePoints :: The maximum number of points in a */
|
||||
/* composite TrueType glyph. See also the */
|
||||
/* structure element `maxPoints'. */
|
||||
/* composite TrueType glyph. See also */
|
||||
/* `maxPoints'. */
|
||||
/* */
|
||||
/* maxCompositeContours :: The maximum number of contours in a */
|
||||
/* composite TrueType glyph. See also the */
|
||||
/* structure element `maxContours'. */
|
||||
/* composite TrueType glyph. See also */
|
||||
/* `maxContours'. */
|
||||
/* */
|
||||
/* maxZones :: The maximum number of zones used for */
|
||||
/* glyph hinting. */
|
||||
@ -552,24 +591,48 @@ FT_BEGIN_HEADER
|
||||
/* FT_Sfnt_Tag */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An enumeration used to specify the index of an SFNT table. */
|
||||
/* Used in the @FT_Get_Sfnt_Table API function. */
|
||||
/* An enumeration to specify indices of SFNT tables loaded and parsed */
|
||||
/* by FreeType during initialization of an SFNT font. Used in the */
|
||||
/* @FT_Get_Sfnt_Table API function. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */
|
||||
/* */
|
||||
/* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */
|
||||
/* */
|
||||
/* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */
|
||||
/* */
|
||||
/* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */
|
||||
/* */
|
||||
/* FT_SFNT_VHEA :: To access the font's @TT_VertHeader structure. */
|
||||
/* */
|
||||
/* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */
|
||||
/* */
|
||||
/* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */
|
||||
/* */
|
||||
typedef enum FT_Sfnt_Tag_
|
||||
{
|
||||
ft_sfnt_head = 0, /* TT_Header */
|
||||
ft_sfnt_maxp = 1, /* TT_MaxProfile */
|
||||
ft_sfnt_os2 = 2, /* TT_OS2 */
|
||||
ft_sfnt_hhea = 3, /* TT_HoriHeader */
|
||||
ft_sfnt_vhea = 4, /* TT_VertHeader */
|
||||
ft_sfnt_post = 5, /* TT_Postscript */
|
||||
ft_sfnt_pclt = 6, /* TT_PCLT */
|
||||
FT_SFNT_HEAD,
|
||||
FT_SFNT_MAXP,
|
||||
FT_SFNT_OS2,
|
||||
FT_SFNT_HHEA,
|
||||
FT_SFNT_VHEA,
|
||||
FT_SFNT_POST,
|
||||
FT_SFNT_PCLT,
|
||||
|
||||
sfnt_max /* internal end mark */
|
||||
FT_SFNT_MAX
|
||||
|
||||
} FT_Sfnt_Tag;
|
||||
|
||||
/* */
|
||||
/* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */
|
||||
/* values instead */
|
||||
#define ft_sfnt_head FT_SFNT_HEAD
|
||||
#define ft_sfnt_maxp FT_SFNT_MAXP
|
||||
#define ft_sfnt_os2 FT_SFNT_OS2
|
||||
#define ft_sfnt_hhea FT_SFNT_HHEA
|
||||
#define ft_sfnt_vhea FT_SFNT_VHEA
|
||||
#define ft_sfnt_post FT_SFNT_POST
|
||||
#define ft_sfnt_pclt FT_SFNT_PCLT
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -578,7 +641,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Get_Sfnt_Table */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return a pointer to a given SFNT table within a face. */
|
||||
/* Return a pointer to a given SFNT table stored within a face. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source. */
|
||||
@ -586,7 +649,7 @@ FT_BEGIN_HEADER
|
||||
/* tag :: The index of the SFNT table. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* A type-less pointer to the table. This will be~0 in case of */
|
||||
/* A type-less pointer to the table. This will be NULL in case of */
|
||||
/* error, or if the corresponding table was not found *OR* loaded */
|
||||
/* from the file. */
|
||||
/* */
|
||||
@ -607,7 +670,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* */
|
||||
/* vert_header = */
|
||||
/* (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); */
|
||||
/* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */
|
||||
/* } */
|
||||
/* */
|
||||
FT_EXPORT( void* )
|
||||
@ -621,20 +684,20 @@ FT_BEGIN_HEADER
|
||||
* FT_Load_Sfnt_Table
|
||||
*
|
||||
* @description:
|
||||
* Load any font table into client memory.
|
||||
* Load any SFNT font table into client memory.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
* A handle to the source face.
|
||||
*
|
||||
* tag ::
|
||||
* The four-byte tag of the table to load. Use the value~0 if you want
|
||||
* The four-byte tag of the table to load. Use value~0 if you want
|
||||
* to access the whole font file. Otherwise, you can use one of the
|
||||
* definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
|
||||
* one with @FT_MAKE_TAG.
|
||||
*
|
||||
* offset ::
|
||||
* The starting offset in the table (or file if tag == 0).
|
||||
* The starting offset in the table (or file if tag~==~0).
|
||||
*
|
||||
* @output:
|
||||
* buffer ::
|
||||
@ -643,7 +706,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @inout:
|
||||
* length ::
|
||||
* If the `length' parameter is NULL, then try to load the whole table.
|
||||
* If the `length' parameter is NULL, try to load the whole table.
|
||||
* Return an error code if it fails.
|
||||
*
|
||||
* Else, if `*length' is~0, exit immediately while returning the
|
||||
@ -672,6 +735,12 @@ FT_BEGIN_HEADER
|
||||
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
|
||||
* if ( error ) { ... could not load table ... }
|
||||
* }
|
||||
*
|
||||
* Note that structures like @TT_Header or @TT_OS2 can't be used with
|
||||
* this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
|
||||
* those structures depend on the processor architecture, with varying
|
||||
* size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Load_Sfnt_Table( FT_Face face,
|
||||
@ -729,16 +798,16 @@ FT_BEGIN_HEADER
|
||||
/* FT_Get_CMap_Language_ID */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return TrueType/sfnt specific cmap language ID. Definitions of */
|
||||
/* language ID values are in `freetype/ttnameid.h'. */
|
||||
/* Return cmap language ID as specified in the OpenType standard. */
|
||||
/* Definitions of language ID values are in file @FT_TRUETYPE_IDS_H. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* charmap :: */
|
||||
/* The target charmap. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The language ID of `charmap'. If `charmap' doesn't belong to a */
|
||||
/* TrueType/sfnt face, just return~0 as the default value. */
|
||||
/* The language ID of `charmap'. If `charmap' doesn't belong to an */
|
||||
/* SFNT face, just return~0 as the default value. */
|
||||
/* */
|
||||
/* For a format~14 cmap (to access Unicode IVS), the return value is */
|
||||
/* 0xFFFFFFFF. */
|
||||
@ -753,15 +822,15 @@ FT_BEGIN_HEADER
|
||||
/* FT_Get_CMap_Format */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Return TrueType/sfnt specific cmap format. */
|
||||
/* Return the format of an SFNT `cmap' table. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* charmap :: */
|
||||
/* The target charmap. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The format of `charmap'. If `charmap' doesn't belong to a */
|
||||
/* TrueType/sfnt face, return -1. */
|
||||
/* The format of `charmap'. If `charmap' doesn't belong to an SFNT */
|
||||
/* face, return -1. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Long )
|
||||
FT_Get_CMap_Format( FT_CharMap charmap );
|
||||
@ -771,7 +840,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __TTTABLES_H__ */
|
||||
#endif /* TTTABLES_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Tags for TrueType and OpenType tables (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,8 +16,8 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __TTAGS_H__
|
||||
#define __TTAGS_H__
|
||||
#ifndef TTAGS_H_
|
||||
#define TTAGS_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
@ -40,7 +40,10 @@ FT_BEGIN_HEADER
|
||||
#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
|
||||
#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
|
||||
#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' )
|
||||
#define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' )
|
||||
#define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' )
|
||||
#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
|
||||
#define TTAG_CFF2 FT_MAKE_TAG( 'C', 'F', 'F', '2' )
|
||||
#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' )
|
||||
#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
|
||||
#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' )
|
||||
@ -59,6 +62,7 @@ FT_BEGIN_HEADER
|
||||
#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
|
||||
#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
|
||||
#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' )
|
||||
#define TTAG_HVAR FT_MAKE_TAG( 'H', 'V', 'A', 'R' )
|
||||
#define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' )
|
||||
#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
|
||||
#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' )
|
||||
@ -77,6 +81,7 @@ FT_BEGIN_HEADER
|
||||
#define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' )
|
||||
#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' )
|
||||
#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' )
|
||||
#define TTAG_MVAR FT_MAKE_TAG( 'M', 'V', 'A', 'R' )
|
||||
#define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' )
|
||||
#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' )
|
||||
#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' )
|
||||
@ -86,6 +91,7 @@ FT_BEGIN_HEADER
|
||||
#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' )
|
||||
#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
|
||||
#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' )
|
||||
#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' )
|
||||
#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' )
|
||||
#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
|
||||
#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' )
|
||||
@ -97,11 +103,19 @@ FT_BEGIN_HEADER
|
||||
#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
|
||||
#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
|
||||
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
|
||||
#define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' )
|
||||
#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
|
||||
|
||||
/* used by "Keyboard.dfont" on legacy Mac OS X */
|
||||
#define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' )
|
||||
|
||||
/* used by "LastResort.dfont" on legacy Mac OS X */
|
||||
#define TTAG_0xA5lst FT_MAKE_TAG( 0xA5, 'l', 's', 't' )
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __TTAGS_H__ */
|
||||
#endif /* TTAGS_H_ */
|
||||
|
||||
|
||||
/* END */
|
42
libs/include/freetype2/ft2build.h
Normal file
@ -0,0 +1,42 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ft2build.h */
|
||||
/* */
|
||||
/* FreeType 2 build and setup macros. */
|
||||
/* */
|
||||
/* Copyright 1996-2018 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. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This is the `entry point' for FreeType header file inclusions. It is */
|
||||
/* the only header file which should be included directly; all other */
|
||||
/* FreeType header files should be accessed with macro names (after */
|
||||
/* including `ft2build.h'). */
|
||||
/* */
|
||||
/* A typical example is */
|
||||
/* */
|
||||
/* #include <ft2build.h> */
|
||||
/* #include FT_FREETYPE_H */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef FT2BUILD_H_
|
||||
#define FT2BUILD_H_
|
||||
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* FT2BUILD_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -1,61 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ft2build.h */
|
||||
/* */
|
||||
/* Build macros of the FreeType 2 library. */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2006 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. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This is a Unix-specific version of <ft2build.h> that should be used */
|
||||
/* exclusively *after* installation of the library. */
|
||||
/* */
|
||||
/* It assumes that `/usr/local/include/freetype2' (or whatever is */
|
||||
/* returned by the `freetype-config --cflags' or `pkg-config --cflags' */
|
||||
/* command) is in your compilation include path. */
|
||||
/* */
|
||||
/* We don't need to do anything special in this release. However, for */
|
||||
/* a future FreeType 2 release, the following installation changes will */
|
||||
/* be performed: */
|
||||
/* */
|
||||
/* - The contents of `freetype-2.x/include/freetype' will be installed */
|
||||
/* to `/usr/local/include/freetype2' instead of */
|
||||
/* `/usr/local/include/freetype2/freetype'. */
|
||||
/* */
|
||||
/* - This file will #include <freetype2/config/ftheader.h>, instead */
|
||||
/* of <freetype/config/ftheader.h>. */
|
||||
/* */
|
||||
/* - The contents of `ftheader.h' will be processed with `sed' to */
|
||||
/* replace all `<freetype/xxx>' with `<freetype2/xxx>'. */
|
||||
/* */
|
||||
/* - Adding `/usr/local/include/freetype2' to your compilation include */
|
||||
/* path will not be necessary anymore. */
|
||||
/* */
|
||||
/* These changes will be transparent to client applications which use */
|
||||
/* freetype-config (or pkg-config). No modifications will be necessary */
|
||||
/* to compile with the new scheme. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FT2_BUILD_UNIX_H__
|
||||
#define __FT2_BUILD_UNIX_H__
|
||||
|
||||
/* `<prefix>/include/freetype2' must be in your current inclusion path */
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* __FT2_BUILD_UNIX_H__ */
|
||||
|
||||
|
||||
/* END */
|
@ -1,5 +1,5 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
Copyright (c) 2012 The GRRLIB Team
|
||||
Copyright (c) 2009-2021 The GRRLIB Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @file GRRLIB.h
|
||||
* @file grrlib.h
|
||||
* GRRLIB user include file.
|
||||
*/
|
||||
/**
|
||||
@ -37,7 +37,7 @@ THE SOFTWARE.
|
||||
/**
|
||||
* Version information for GRRLIB.
|
||||
*/
|
||||
#define GRRLIB_VER_STRING "4.3.2"
|
||||
#define GRRLIB_VER_STRING "4.4.1"
|
||||
|
||||
//==============================================================================
|
||||
// Includes
|
||||
@ -52,11 +52,6 @@ THE SOFTWARE.
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
//==============================================================================
|
||||
// Extra standard declarations
|
||||
//==============================================================================
|
||||
typedef unsigned int uint;/**< The uint keyword signifies an integral type. */
|
||||
|
||||
//==============================================================================
|
||||
// Primitive colour macros
|
||||
//==============================================================================
|
||||
@ -110,19 +105,19 @@ typedef struct GRRLIB_drawSettings {
|
||||
* Structure to hold the texture information.
|
||||
*/
|
||||
typedef struct GRRLIB_texImg {
|
||||
uint w; /**< The width of the texture in pixels. */
|
||||
uint h; /**< The height of the texture in pixels. */
|
||||
u32 w; /**< The width of the texture in pixels. */
|
||||
u32 h; /**< The height of the texture in pixels. */
|
||||
int handlex; /**< Texture handle x. */
|
||||
int handley; /**< Texture handle y. */
|
||||
int offsetx; /**< Texture offset x. */
|
||||
int offsety; /**< Texture offset y. */
|
||||
|
||||
bool tiledtex; /**< Texture is tiled if set to true. */
|
||||
uint tilew; /**< The width of one tile in pixels. */
|
||||
uint tileh; /**< The height of one tile in pixels. */
|
||||
uint nbtilew; /**< Number of tiles for the x axis. */
|
||||
uint nbtileh; /**< Number of tiles for the y axis. */
|
||||
uint tilestart; /**< Offset to tile starting position. */
|
||||
u32 tilew; /**< The width of one tile in pixels. */
|
||||
u32 tileh; /**< The height of one tile in pixels. */
|
||||
u32 nbtilew; /**< Number of tiles for the x axis. */
|
||||
u32 nbtileh; /**< Number of tiles for the y axis. */
|
||||
u32 tilestart; /**< Offset to tile starting position. */
|
||||
f32 ofnormaltexx;/**< Offset of normalized texture on x. */
|
||||
f32 ofnormaltexy;/**< Offset of normalized texture on y. */
|
||||
|
||||
@ -178,23 +173,19 @@ typedef struct GRRLIB_Font {
|
||||
# define GRR_INITS(...)
|
||||
#endif
|
||||
|
||||
GRR_EXTERN GXRModeObj *rmode;
|
||||
GRR_EXTERN GXRModeObj *rmode; /**< Video mode. */
|
||||
GRR_EXTERN void *xfb[2] GRR_INITS(NULL, NULL);
|
||||
GRR_EXTERN u32 fb GRR_INIT(0);
|
||||
//==============================================================================
|
||||
// procedure and function prototypes
|
||||
// Inline function handling - http://www.greenend.org.uk/rjk/2003/03/inline.html
|
||||
// Inline function handling
|
||||
//==============================================================================
|
||||
#include "grrlib/GRRLIB__lib.h"
|
||||
|
||||
#if defined __GRRLIB_CORE__
|
||||
# define INLINE
|
||||
#else
|
||||
# if __GNUC__ && !__GNUC_STDC_INLINE__
|
||||
# define INLINE static inline
|
||||
# else
|
||||
# define INLINE inline
|
||||
# endif
|
||||
#endif
|
||||
#include "grrlib/GRRLIB__inline.h"
|
||||
|
||||
@ -207,51 +198,3 @@ GRR_EXTERN u32 fb GRR_INIT(0);
|
||||
|
||||
#endif // __GRRLIB_H__
|
||||
/** @} */ // end of group
|
||||
/**
|
||||
* @mainpage GRRLIB Documentation
|
||||
* @image html grrlib_logo.png
|
||||
* Welcome to the GRRLIB documentation.
|
||||
* A complete list of functions is available from this \ref AllFunc "page".
|
||||
*
|
||||
* @section Introduction
|
||||
* GRRLIB is a C/C++ 2D/3D graphics library for Wii application developers.
|
||||
* It is essentially a wrapper which presents a friendly interface to the Nintendo GX core.
|
||||
*
|
||||
* @section Links
|
||||
* Forum: http://grrlib.santo.fr/forum\n
|
||||
* Code: http://code.google.com/p/grrlib\n
|
||||
* IRC: <a href="irc://irc.efnet.net/grrlib">#GRRLIB</a> on EFnet
|
||||
*
|
||||
* @section Credits
|
||||
* Project Leader : NoNameNo\n
|
||||
* Documentation : Crayon, BlueChip\n
|
||||
* Lead Coder : NoNameNo\n
|
||||
* Support Coders : Crayon, Xane, DragonMinded, BlueChip\n
|
||||
* Advisors : RedShade, Jespa\n
|
||||
*
|
||||
* @section Licence
|
||||
* Copyright (c) 2012 The GRRLIB Team
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @example template/source/main.c
|
||||
* This example shows the minimum code required to use GRRLIB.
|
||||
* It could be used as a template to start a new project.
|
||||
* More elaborate examples can be found inside the \e examples folder.
|
||||
*/
|
||||
|
@ -1,46 +1,74 @@
|
||||
/* jconfig.h. Generated from jconfig.cfg by configure. */
|
||||
/* jconfig.cfg --- source file edited by configure script */
|
||||
/* see jconfig.txt for explanations */
|
||||
/* jconfig.h. Generated from jconfig.h.in by configure. */
|
||||
/* Version ID for the JPEG library.
|
||||
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
|
||||
*/
|
||||
#define JPEG_LIB_VERSION 62
|
||||
|
||||
#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
|
||||
/* libjpeg-turbo version */
|
||||
#define LIBJPEG_TURBO_VERSION 1.5.3
|
||||
|
||||
/* libjpeg-turbo version in integer form */
|
||||
#define LIBJPEG_TURBO_VERSION_NUMBER 1005003
|
||||
|
||||
/* Support arithmetic encoding */
|
||||
#define C_ARITH_CODING_SUPPORTED 1
|
||||
|
||||
/* Support arithmetic decoding */
|
||||
#define D_ARITH_CODING_SUPPORTED 1
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
* 8 for 8-bit sample values (the usual setting)
|
||||
* 12 for 12-bit sample values
|
||||
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
|
||||
* JPEG standard, and the IJG code does not support anything else!
|
||||
* We do not support run-time selection of data precision, sorry.
|
||||
*/
|
||||
|
||||
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
/* #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. */
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `unsigned char'. */
|
||||
#define HAVE_UNSIGNED_CHAR 1
|
||||
|
||||
/* Define to 1 if the system has the type `unsigned short'. */
|
||||
#define HAVE_UNSIGNED_SHORT 1
|
||||
|
||||
/* Compiler does not support pointers to undefined structures. */
|
||||
/* #undef INCOMPLETE_TYPES_BROKEN */
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
/* Support in-memory source/destination managers */
|
||||
#define MEM_SRCDST_SUPPORTED 1
|
||||
|
||||
/* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
|
||||
memset/memcpy in <string.h>. */
|
||||
/* #undef NEED_BSD_STRINGS */
|
||||
|
||||
/* Define if you need to include <sys/types.h> to get size_t. */
|
||||
#define NEED_SYS_TYPES_H 1
|
||||
|
||||
/* Define if your (broken) compiler shifts signed values as if they were
|
||||
unsigned. */
|
||||
/* #undef RIGHT_SHIFT_IS_UNSIGNED */
|
||||
#define INLINE __inline__
|
||||
/* These are for configuring the JPEG memory manager. */
|
||||
/* #undef DEFAULT_MAX_MEM */
|
||||
/* #undef NO_MKTEMP */
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
/* Use accelerated SIMD routines. */
|
||||
/* #undef WITH_SIMD */
|
||||
|
||||
#ifdef JPEG_CJPEG_DJPEG
|
||||
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
|
||||
#ifndef __CHAR_UNSIGNED__
|
||||
/* # undef __CHAR_UNSIGNED__ */
|
||||
#endif
|
||||
|
||||
#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 */
|
||||
#define TARGA_SUPPORTED /* Targa image file format */
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* #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 */
|
||||
|
||||
#endif /* JPEG_CJPEG_DJPEG */
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
317
libs/include/jerror.h
Normal file
@ -0,0 +1,317 @@
|
||||
/*
|
||||
* jerror.h
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2014, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file defines the error and message codes for the JPEG library.
|
||||
* Edit this file to add new codes, or to translate the message strings to
|
||||
* some other language.
|
||||
* A set of error-reporting macros are defined too. Some applications using
|
||||
* the JPEG library may wish to include this file to get the error codes
|
||||
* and/or the macros.
|
||||
*/
|
||||
|
||||
/*
|
||||
* To define the enum list of message codes, include this file without
|
||||
* defining macro JMESSAGE. To create a message string table, include it
|
||||
* again with a suitable JMESSAGE definition (see jerror.c for an example).
|
||||
*/
|
||||
#ifndef JMESSAGE
|
||||
#ifndef JERROR_H
|
||||
/* First time through, define the enum list */
|
||||
#define JMAKE_ENUM_LIST
|
||||
#else
|
||||
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
|
||||
#define JMESSAGE(code,string)
|
||||
#endif /* JERROR_H */
|
||||
#endif /* JMESSAGE */
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
typedef enum {
|
||||
|
||||
#define JMESSAGE(code,string) code ,
|
||||
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
|
||||
|
||||
/* For maintenance convenience, list is alphabetical by message code name */
|
||||
#if JPEG_LIB_VERSION < 70
|
||||
JMESSAGE(JERR_ARITH_NOTIMPL,
|
||||
"Sorry, arithmetic coding is not implemented")
|
||||
#endif
|
||||
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")
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
|
||||
#endif
|
||||
JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
|
||||
JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
JMESSAGE(JERR_BAD_DROP_SAMPLING,
|
||||
"Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
|
||||
#endif
|
||||
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")
|
||||
JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
|
||||
JMESSAGE(JERR_BAD_LIB_VERSION,
|
||||
"Wrong JPEG library version: library is %d, caller expects %d")
|
||||
JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
|
||||
JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
|
||||
JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
|
||||
JMESSAGE(JERR_BAD_PROGRESSION,
|
||||
"Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
|
||||
JMESSAGE(JERR_BAD_PROG_SCRIPT,
|
||||
"Invalid progressive parameters at scan script entry %d")
|
||||
JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
|
||||
JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
|
||||
JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
|
||||
JMESSAGE(JERR_BAD_STRUCT_SIZE,
|
||||
"JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
|
||||
JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
|
||||
JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
|
||||
JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
|
||||
JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
|
||||
JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
|
||||
JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
|
||||
JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
|
||||
JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
|
||||
JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
|
||||
JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
|
||||
JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
|
||||
JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
|
||||
JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
|
||||
JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
|
||||
JMESSAGE(JERR_FILE_READ, "Input file read error")
|
||||
JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
|
||||
JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
|
||||
JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
|
||||
JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
|
||||
JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
|
||||
JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
|
||||
JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
|
||||
JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
|
||||
"Cannot transcode due to multiple use of quantization table %d")
|
||||
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")
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
|
||||
#endif
|
||||
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")
|
||||
JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
|
||||
JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
|
||||
JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
|
||||
JMESSAGE(JERR_QUANT_COMPONENTS,
|
||||
"Cannot quantize more than %d color components")
|
||||
JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
|
||||
JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
|
||||
JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
|
||||
JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
|
||||
JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
|
||||
JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
|
||||
JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
|
||||
JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
|
||||
JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
|
||||
JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
|
||||
JMESSAGE(JERR_TFILE_WRITE,
|
||||
"Write failed on temporary file --- out of disk space?")
|
||||
JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
|
||||
JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
|
||||
JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
|
||||
JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
|
||||
JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
|
||||
JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
|
||||
JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT_SHORT)
|
||||
JMESSAGE(JMSG_VERSION, JVERSION)
|
||||
JMESSAGE(JTRC_16BIT_TABLES,
|
||||
"Caution: quantization tables are too coarse for baseline JPEG")
|
||||
JMESSAGE(JTRC_ADOBE,
|
||||
"Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
|
||||
JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
|
||||
JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
|
||||
JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
|
||||
JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
|
||||
JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d")
|
||||
JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
|
||||
JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
|
||||
JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
|
||||
JMESSAGE(JTRC_EOI, "End Of Image")
|
||||
JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d")
|
||||
JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d")
|
||||
JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
|
||||
"Warning: thumbnail image size does not match data length %u")
|
||||
JMESSAGE(JTRC_JFIF_EXTENSION,
|
||||
"JFIF extension marker: type 0x%02x, length %u")
|
||||
JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image")
|
||||
JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
|
||||
JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
|
||||
JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u")
|
||||
JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
|
||||
JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
|
||||
JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
|
||||
JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
|
||||
JMESSAGE(JTRC_RST, "RST%d")
|
||||
JMESSAGE(JTRC_SMOOTH_NOTIMPL,
|
||||
"Smoothing not supported with nonstandard sampling ratios")
|
||||
JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
|
||||
JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d")
|
||||
JMESSAGE(JTRC_SOI, "Start of Image")
|
||||
JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
|
||||
JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d")
|
||||
JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d")
|
||||
JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
|
||||
JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
|
||||
JMESSAGE(JTRC_THUMB_JPEG,
|
||||
"JFIF extension marker: JPEG-compressed thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_THUMB_PALETTE,
|
||||
"JFIF extension marker: palette thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_THUMB_RGB,
|
||||
"JFIF extension marker: RGB thumbnail image, length %u")
|
||||
JMESSAGE(JTRC_UNKNOWN_IDS,
|
||||
"Unrecognized component IDs %d %d %d, assuming YCbCr")
|
||||
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")
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
|
||||
#endif
|
||||
JMESSAGE(JWRN_BOGUS_PROGRESSION,
|
||||
"Inconsistent progression sequence for component %d coefficient %d")
|
||||
JMESSAGE(JWRN_EXTRANEOUS_DATA,
|
||||
"Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
|
||||
JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
|
||||
JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
|
||||
JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
|
||||
JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
|
||||
JMESSAGE(JWRN_MUST_RESYNC,
|
||||
"Corrupt JPEG data: found marker 0x%02x instead of RST%d")
|
||||
JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
|
||||
JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
|
||||
#if JPEG_LIB_VERSION < 70
|
||||
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
|
||||
#if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED)
|
||||
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
|
||||
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef JMAKE_ENUM_LIST
|
||||
|
||||
JMSG_LASTMSGCODE
|
||||
} J_MESSAGE_CODE;
|
||||
|
||||
#undef JMAKE_ENUM_LIST
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
|
||||
#undef JMESSAGE
|
||||
|
||||
|
||||
#ifndef JERROR_H
|
||||
#define JERROR_H
|
||||
|
||||
/* Macros to simplify using the error and trace message stuff */
|
||||
/* The first parameter is either type of cinfo pointer */
|
||||
|
||||
/* Fatal errors (print message and exit) */
|
||||
#define ERREXIT(cinfo,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT1(cinfo,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT2(cinfo,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT3(cinfo,code,p1,p2,p3) \
|
||||
((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->error_exit) ((j_common_ptr) (cinfo)))
|
||||
#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \
|
||||
((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->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), \
|
||||
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
|
||||
|
||||
#define MAKESTMT(stuff) do { stuff } while (0)
|
||||
|
||||
/* Nonfatal errors (we can keep going, but the data is probably corrupt) */
|
||||
#define WARNMS(cinfo,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
#define WARNMS1(cinfo,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
#define WARNMS2(cinfo,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
|
||||
|
||||
/* Informational/debugging messages */
|
||||
#define TRACEMS(cinfo,lvl,code) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS1(cinfo,lvl,code,p1) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS2(cinfo,lvl,code,p1,p2) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
(cinfo)->err->msg_parm.i[0] = (p1), \
|
||||
(cinfo)->err->msg_parm.i[1] = (p2), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
_mp[4] = (p5); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \
|
||||
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
|
||||
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
|
||||
_mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
|
||||
(cinfo)->err->msg_code = (code); \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
|
||||
#define TRACEMSS(cinfo,lvl,code,str) \
|
||||
((cinfo)->err->msg_code = (code), \
|
||||
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
|
||||
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
|
||||
|
||||
#endif /* JERROR_H */
|
@ -1,10 +1,13 @@
|
||||
/*
|
||||
* jmorecfg.h
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* 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.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2009, 2011, 2014-2015, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains additional configuration options that customize the
|
||||
* JPEG software for special applications or support machine-dependent
|
||||
@ -12,18 +15,6 @@
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
* 8 for 8-bit sample values (the usual setting)
|
||||
* 12 for 12-bit sample values
|
||||
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
|
||||
* JPEG standard, and the IJG code does not support anything else!
|
||||
* We do not support run-time selection of data precision, sorry.
|
||||
*/
|
||||
|
||||
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
||||
|
||||
|
||||
/*
|
||||
* Maximum number of components (color channels) allowed in JPEG image.
|
||||
* To meet the letter of the JPEG spec, set this to 255. However, darn
|
||||
@ -63,11 +54,11 @@ typedef unsigned char JSAMPLE;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JSAMPLE;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
#else
|
||||
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* __CHAR_UNSIGNED__ */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
@ -114,11 +105,11 @@ typedef unsigned char JOCTET;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JOCTET;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define GETJOCTET(value) (value)
|
||||
#else
|
||||
#define GETJOCTET(value) ((value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* __CHAR_UNSIGNED__ */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
@ -135,11 +126,11 @@ typedef char JOCTET;
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
typedef unsigned char UINT8;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
typedef char UINT8;
|
||||
#else /* not CHAR_IS_UNSIGNED */
|
||||
#else /* not __CHAR_UNSIGNED__ */
|
||||
typedef short UINT8;
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* __CHAR_UNSIGNED__ */
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
/* UINT16 must hold at least the values 0..65535. */
|
||||
@ -156,7 +147,30 @@ typedef unsigned int UINT16;
|
||||
typedef short INT16;
|
||||
#endif
|
||||
|
||||
/* INT32 must hold at least signed 32-bit values. */
|
||||
/* INT32 must hold at least signed 32-bit values.
|
||||
*
|
||||
* NOTE: The INT32 typedef dates back to libjpeg v5 (1994.) Integers were
|
||||
* sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to
|
||||
* long. It also wasn't common (or at least as common) in 1994 for INT32 to be
|
||||
* defined by platform headers. Since then, however, INT32 is defined in
|
||||
* several other common places:
|
||||
*
|
||||
* Xmd.h (X11 header) typedefs INT32 to int on 64-bit platforms and long on
|
||||
* 32-bit platforms (i.e always a 32-bit signed type.)
|
||||
*
|
||||
* basetsd.h (Win32 header) typedefs INT32 to int (always a 32-bit signed type
|
||||
* on modern platforms.)
|
||||
*
|
||||
* qglobal.h (Qt header) typedefs INT32 to int (always a 32-bit signed type on
|
||||
* modern platforms.)
|
||||
*
|
||||
* This is a recipe for conflict, since "long" and "int" aren't always
|
||||
* compatible types. Since the definition of INT32 has technically been part
|
||||
* of the libjpeg API for more than 20 years, we can't remove it, but we do not
|
||||
* use it internally any longer. We instead define a separate type (JLONG)
|
||||
* for internal use, which ensures that internal behavior will always be the
|
||||
* same regardless of any external headers that may be included.
|
||||
*/
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
||||
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
|
||||
@ -172,7 +186,9 @@ typedef long INT32;
|
||||
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
|
||||
* "unsigned int" is sufficient on all machines. However, if you need to
|
||||
* handle larger images and you don't mind deviating from the spec, you
|
||||
* can change this datatype.
|
||||
* can change this datatype. (Note that changing this datatype will
|
||||
* potentially require modifying the SIMD code. The x86-64 SIMD extensions,
|
||||
* in particular, assume a 32-bit JDIMENSION.)
|
||||
*/
|
||||
|
||||
typedef unsigned int JDIMENSION;
|
||||
@ -197,32 +213,22 @@ typedef unsigned int JDIMENSION;
|
||||
#define EXTERN(type) extern type
|
||||
|
||||
|
||||
/* This macro is used to declare a "method", that is, a function pointer.
|
||||
* We want to supply prototype parameters if the compiler can cope.
|
||||
* Note that the arglist parameter must be parenthesized!
|
||||
* Again, you can customize this if you need special linkage keywords.
|
||||
/* Originally, this macro was used as a way of defining function prototypes
|
||||
* for both modern compilers as well as older compilers that did not support
|
||||
* prototype parameters. libjpeg-turbo has never supported these older,
|
||||
* non-ANSI compilers, but the macro is still included because there is some
|
||||
* software out there that uses it.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
|
||||
|
||||
/* Here is the pseudo-keyword for declaring pointers that must be "far"
|
||||
* on 80x86 machines. Most of the specialized coding for 80x86 is handled
|
||||
* by just saying "FAR *" where such a pointer is needed. In a few places
|
||||
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
|
||||
/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS),
|
||||
* but again, some software relies on this macro.
|
||||
*/
|
||||
|
||||
#ifndef FAR
|
||||
#ifdef NEED_FAR_POINTERS
|
||||
#define FAR far
|
||||
#else
|
||||
#undef FAR
|
||||
#define FAR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@ -273,10 +279,8 @@ typedef int boolean;
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
#define 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 +294,11 @@ typedef int boolean;
|
||||
|
||||
/* Decoder capability options: */
|
||||
|
||||
#define 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? */
|
||||
@ -305,16 +308,24 @@ typedef int boolean;
|
||||
|
||||
|
||||
/*
|
||||
* Ordering of RGB data in scanlines passed to or from the application.
|
||||
* If your application wants to deal with data in the order B,G,R, just
|
||||
* change these macros. You can also deal with formats such as R,G,B,X
|
||||
* (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing
|
||||
* 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
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
* The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial
|
||||
* feature of libjpeg. The idea was that, if an application developer needed
|
||||
* to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could
|
||||
* change these macros, rebuild libjpeg, and link their application statically
|
||||
* with it. In reality, few people ever did this, because there were some
|
||||
* severe restrictions involved (cjpeg and djpeg no longer worked properly,
|
||||
* compressing/decompressing RGB JPEGs no longer worked properly, and the color
|
||||
* quantizer wouldn't work with pixel sizes other than 3.) Further, since all
|
||||
* of the O/S-supplied versions of libjpeg were built with the default values
|
||||
* of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications have
|
||||
* come to regard these values as immutable.
|
||||
*
|
||||
* The libjpeg-turbo colorspace extensions provide a much cleaner way of
|
||||
* compressing from/decompressing to buffers with arbitrary component orders
|
||||
* and pixel sizes. Thus, we do not support changing the values of RGB_RED,
|
||||
* RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE. In addition to the restrictions
|
||||
* listed above, changing these values will also break the SIMD extensions and
|
||||
* the regression tests.
|
||||
*/
|
||||
|
||||
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
||||
@ -322,48 +333,89 @@ typedef int boolean;
|
||||
#define RGB_BLUE 2 /* Offset of Blue */
|
||||
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
||||
|
||||
#define JPEG_NUMCS 17
|
||||
|
||||
#define EXT_RGB_RED 0
|
||||
#define EXT_RGB_GREEN 1
|
||||
#define EXT_RGB_BLUE 2
|
||||
#define EXT_RGB_PIXELSIZE 3
|
||||
|
||||
#define EXT_RGBX_RED 0
|
||||
#define EXT_RGBX_GREEN 1
|
||||
#define EXT_RGBX_BLUE 2
|
||||
#define EXT_RGBX_PIXELSIZE 4
|
||||
|
||||
#define EXT_BGR_RED 2
|
||||
#define EXT_BGR_GREEN 1
|
||||
#define EXT_BGR_BLUE 0
|
||||
#define EXT_BGR_PIXELSIZE 3
|
||||
|
||||
#define EXT_BGRX_RED 2
|
||||
#define EXT_BGRX_GREEN 1
|
||||
#define EXT_BGRX_BLUE 0
|
||||
#define EXT_BGRX_PIXELSIZE 4
|
||||
|
||||
#define EXT_XBGR_RED 3
|
||||
#define EXT_XBGR_GREEN 2
|
||||
#define EXT_XBGR_BLUE 1
|
||||
#define EXT_XBGR_PIXELSIZE 4
|
||||
|
||||
#define EXT_XRGB_RED 1
|
||||
#define EXT_XRGB_GREEN 2
|
||||
#define EXT_XRGB_BLUE 3
|
||||
#define EXT_XRGB_PIXELSIZE 4
|
||||
|
||||
static const int rgb_red[JPEG_NUMCS] = {
|
||||
-1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED,
|
||||
EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
|
||||
EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
|
||||
-1
|
||||
};
|
||||
|
||||
static const int rgb_green[JPEG_NUMCS] = {
|
||||
-1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN,
|
||||
EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
|
||||
EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
|
||||
-1
|
||||
};
|
||||
|
||||
static const int rgb_blue[JPEG_NUMCS] = {
|
||||
-1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE,
|
||||
EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
|
||||
EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
|
||||
-1
|
||||
};
|
||||
|
||||
static const int rgb_pixelsize[JPEG_NUMCS] = {
|
||||
-1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE,
|
||||
EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
|
||||
EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
|
||||
-1
|
||||
};
|
||||
|
||||
/* Definitions for speed-related optimizations. */
|
||||
|
||||
|
||||
/* If your compiler supports inline functions, define INLINE
|
||||
* as the inline keyword; otherwise define it as empty.
|
||||
*/
|
||||
|
||||
#ifndef INLINE
|
||||
#ifdef __GNUC__ /* for instance, GNU C knows about inline */
|
||||
#define INLINE __inline__
|
||||
#endif
|
||||
#ifndef INLINE
|
||||
#define INLINE /* default is to define it as empty */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
|
||||
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
|
||||
* as short on such a machine. MULTIPLIER must be at least 16 bits wide.
|
||||
*/
|
||||
|
||||
#ifndef MULTIPLIER
|
||||
#ifndef WITH_SIMD
|
||||
#define MULTIPLIER int /* type for fastest integer multiply */
|
||||
#else
|
||||
#define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* FAST_FLOAT should be either float or double, whichever is done faster
|
||||
* by your compiler. (Note that this type is only used in the floating point
|
||||
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
|
||||
* Typically, float is faster in ANSI C compilers, while double is faster in
|
||||
* pre-ANSI compilers (because they insist on converting to double anyway).
|
||||
* The code below therefore chooses float if we have ANSI-style prototypes.
|
||||
*/
|
||||
|
||||
#ifndef FAST_FLOAT
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define FAST_FLOAT float
|
||||
#else
|
||||
#define FAST_FLOAT double
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* JPEG_INTERNAL_OPTIONS */
|
||||
|
@ -1,10 +1,14 @@
|
||||
/*
|
||||
* jpeglib.h
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* 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.
|
||||
* Modified 2002-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2009-2011, 2013-2014, 2016, D. R. Commander.
|
||||
* Copyright (C) 2015, Google, Inc.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file defines the application interface for the JPEG library.
|
||||
* Most applications using the library need only include this file,
|
||||
@ -33,21 +37,13 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Version IDs for the JPEG library.
|
||||
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
|
||||
*/
|
||||
|
||||
#define JPEG_LIB_VERSION 80 /* Compatibility version 8.0 */
|
||||
#define JPEG_LIB_VERSION_MAJOR 8
|
||||
#define JPEG_LIB_VERSION_MINOR 4
|
||||
|
||||
|
||||
/* Various constants determining the sizes of things.
|
||||
* All of these are specified by the JPEG standard, so don't change them
|
||||
* 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 */
|
||||
@ -68,20 +64,18 @@ extern "C" {
|
||||
|
||||
|
||||
/* Data structures for images (arrays of samples and of DCT coefficients).
|
||||
* On 80x86 machines, the image arrays are too big for near pointers,
|
||||
* but the pointer arrays can fit in near memory.
|
||||
*/
|
||||
|
||||
typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */
|
||||
typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples. */
|
||||
typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */
|
||||
typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */
|
||||
|
||||
typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */
|
||||
typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */
|
||||
typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */
|
||||
typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */
|
||||
typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */
|
||||
|
||||
typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */
|
||||
typedef JCOEF *JCOEFPTR; /* useful in a couple of places */
|
||||
|
||||
|
||||
/* Types for JPEG compression parameters and working tables. */
|
||||
@ -147,18 +141,23 @@ 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.
|
||||
/* 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 from 1 to 16 are supported.
|
||||
* Note that different components may receive different DCT scalings.
|
||||
* Note that different components may receive different IDCT scalings.
|
||||
*/
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
int DCT_h_scaled_size;
|
||||
int DCT_v_scaled_size;
|
||||
#else
|
||||
int DCT_scaled_size;
|
||||
#endif
|
||||
/* 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_[h_]scaled_size/DCTSIZE)
|
||||
*/
|
||||
JDIMENSION downsampled_width; /* actual width in samples */
|
||||
JDIMENSION downsampled_height; /* actual height in samples */
|
||||
@ -173,7 +172,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_[h_]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 */
|
||||
|
||||
@ -199,26 +198,47 @@ typedef struct {
|
||||
|
||||
/* The decompressor can save APPn and COM markers in a list of these: */
|
||||
|
||||
typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;
|
||||
typedef struct jpeg_marker_struct *jpeg_saved_marker_ptr;
|
||||
|
||||
struct jpeg_marker_struct {
|
||||
jpeg_saved_marker_ptr next; /* next in list, or NULL */
|
||||
UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */
|
||||
unsigned int original_length; /* # bytes of data in the file */
|
||||
unsigned int data_length; /* # bytes of data saved at data[] */
|
||||
JOCTET FAR * data; /* the data contained in the marker */
|
||||
JOCTET *data; /* the data contained in the marker */
|
||||
/* the marker length word is not counted in data_length or original_length */
|
||||
};
|
||||
|
||||
/* Known color spaces. */
|
||||
|
||||
#define JCS_EXTENSIONS 1
|
||||
#define JCS_ALPHA_EXTENSIONS 1
|
||||
|
||||
typedef enum {
|
||||
JCS_UNKNOWN, /* error/unspecified */
|
||||
JCS_GRAYSCALE, /* monochrome */
|
||||
JCS_RGB, /* red/green/blue */
|
||||
JCS_RGB, /* red/green/blue as specified by the RGB_RED,
|
||||
RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros */
|
||||
JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */
|
||||
JCS_CMYK, /* C/M/Y/K */
|
||||
JCS_YCCK /* Y/Cb/Cr/K */
|
||||
JCS_YCCK, /* Y/Cb/Cr/K */
|
||||
JCS_EXT_RGB, /* red/green/blue */
|
||||
JCS_EXT_RGBX, /* red/green/blue/x */
|
||||
JCS_EXT_BGR, /* blue/green/red */
|
||||
JCS_EXT_BGRX, /* blue/green/red/x */
|
||||
JCS_EXT_XBGR, /* x/blue/green/red */
|
||||
JCS_EXT_XRGB, /* x/red/green/blue */
|
||||
/* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR,
|
||||
or JCS_EXT_XRGB during decompression, the X byte is undefined, and in
|
||||
order to ensure the best performance, libjpeg-turbo can set that byte to
|
||||
whatever value it wishes. Use the following colorspace constants to
|
||||
ensure that the X byte is set to 0xFF, so that it can be interpreted as an
|
||||
opaque alpha channel. */
|
||||
JCS_EXT_RGBA, /* red/green/blue/alpha */
|
||||
JCS_EXT_BGRA, /* blue/green/red/alpha */
|
||||
JCS_EXT_ABGR, /* alpha/blue/green/red */
|
||||
JCS_EXT_ARGB, /* alpha/red/green/blue */
|
||||
JCS_RGB565 /* 5-bit red/6-bit green/5-bit blue */
|
||||
} J_COLOR_SPACE;
|
||||
|
||||
/* DCT/IDCT algorithm options. */
|
||||
@ -300,6 +320,7 @@ struct jpeg_compress_struct {
|
||||
* helper routines to simplify changing parameters.
|
||||
*/
|
||||
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
unsigned int scale_num, scale_denom; /* fraction by which to scale image */
|
||||
|
||||
JDIMENSION jpeg_width; /* scaled JPEG image width */
|
||||
@ -310,6 +331,7 @@ struct jpeg_compress_struct {
|
||||
* You can also use jpeg_calc_jpeg_dimensions() to determine these values
|
||||
* in advance of calling jpeg_start_compress().
|
||||
*/
|
||||
#endif
|
||||
|
||||
int data_precision; /* bits of precision in image data */
|
||||
|
||||
@ -320,7 +342,9 @@ struct jpeg_compress_struct {
|
||||
/* comp_info[i] describes component that appears i'th in SOF */
|
||||
|
||||
JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS];
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
int q_scale_factor[NUM_QUANT_TBLS];
|
||||
#endif
|
||||
/* ptrs to coefficient quantization tables, or NULL if not defined,
|
||||
* and corresponding scale factors (percentage, initialized 100).
|
||||
*/
|
||||
@ -344,7 +368,9 @@ 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 */
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */
|
||||
#endif
|
||||
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
|
||||
J_DCT_METHOD dct_method; /* DCT algorithm selector */
|
||||
|
||||
@ -388,8 +414,10 @@ struct jpeg_compress_struct {
|
||||
int max_h_samp_factor; /* largest h_samp_factor */
|
||||
int max_v_samp_factor; /* largest v_samp_factor */
|
||||
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
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 */
|
||||
#endif
|
||||
|
||||
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
|
||||
@ -416,9 +444,11 @@ struct jpeg_compress_struct {
|
||||
|
||||
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
|
||||
|
||||
#if JPEG_LIB_VERSION >= 80
|
||||
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 ) */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Links to compression subobjects (methods and private variables of modules)
|
||||
@ -566,7 +596,9 @@ struct jpeg_decompress_struct {
|
||||
jpeg_component_info *comp_info;
|
||||
/* comp_info[i] describes component that appears i'th in SOF */
|
||||
|
||||
#if JPEG_LIB_VERSION >= 80
|
||||
boolean is_baseline; /* TRUE if Baseline SOF0 encountered */
|
||||
#endif
|
||||
boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
|
||||
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
||||
|
||||
@ -607,8 +639,12 @@ struct jpeg_decompress_struct {
|
||||
int max_h_samp_factor; /* largest h_samp_factor */
|
||||
int max_v_samp_factor; /* largest v_samp_factor */
|
||||
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
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 */
|
||||
#else
|
||||
int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */
|
||||
#endif
|
||||
|
||||
JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */
|
||||
/* The coefficient controller's input and output progress is measured in
|
||||
@ -616,7 +652,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_[v_]scaled_size sample rows of a component per iMCU row.
|
||||
*/
|
||||
|
||||
JSAMPLE *sample_range_limit; /* table for fast range-limiting */
|
||||
@ -640,11 +676,13 @@ struct jpeg_decompress_struct {
|
||||
|
||||
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
|
||||
|
||||
#if JPEG_LIB_VERSION >= 80
|
||||
/* 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 */
|
||||
#endif
|
||||
|
||||
/* This field is shared between entropy decoder and marker parser.
|
||||
* It is either zero or the code of a JPEG marker that has been
|
||||
@ -681,16 +719,16 @@ struct jpeg_decompress_struct {
|
||||
|
||||
struct jpeg_error_mgr {
|
||||
/* Error exit handler: does not return to caller */
|
||||
JMETHOD(void, error_exit, (j_common_ptr cinfo));
|
||||
void (*error_exit) (j_common_ptr cinfo);
|
||||
/* Conditionally emit a trace or warning message */
|
||||
JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
|
||||
void (*emit_message) (j_common_ptr cinfo, int msg_level);
|
||||
/* Routine that actually outputs a trace or error message */
|
||||
JMETHOD(void, output_message, (j_common_ptr cinfo));
|
||||
void (*output_message) (j_common_ptr cinfo);
|
||||
/* Format a message string for the most recent JPEG error or message */
|
||||
JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
|
||||
void (*format_message) (j_common_ptr cinfo, char *buffer);
|
||||
#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */
|
||||
/* Reset error state variables at start of a new image */
|
||||
JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
|
||||
void (*reset_error_mgr) (j_common_ptr cinfo);
|
||||
|
||||
/* The message ID code and any parameters are saved here.
|
||||
* A message can have one string parameter or up to 8 int parameters.
|
||||
@ -738,7 +776,7 @@ struct jpeg_error_mgr {
|
||||
/* Progress monitor object */
|
||||
|
||||
struct jpeg_progress_mgr {
|
||||
JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
|
||||
void (*progress_monitor) (j_common_ptr cinfo);
|
||||
|
||||
long pass_counter; /* work units completed in this pass */
|
||||
long pass_limit; /* total number of work units in this pass */
|
||||
@ -753,9 +791,9 @@ struct jpeg_destination_mgr {
|
||||
JOCTET *next_output_byte; /* => next byte to write in buffer */
|
||||
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
|
||||
|
||||
JMETHOD(void, init_destination, (j_compress_ptr cinfo));
|
||||
JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
|
||||
JMETHOD(void, term_destination, (j_compress_ptr cinfo));
|
||||
void (*init_destination) (j_compress_ptr cinfo);
|
||||
boolean (*empty_output_buffer) (j_compress_ptr cinfo);
|
||||
void (*term_destination) (j_compress_ptr cinfo);
|
||||
};
|
||||
|
||||
|
||||
@ -765,11 +803,11 @@ struct jpeg_source_mgr {
|
||||
const JOCTET *next_input_byte; /* => next byte to read from buffer */
|
||||
size_t bytes_in_buffer; /* # of bytes remaining in buffer */
|
||||
|
||||
JMETHOD(void, init_source, (j_decompress_ptr cinfo));
|
||||
JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
|
||||
JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
|
||||
JMETHOD(void, term_source, (j_decompress_ptr cinfo));
|
||||
void (*init_source) (j_decompress_ptr cinfo);
|
||||
boolean (*fill_input_buffer) (j_decompress_ptr cinfo);
|
||||
void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes);
|
||||
boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired);
|
||||
void (*term_source) (j_decompress_ptr cinfo);
|
||||
};
|
||||
|
||||
|
||||
@ -794,41 +832,32 @@ typedef struct jvirt_barray_control * jvirt_barray_ptr;
|
||||
|
||||
struct jpeg_memory_mgr {
|
||||
/* Method pointers */
|
||||
JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
|
||||
size_t sizeofobject));
|
||||
JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
|
||||
size_t sizeofobject));
|
||||
JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
|
||||
JDIMENSION samplesperrow,
|
||||
JDIMENSION numrows));
|
||||
JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
|
||||
JDIMENSION blocksperrow,
|
||||
JDIMENSION numrows));
|
||||
JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
|
||||
int pool_id,
|
||||
void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject);
|
||||
void *(*alloc_large) (j_common_ptr cinfo, int pool_id,
|
||||
size_t sizeofobject);
|
||||
JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id,
|
||||
JDIMENSION samplesperrow, JDIMENSION numrows);
|
||||
JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id,
|
||||
JDIMENSION blocksperrow, JDIMENSION numrows);
|
||||
jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id,
|
||||
boolean pre_zero,
|
||||
JDIMENSION samplesperrow,
|
||||
JDIMENSION numrows,
|
||||
JDIMENSION maxaccess));
|
||||
JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
|
||||
int pool_id,
|
||||
JDIMENSION maxaccess);
|
||||
jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id,
|
||||
boolean pre_zero,
|
||||
JDIMENSION blocksperrow,
|
||||
JDIMENSION numrows,
|
||||
JDIMENSION maxaccess));
|
||||
JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
|
||||
JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
|
||||
jvirt_sarray_ptr ptr,
|
||||
JDIMENSION start_row,
|
||||
JDIMENSION num_rows,
|
||||
boolean writable));
|
||||
JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
|
||||
jvirt_barray_ptr ptr,
|
||||
JDIMENSION start_row,
|
||||
JDIMENSION num_rows,
|
||||
boolean writable));
|
||||
JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
|
||||
JMETHOD(void, self_destruct, (j_common_ptr cinfo));
|
||||
JDIMENSION maxaccess);
|
||||
void (*realize_virt_arrays) (j_common_ptr cinfo);
|
||||
JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
|
||||
JDIMENSION start_row, JDIMENSION num_rows,
|
||||
boolean writable);
|
||||
JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr,
|
||||
JDIMENSION start_row, JDIMENSION num_rows,
|
||||
boolean writable);
|
||||
void (*free_pool) (j_common_ptr cinfo, int pool_id);
|
||||
void (*self_destruct) (j_common_ptr cinfo);
|
||||
|
||||
/* Limit on memory allocation for this JPEG object. (Note that this is
|
||||
* merely advisory, not a guaranteed maximum; it only affects the space
|
||||
@ -845,88 +874,21 @@ struct jpeg_memory_mgr {
|
||||
/* Routine signature for application-supplied marker processing methods.
|
||||
* Need not pass marker code since it is stored in cinfo->unread_marker.
|
||||
*/
|
||||
typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
|
||||
typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo);
|
||||
|
||||
|
||||
/* Declarations for routines called by application.
|
||||
* The JPP macro hides prototype parameters from compilers that can't cope.
|
||||
* Note JPP requires double parentheses.
|
||||
/* Originally, this macro was used as a way of defining function prototypes
|
||||
* for both modern compilers as well as older compilers that did not support
|
||||
* prototype parameters. libjpeg-turbo has never supported these older,
|
||||
* non-ANSI compilers, but the macro is still included because there is some
|
||||
* software out there that uses it.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JPP(arglist) arglist
|
||||
#else
|
||||
#define JPP(arglist) ()
|
||||
#endif
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers.
|
||||
* We shorten external names to be unique in the first six letters, which
|
||||
* is good enough for all known systems.
|
||||
* (If your compiler itself needs names to be unique in less than 15
|
||||
* characters, you are out of luck. Get a better compiler.)
|
||||
*/
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jpeg_std_error jStdError
|
||||
#define jpeg_CreateCompress jCreaCompress
|
||||
#define jpeg_CreateDecompress jCreaDecompress
|
||||
#define jpeg_destroy_compress jDestCompress
|
||||
#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
|
||||
#define jpeg_suppress_tables jSuppressTables
|
||||
#define jpeg_alloc_quant_table jAlcQTable
|
||||
#define jpeg_alloc_huff_table jAlcHTable
|
||||
#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
|
||||
#define jpeg_write_m_byte jWrtMByte
|
||||
#define jpeg_write_tables jWrtTables
|
||||
#define jpeg_read_header jReadHeader
|
||||
#define jpeg_start_decompress jStrtDecompress
|
||||
#define jpeg_read_scanlines jReadScanlines
|
||||
#define jpeg_finish_decompress jFinDecompress
|
||||
#define jpeg_read_raw_data jReadRawData
|
||||
#define jpeg_has_multiple_scans jHasMultScn
|
||||
#define jpeg_start_output jStrtOutput
|
||||
#define jpeg_finish_output jFinOutput
|
||||
#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
|
||||
#define jpeg_read_coefficients jReadCoefs
|
||||
#define jpeg_write_coefficients jWrtCoefs
|
||||
#define jpeg_copy_critical_parameters jCopyCrit
|
||||
#define jpeg_abort_compress jAbrtCompress
|
||||
#define jpeg_abort_decompress jAbrtDecompress
|
||||
#define jpeg_abort jAbort
|
||||
#define jpeg_destroy jDestroy
|
||||
#define jpeg_resync_to_restart jResyncRestart
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
|
||||
/* Default error-management setup */
|
||||
EXTERN(struct jpeg_error_mgr *) jpeg_std_error
|
||||
JPP((struct jpeg_error_mgr * err));
|
||||
EXTERN(struct jpeg_error_mgr *) jpeg_std_error (struct jpeg_error_mgr *err);
|
||||
|
||||
/* Initialization of JPEG compression objects.
|
||||
* jpeg_create_compress() and jpeg_create_decompress() are the exported
|
||||
@ -941,83 +903,81 @@ EXTERN(struct jpeg_error_mgr *) jpeg_std_error
|
||||
#define jpeg_create_decompress(cinfo) \
|
||||
jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
|
||||
(size_t) sizeof(struct jpeg_decompress_struct))
|
||||
EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
|
||||
int version, size_t structsize));
|
||||
EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
|
||||
int version, size_t structsize));
|
||||
EXTERN(void) jpeg_CreateCompress (j_compress_ptr cinfo, int version,
|
||||
size_t structsize);
|
||||
EXTERN(void) jpeg_CreateDecompress (j_decompress_ptr cinfo, int version,
|
||||
size_t structsize);
|
||||
/* Destruction of JPEG compression objects */
|
||||
EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jpeg_destroy_compress (j_compress_ptr cinfo);
|
||||
EXTERN(void) jpeg_destroy_decompress (j_decompress_ptr cinfo);
|
||||
|
||||
/* Standard data source and destination managers: stdio streams. */
|
||||
/* Caller is responsible for opening the file before and closing after. */
|
||||
EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
|
||||
EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
|
||||
EXTERN(void) jpeg_stdio_dest (j_compress_ptr cinfo, FILE *outfile);
|
||||
EXTERN(void) jpeg_stdio_src (j_decompress_ptr cinfo, FILE *infile);
|
||||
|
||||
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||
/* 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));
|
||||
EXTERN(void) jpeg_mem_dest (j_compress_ptr cinfo, unsigned char **outbuffer,
|
||||
unsigned long *outsize);
|
||||
EXTERN(void) jpeg_mem_src (j_decompress_ptr cinfo,
|
||||
const unsigned char *inbuffer,
|
||||
unsigned long insize);
|
||||
#endif
|
||||
|
||||
/* Default parameter setup for compression */
|
||||
EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_set_defaults (j_compress_ptr cinfo);
|
||||
/* Compression parameter setup aids */
|
||||
EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
|
||||
J_COLOR_SPACE colorspace));
|
||||
EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
|
||||
boolean force_baseline));
|
||||
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,
|
||||
EXTERN(void) jpeg_set_colorspace (j_compress_ptr cinfo,
|
||||
J_COLOR_SPACE colorspace);
|
||||
EXTERN(void) jpeg_default_colorspace (j_compress_ptr cinfo);
|
||||
EXTERN(void) jpeg_set_quality (j_compress_ptr cinfo, int quality,
|
||||
boolean force_baseline);
|
||||
EXTERN(void) jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
|
||||
boolean force_baseline);
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
EXTERN(void) jpeg_default_qtables (j_compress_ptr cinfo,
|
||||
boolean force_baseline);
|
||||
#endif
|
||||
EXTERN(void) jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
|
||||
const unsigned int *basic_table,
|
||||
int scale_factor,
|
||||
boolean force_baseline));
|
||||
EXTERN(int) jpeg_quality_scaling JPP((int quality));
|
||||
EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
|
||||
boolean suppress));
|
||||
EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
|
||||
EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
|
||||
int scale_factor, boolean force_baseline);
|
||||
EXTERN(int) jpeg_quality_scaling (int quality);
|
||||
EXTERN(void) jpeg_simple_progression (j_compress_ptr cinfo);
|
||||
EXTERN(void) jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress);
|
||||
EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table (j_common_ptr cinfo);
|
||||
EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table (j_common_ptr cinfo);
|
||||
|
||||
/* Main entry points for compression */
|
||||
EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
|
||||
boolean write_all_tables));
|
||||
EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
|
||||
EXTERN(void) jpeg_start_compress (j_compress_ptr cinfo,
|
||||
boolean write_all_tables);
|
||||
EXTERN(JDIMENSION) jpeg_write_scanlines (j_compress_ptr cinfo,
|
||||
JSAMPARRAY scanlines,
|
||||
JDIMENSION num_lines));
|
||||
EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
|
||||
JDIMENSION num_lines);
|
||||
EXTERN(void) jpeg_finish_compress (j_compress_ptr cinfo);
|
||||
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
/* Precalculate JPEG dimensions for current compression parameters. */
|
||||
EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo);
|
||||
#endif
|
||||
|
||||
/* 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));
|
||||
EXTERN(JDIMENSION) jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
|
||||
JDIMENSION num_lines);
|
||||
|
||||
/* Write a special marker. See libjpeg.txt concerning safe usage. */
|
||||
EXTERN(void) jpeg_write_marker
|
||||
JPP((j_compress_ptr cinfo, int marker,
|
||||
const JOCTET * dataptr, unsigned int datalen));
|
||||
EXTERN(void) jpeg_write_marker (j_compress_ptr cinfo, int marker,
|
||||
const JOCTET *dataptr, unsigned int datalen);
|
||||
/* Same, but piecemeal. */
|
||||
EXTERN(void) jpeg_write_m_header
|
||||
JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
|
||||
EXTERN(void) jpeg_write_m_byte
|
||||
JPP((j_compress_ptr cinfo, int val));
|
||||
EXTERN(void) jpeg_write_m_header (j_compress_ptr cinfo, int marker,
|
||||
unsigned int datalen);
|
||||
EXTERN(void) jpeg_write_m_byte (j_compress_ptr cinfo, int val);
|
||||
|
||||
/* Alternate compression function: just write an abbreviated table file */
|
||||
EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_write_tables (j_compress_ptr cinfo);
|
||||
|
||||
/* Decompression startup: read start of JPEG datastream to see what's there */
|
||||
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
|
||||
boolean require_image));
|
||||
EXTERN(int) jpeg_read_header (j_decompress_ptr cinfo, boolean require_image);
|
||||
/* Return value is one of: */
|
||||
#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
|
||||
#define JPEG_HEADER_OK 1 /* Found valid image datastream */
|
||||
@ -1029,25 +989,27 @@ EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
|
||||
*/
|
||||
|
||||
/* Main entry points for decompression */
|
||||
EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
|
||||
EXTERN(boolean) jpeg_start_decompress (j_decompress_ptr cinfo);
|
||||
EXTERN(JDIMENSION) jpeg_read_scanlines (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY scanlines,
|
||||
JDIMENSION max_lines));
|
||||
EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
|
||||
JDIMENSION max_lines);
|
||||
EXTERN(JDIMENSION) jpeg_skip_scanlines (j_decompress_ptr cinfo,
|
||||
JDIMENSION num_lines);
|
||||
EXTERN(void) jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
|
||||
JDIMENSION *width);
|
||||
EXTERN(boolean) jpeg_finish_decompress (j_decompress_ptr cinfo);
|
||||
|
||||
/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
|
||||
EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE data,
|
||||
JDIMENSION max_lines));
|
||||
EXTERN(JDIMENSION) jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
|
||||
JDIMENSION max_lines);
|
||||
|
||||
/* Additional entry points for buffered-image mode. */
|
||||
EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
|
||||
int scan_number));
|
||||
EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(boolean) jpeg_has_multiple_scans (j_decompress_ptr cinfo);
|
||||
EXTERN(boolean) jpeg_start_output (j_decompress_ptr cinfo, int scan_number);
|
||||
EXTERN(boolean) jpeg_finish_output (j_decompress_ptr cinfo);
|
||||
EXTERN(boolean) jpeg_input_complete (j_decompress_ptr cinfo);
|
||||
EXTERN(void) jpeg_new_colormap (j_decompress_ptr cinfo);
|
||||
EXTERN(int) jpeg_consume_input (j_decompress_ptr cinfo);
|
||||
/* Return value is one of: */
|
||||
/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */
|
||||
#define JPEG_REACHED_SOS 1 /* Reached start of new scan */
|
||||
@ -1056,25 +1018,26 @@ 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));
|
||||
#if JPEG_LIB_VERSION >= 80
|
||||
EXTERN(void) jpeg_core_output_dimensions (j_decompress_ptr cinfo);
|
||||
#endif
|
||||
EXTERN(void) jpeg_calc_output_dimensions (j_decompress_ptr cinfo);
|
||||
|
||||
/* Control saving of COM and APPn markers into marker_list. */
|
||||
EXTERN(void) jpeg_save_markers
|
||||
JPP((j_decompress_ptr cinfo, int marker_code,
|
||||
unsigned int length_limit));
|
||||
EXTERN(void) jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
|
||||
unsigned int length_limit);
|
||||
|
||||
/* Install a special processing method for COM or APPn markers. */
|
||||
EXTERN(void) jpeg_set_marker_processor
|
||||
JPP((j_decompress_ptr cinfo, int marker_code,
|
||||
jpeg_marker_parser_method routine));
|
||||
EXTERN(void) jpeg_set_marker_processor (j_decompress_ptr cinfo,
|
||||
int marker_code,
|
||||
jpeg_marker_parser_method routine);
|
||||
|
||||
/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
|
||||
EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
|
||||
jvirt_barray_ptr * coef_arrays));
|
||||
EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
|
||||
j_compress_ptr dstinfo));
|
||||
EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients (j_decompress_ptr cinfo);
|
||||
EXTERN(void) jpeg_write_coefficients (j_compress_ptr cinfo,
|
||||
jvirt_barray_ptr *coef_arrays);
|
||||
EXTERN(void) jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
|
||||
j_compress_ptr dstinfo);
|
||||
|
||||
/* If you choose to abort compression or decompression before completing
|
||||
* jpeg_finish_(de)compress, then you need to clean up to release memory,
|
||||
@ -1082,18 +1045,17 @@ EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
|
||||
* if you're done with the JPEG object, but if you want to clean it up and
|
||||
* reuse it, call this:
|
||||
*/
|
||||
EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
|
||||
EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(void) jpeg_abort_compress (j_compress_ptr cinfo);
|
||||
EXTERN(void) jpeg_abort_decompress (j_decompress_ptr cinfo);
|
||||
|
||||
/* Generic versions of jpeg_abort and jpeg_destroy that work on either
|
||||
* flavor of JPEG object. These may be more convenient in some places.
|
||||
*/
|
||||
EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
|
||||
EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
|
||||
EXTERN(void) jpeg_abort (j_common_ptr cinfo);
|
||||
EXTERN(void) jpeg_destroy (j_common_ptr cinfo);
|
||||
|
||||
/* Default restart-marker-resync procedure for use by data source modules */
|
||||
EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
|
||||
int desired));
|
||||
EXTERN(boolean) jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired);
|
||||
|
||||
|
||||
/* These marker codes are exported since applications and data source modules
|
||||
|
2618
libs/include/png.h
@ -1,19 +1,18 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
/* pngconf.h - machine-configurable file for libpng
|
||||
*
|
||||
* libpng version 1.5.12 - July 11, 2012
|
||||
* libpng version 1.6.37
|
||||
*
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
* Copyright (c) 2018-2019 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*
|
||||
*/
|
||||
|
||||
/* Any machine specific code is near the front of this file, so if you
|
||||
* Any machine specific code is near the front of this file, so if you
|
||||
* are configuring libpng for a machine, you may want to read the section
|
||||
* starting here down to where it starts to typedef png_color, png_text,
|
||||
* and png_info.
|
||||
@ -22,35 +21,50 @@
|
||||
#ifndef PNGCONF_H
|
||||
#define PNGCONF_H
|
||||
|
||||
#ifndef PNG_BUILDING_SYMBOL_TABLE
|
||||
/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
|
||||
* definition file for machine specific limits, this may impact the
|
||||
* correctness of the definitions below (see uses of INT_MAX).
|
||||
#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */
|
||||
|
||||
/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C
|
||||
* compiler for correct compilation. The following header files are required by
|
||||
* the standard. If your compiler doesn't provide these header files, or they
|
||||
* do not match the standard, you will need to provide/improve them.
|
||||
*/
|
||||
# ifndef PNG_NO_LIMITS_H
|
||||
#include <limits.h>
|
||||
# endif
|
||||
#include <stddef.h>
|
||||
|
||||
/* For the memory copy APIs (i.e. the standard definitions of these),
|
||||
* because this file defines png_memcpy and so on the base APIs must
|
||||
* be defined here.
|
||||
/* Library header files. These header files are all defined by ISOC90; libpng
|
||||
* expects conformant implementations, however, an ISOC90 conformant system need
|
||||
* not provide these header files if the functionality cannot be implemented.
|
||||
* In this case it will be necessary to disable the relevant parts of libpng in
|
||||
* the build of pnglibconf.h.
|
||||
*
|
||||
* Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not
|
||||
* include this unnecessary header file.
|
||||
*/
|
||||
# ifdef BSD
|
||||
# include <strings.h>
|
||||
# else
|
||||
# include <string.h>
|
||||
# endif
|
||||
|
||||
/* For png_FILE_p - this provides the standard definition of a
|
||||
* FILE
|
||||
*/
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
/* Required for the definition of FILE: */
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef PNG_SETJMP_SUPPORTED
|
||||
/* Required for the definition of jmp_buf and the declaration of longjmp: */
|
||||
# include <setjmp.h>
|
||||
#endif
|
||||
|
||||
/* This controls optimization of the reading of 16 and 32 bit values
|
||||
* from PNG files. It can be set on a per-app-file basis - it
|
||||
#ifdef PNG_CONVERT_tIME_SUPPORTED
|
||||
/* Required for struct tm: */
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
#endif /* PNG_BUILDING_SYMBOL_TABLE */
|
||||
|
||||
/* Prior to 1.6.0, it was possible to turn off 'const' in declarations,
|
||||
* using PNG_NO_CONST. This is no longer supported.
|
||||
*/
|
||||
#define PNG_CONST const /* backward compatibility only */
|
||||
|
||||
/* This controls optimization of the reading of 16-bit and 32-bit
|
||||
* values from PNG files. It can be set on a per-app-file basis: it
|
||||
* just changes whether a macro is used when the function is called.
|
||||
* The library builder sets the default; if read functions are not
|
||||
* built into the library the macro implementation is forced on.
|
||||
@ -72,28 +86,13 @@
|
||||
* may be changed on a per-file basis when compiling against libpng.
|
||||
*/
|
||||
|
||||
/* The PNGARG macro protects us against machines that don't have function
|
||||
* prototypes (ie K&R style headers). If your compiler does not handle
|
||||
* function prototypes, define this macro and use the included ansi2knr.
|
||||
* I've always been able to use _NO_PROTO as the indicator, but you may
|
||||
* need to drag the empty declaration out in front of here, or change the
|
||||
* ifdef to suit your own needs.
|
||||
/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect
|
||||
* against legacy (pre ISOC90) compilers that did not understand function
|
||||
* prototypes. It is not required for modern C compilers.
|
||||
*/
|
||||
#ifndef PNGARG
|
||||
|
||||
# ifdef OF /* zlib prototype munger */
|
||||
# define PNGARG(arglist) OF(arglist)
|
||||
# else
|
||||
|
||||
# ifdef _NO_PROTO
|
||||
# define PNGARG(arglist) ()
|
||||
# else
|
||||
# define PNGARG(arglist) arglist
|
||||
# endif /* _NO_PROTO */
|
||||
|
||||
# endif /* OF */
|
||||
|
||||
#endif /* PNGARG */
|
||||
#endif
|
||||
|
||||
/* Function calling conventions.
|
||||
* =============================
|
||||
@ -128,7 +127,7 @@
|
||||
*
|
||||
* These cases only differ if the operating system does not use the C
|
||||
* calling convention, at present this just means the above cases
|
||||
* (x86 DOS/Windows sytems) and, even then, this does not apply to
|
||||
* (x86 DOS/Windows systems) and, even then, this does not apply to
|
||||
* Cygwin running on those systems.
|
||||
*
|
||||
* Note that the value must be defined in pnglibconf.h so that what
|
||||
@ -177,18 +176,16 @@
|
||||
* ==========================
|
||||
* This code is used at build time to find PNG_IMPEXP, the API settings
|
||||
* and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
|
||||
* import processing is possible. On Windows/x86 systems it also sets
|
||||
* import processing is possible. On Windows systems it also sets
|
||||
* compiler-specific macros to the values required to change the calling
|
||||
* conventions of the various functions.
|
||||
*/
|
||||
#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
|
||||
defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
|
||||
( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
|
||||
defined(_M_X64) || defined(_M_IA64) )
|
||||
/* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes
|
||||
* builds under Cygwin or MinGW. Also includes Watcom builds but these need
|
||||
* special treatment because they are not compatible with GCC or Visual C
|
||||
* because of different calling conventions.
|
||||
#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
|
||||
defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
/* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or
|
||||
* MinGW on any architecture currently supported by Windows. Also includes
|
||||
* Watcom builds but these need special treatment because they are not
|
||||
* compatible with GCC or Visual C because of different calling conventions.
|
||||
*/
|
||||
# if PNG_API_RULE == 2
|
||||
/* If this line results in an error, either because __watcall is not
|
||||
@ -202,6 +199,9 @@
|
||||
# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800))
|
||||
# define PNGCAPI __cdecl
|
||||
# if PNG_API_RULE == 1
|
||||
/* If this line results in an error __stdcall is not understood and
|
||||
* PNG_API_RULE should not have been set to '1'.
|
||||
*/
|
||||
# define PNGAPI __stdcall
|
||||
# endif
|
||||
# else
|
||||
@ -216,10 +216,11 @@
|
||||
# define PNGAPI _stdcall
|
||||
# endif
|
||||
# endif /* compiler/api */
|
||||
|
||||
/* NOTE: PNGCBAPI always defaults to PNGCAPI. */
|
||||
|
||||
# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
|
||||
ERROR: PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed
|
||||
# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed"
|
||||
# endif
|
||||
|
||||
# if (defined(_MSC_VER) && _MSC_VER < 800) ||\
|
||||
@ -239,7 +240,7 @@
|
||||
# endif
|
||||
# endif /* compiler */
|
||||
|
||||
#else /* !Windows/x86 */
|
||||
#else /* !Windows */
|
||||
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
|
||||
# define PNGAPI _System
|
||||
# else /* !Windows/x86 && !OS/2 */
|
||||
@ -294,11 +295,11 @@
|
||||
* table entries, so we discard it here. See the .dfn files in the
|
||||
* scripts directory.
|
||||
*/
|
||||
#ifndef PNG_EXPORTA
|
||||
|
||||
#ifndef PNG_EXPORTA
|
||||
# define PNG_EXPORTA(ordinal, type, name, args, attributes) \
|
||||
PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \
|
||||
extern attributes)
|
||||
PNG_LINKAGE_API attributes)
|
||||
#endif
|
||||
|
||||
/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument,
|
||||
@ -333,17 +334,45 @@
|
||||
|
||||
#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
|
||||
/* Support for compiler specific function attributes. These are used
|
||||
* so that where compiler support is available incorrect use of API
|
||||
* so that where compiler support is available, incorrect use of API
|
||||
* functions in png.h will generate compiler warnings. Added at libpng
|
||||
* version 1.2.41.
|
||||
* version 1.2.41. Disabling these removes the warnings but may also produce
|
||||
* less efficient code.
|
||||
*/
|
||||
# if defined(__GNUC__)
|
||||
# if defined(__clang__) && defined(__has_attribute)
|
||||
/* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */
|
||||
# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
|
||||
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
||||
# endif
|
||||
# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
|
||||
# define PNG_NORETURN __attribute__((__noreturn__))
|
||||
# endif
|
||||
# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
|
||||
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||
# endif
|
||||
# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
|
||||
# define PNG_DEPRECATED __attribute__((__deprecated__))
|
||||
# endif
|
||||
# if !defined(PNG_PRIVATE)
|
||||
# ifdef __has_extension
|
||||
# if __has_extension(attribute_unavailable_with_message)
|
||||
# define PNG_PRIVATE __attribute__((__unavailable__(\
|
||||
"This function is not exported by libpng.")))
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifndef PNG_RESTRICT
|
||||
# define PNG_RESTRICT __restrict
|
||||
# endif
|
||||
|
||||
# elif defined(__GNUC__)
|
||||
# ifndef PNG_USE_RESULT
|
||||
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
||||
# endif
|
||||
# ifndef PNG_NORETURN
|
||||
# define PNG_NORETURN __attribute__((__noreturn__))
|
||||
# endif
|
||||
# if __GNUC__ >= 3
|
||||
# ifndef PNG_ALLOCATED
|
||||
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||
# endif
|
||||
@ -359,9 +388,14 @@
|
||||
__attribute__((__deprecated__))
|
||||
# endif
|
||||
# endif
|
||||
# endif /* __GNUC__ */
|
||||
# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
|
||||
# ifndef PNG_RESTRICT
|
||||
# define PNG_RESTRICT __restrict
|
||||
# endif
|
||||
# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */
|
||||
# endif /* __GNUC__ >= 3 */
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
# ifndef PNG_USE_RESULT
|
||||
# define PNG_USE_RESULT /* not supported */
|
||||
# endif
|
||||
@ -379,7 +413,17 @@
|
||||
# ifndef PNG_PRIVATE
|
||||
# define PNG_PRIVATE __declspec(deprecated)
|
||||
# endif
|
||||
# endif /* _MSC_VER */
|
||||
# ifndef PNG_RESTRICT
|
||||
# if (_MSC_VER >= 1400)
|
||||
# define PNG_RESTRICT __restrict
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# elif defined(__WATCOMC__)
|
||||
# ifndef PNG_RESTRICT
|
||||
# define PNG_RESTRICT __restrict
|
||||
# endif
|
||||
# endif
|
||||
#endif /* PNG_PEDANTIC_WARNINGS */
|
||||
|
||||
#ifndef PNG_DEPRECATED
|
||||
@ -397,10 +441,14 @@
|
||||
#ifndef PNG_PRIVATE
|
||||
# define PNG_PRIVATE /* This is a private libpng function */
|
||||
#endif
|
||||
#ifndef PNG_RESTRICT
|
||||
# define PNG_RESTRICT /* The C99 "restrict" feature */
|
||||
#endif
|
||||
|
||||
#ifndef PNG_FP_EXPORT /* A floating point API. */
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
||||
PNG_EXPORT(ordinal, type, name, args)
|
||||
PNG_EXPORT(ordinal, type, name, args);
|
||||
# else /* No floating point APIs */
|
||||
# define PNG_FP_EXPORT(ordinal, type, name, args)
|
||||
# endif
|
||||
@ -408,189 +456,168 @@
|
||||
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
||||
PNG_EXPORT(ordinal, type, name, args)
|
||||
PNG_EXPORT(ordinal, type, name, args);
|
||||
# else /* No fixed point APIs */
|
||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following uses const char * instead of char * for error
|
||||
* and warning message functions, so some compilers won't complain.
|
||||
* If you do not want to use const, define PNG_NO_CONST here.
|
||||
#ifndef PNG_BUILDING_SYMBOL_TABLE
|
||||
/* Some typedefs to get us started. These should be safe on most of the common
|
||||
* platforms.
|
||||
*
|
||||
* This should not change how the APIs are called, so it can be done
|
||||
* on a per-file basis in the application.
|
||||
* png_uint_32 and png_int_32 may, currently, be larger than required to hold a
|
||||
* 32-bit value however this is not normally advisable.
|
||||
*
|
||||
* png_uint_16 and png_int_16 should always be two bytes in size - this is
|
||||
* verified at library build time.
|
||||
*
|
||||
* png_byte must always be one byte in size.
|
||||
*
|
||||
* The checks below use constants from limits.h, as defined by the ISOC90
|
||||
* standard.
|
||||
*/
|
||||
#ifndef PNG_CONST
|
||||
# ifndef PNG_NO_CONST
|
||||
# define PNG_CONST const
|
||||
# else
|
||||
# define PNG_CONST
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some typedefs to get us started. These should be safe on most of the
|
||||
* common platforms. The typedefs should be at least as large as the
|
||||
* numbers suggest (a png_uint_32 must be at least 32 bits long), but they
|
||||
* don't have to be exactly that size. Some compilers dislike passing
|
||||
* unsigned shorts as function parameters, so you may be better off using
|
||||
* unsigned int for png_uint_16.
|
||||
*/
|
||||
|
||||
#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL)
|
||||
typedef unsigned int png_uint_32;
|
||||
typedef int png_int_32;
|
||||
#else
|
||||
typedef unsigned long png_uint_32;
|
||||
typedef long png_int_32;
|
||||
#endif
|
||||
typedef unsigned short png_uint_16;
|
||||
typedef short png_int_16;
|
||||
#if CHAR_BIT == 8 && UCHAR_MAX == 255
|
||||
typedef unsigned char png_byte;
|
||||
|
||||
#ifdef PNG_NO_SIZE_T
|
||||
typedef unsigned int png_size_t;
|
||||
#else
|
||||
# error "libpng requires 8-bit bytes"
|
||||
#endif
|
||||
|
||||
#if INT_MIN == -32768 && INT_MAX == 32767
|
||||
typedef int png_int_16;
|
||||
#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
|
||||
typedef short png_int_16;
|
||||
#else
|
||||
# error "libpng requires a signed 16-bit type"
|
||||
#endif
|
||||
|
||||
#if UINT_MAX == 65535
|
||||
typedef unsigned int png_uint_16;
|
||||
#elif USHRT_MAX == 65535
|
||||
typedef unsigned short png_uint_16;
|
||||
#else
|
||||
# error "libpng requires an unsigned 16-bit type"
|
||||
#endif
|
||||
|
||||
#if INT_MIN < -2147483646 && INT_MAX > 2147483646
|
||||
typedef int png_int_32;
|
||||
#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
|
||||
typedef long int png_int_32;
|
||||
#else
|
||||
# error "libpng requires a signed 32-bit (or more) type"
|
||||
#endif
|
||||
|
||||
#if UINT_MAX > 4294967294U
|
||||
typedef unsigned int png_uint_32;
|
||||
#elif ULONG_MAX > 4294967294U
|
||||
typedef unsigned long int png_uint_32;
|
||||
#else
|
||||
# error "libpng requires an unsigned 32-bit (or more) type"
|
||||
#endif
|
||||
|
||||
/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.
|
||||
* From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant
|
||||
* behavior of sizeof and ptrdiff_t are required.
|
||||
* The legacy typedefs are provided here for backwards compatibility.
|
||||
*/
|
||||
typedef size_t png_size_t;
|
||||
typedef ptrdiff_t png_ptrdiff_t;
|
||||
|
||||
/* libpng needs to know the maximum value of 'size_t' and this controls the
|
||||
* definition of png_alloc_size_t, below. This maximum value of size_t limits
|
||||
* but does not control the maximum allocations the library makes - there is
|
||||
* direct application control of this through png_set_user_limits().
|
||||
*/
|
||||
#ifndef PNG_SMALL_SIZE_T
|
||||
/* Compiler specific tests for systems where size_t is known to be less than
|
||||
* 32 bits (some of these systems may no longer work because of the lack of
|
||||
* 'far' support; see above.)
|
||||
*/
|
||||
# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\
|
||||
(defined(_MSC_VER) && defined(MAXSEG_64K))
|
||||
# define PNG_SMALL_SIZE_T
|
||||
# endif
|
||||
#endif
|
||||
#define png_sizeof(x) (sizeof (x))
|
||||
|
||||
/* The following is needed for medium model support. It cannot be in the
|
||||
* pngpriv.h header. Needs modification for other compilers besides
|
||||
* MSC. Model independent support declares all arrays and pointers to be
|
||||
* large using the far keyword. The zlib version used must also support
|
||||
* model independent data. As of version zlib 1.0.4, the necessary changes
|
||||
* have been made in zlib. The USE_FAR_KEYWORD define triggers other
|
||||
* changes that are needed. (Tim Wegner)
|
||||
/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller
|
||||
* than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are
|
||||
* not necessary; in fact, it is recommended not to use them at all, so that
|
||||
* the compiler can complain when something turns out to be problematic.
|
||||
*
|
||||
* Casts in the other direction (from png_alloc_size_t to size_t or
|
||||
* png_uint_32) should be explicitly applied; however, we do not expect to
|
||||
* encounter practical situations that require such conversions.
|
||||
*
|
||||
* PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than
|
||||
* 4294967295 - i.e. less than the maximum value of png_uint_32.
|
||||
*/
|
||||
|
||||
/* Separate compiler dependencies (problem here is that zlib.h always
|
||||
* defines FAR. (SJT)
|
||||
*/
|
||||
#ifdef __BORLANDC__
|
||||
# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
|
||||
# define LDATA 1
|
||||
#ifdef PNG_SMALL_SIZE_T
|
||||
typedef png_uint_32 png_alloc_size_t;
|
||||
#else
|
||||
# define LDATA 0
|
||||
typedef size_t png_alloc_size_t;
|
||||
#endif
|
||||
/* GRR: why is Cygwin in here? Cygwin is not Borland C... */
|
||||
# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
|
||||
# define PNG_MAX_MALLOC_64K /* only used in build */
|
||||
# if (LDATA != 1)
|
||||
# ifndef FAR
|
||||
# define FAR __far
|
||||
# endif
|
||||
# define USE_FAR_KEYWORD
|
||||
# endif /* LDATA != 1 */
|
||||
/* Possibly useful for moving data out of default segment.
|
||||
* Uncomment it if you want. Could also define FARDATA as
|
||||
* const if your compiler supports it. (SJT)
|
||||
# define FARDATA FAR
|
||||
*/
|
||||
# endif /* __WIN32__, __FLAT__, __CYGWIN__ */
|
||||
#endif /* __BORLANDC__ */
|
||||
|
||||
|
||||
/* Suggest testing for specific compiler first before testing for
|
||||
* FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
|
||||
* making reliance oncertain keywords suspect. (SJT)
|
||||
/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
|
||||
* implementations of Intel CPU specific support of user-mode segmented address
|
||||
* spaces, where 16-bit pointers address more than 65536 bytes of memory using
|
||||
* separate 'segment' registers. The implementation requires two different
|
||||
* types of pointer (only one of which includes the segment value.)
|
||||
*
|
||||
* If required this support is available in version 1.2 of libpng and may be
|
||||
* available in versions through 1.5, although the correctness of the code has
|
||||
* not been verified recently.
|
||||
*/
|
||||
|
||||
/* MSC Medium model */
|
||||
#ifdef FAR
|
||||
# ifdef M_I86MM
|
||||
# define USE_FAR_KEYWORD
|
||||
# define FARDATA FAR
|
||||
# include <dos.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* SJT: default case */
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
/* At this point FAR is always defined */
|
||||
#ifndef FARDATA
|
||||
# define FARDATA
|
||||
#endif
|
||||
|
||||
/* Typedef for floating-point numbers that are converted
|
||||
* to fixed-point with a multiple of 100,000, e.g., gamma
|
||||
/* Typedef for floating-point numbers that are converted to fixed-point with a
|
||||
* multiple of 100,000, e.g., gamma
|
||||
*/
|
||||
typedef png_int_32 png_fixed_point;
|
||||
|
||||
/* Add typedefs for pointers */
|
||||
typedef void FAR * png_voidp;
|
||||
typedef PNG_CONST void FAR * png_const_voidp;
|
||||
typedef png_byte FAR * png_bytep;
|
||||
typedef PNG_CONST png_byte FAR * png_const_bytep;
|
||||
typedef png_uint_32 FAR * png_uint_32p;
|
||||
typedef PNG_CONST png_uint_32 FAR * png_const_uint_32p;
|
||||
typedef png_int_32 FAR * png_int_32p;
|
||||
typedef PNG_CONST png_int_32 FAR * png_const_int_32p;
|
||||
typedef png_uint_16 FAR * png_uint_16p;
|
||||
typedef PNG_CONST png_uint_16 FAR * png_const_uint_16p;
|
||||
typedef png_int_16 FAR * png_int_16p;
|
||||
typedef PNG_CONST png_int_16 FAR * png_const_int_16p;
|
||||
typedef char FAR * png_charp;
|
||||
typedef PNG_CONST char FAR * png_const_charp;
|
||||
typedef png_fixed_point FAR * png_fixed_point_p;
|
||||
typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p;
|
||||
typedef png_size_t FAR * png_size_tp;
|
||||
typedef PNG_CONST png_size_t FAR * png_const_size_tp;
|
||||
typedef void * png_voidp;
|
||||
typedef const void * png_const_voidp;
|
||||
typedef png_byte * png_bytep;
|
||||
typedef const png_byte * png_const_bytep;
|
||||
typedef png_uint_32 * png_uint_32p;
|
||||
typedef const png_uint_32 * png_const_uint_32p;
|
||||
typedef png_int_32 * png_int_32p;
|
||||
typedef const png_int_32 * png_const_int_32p;
|
||||
typedef png_uint_16 * png_uint_16p;
|
||||
typedef const png_uint_16 * png_const_uint_16p;
|
||||
typedef png_int_16 * png_int_16p;
|
||||
typedef const png_int_16 * png_const_int_16p;
|
||||
typedef char * png_charp;
|
||||
typedef const char * png_const_charp;
|
||||
typedef png_fixed_point * png_fixed_point_p;
|
||||
typedef const png_fixed_point * png_const_fixed_point_p;
|
||||
typedef size_t * png_size_tp;
|
||||
typedef const size_t * png_const_size_tp;
|
||||
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
typedef FILE * png_FILE_p;
|
||||
#endif
|
||||
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
typedef double FAR * png_doublep;
|
||||
typedef PNG_CONST double FAR * png_const_doublep;
|
||||
typedef double * png_doublep;
|
||||
typedef const double * png_const_doublep;
|
||||
#endif
|
||||
|
||||
/* Pointers to pointers; i.e. arrays */
|
||||
typedef png_byte FAR * FAR * png_bytepp;
|
||||
typedef png_uint_32 FAR * FAR * png_uint_32pp;
|
||||
typedef png_int_32 FAR * FAR * png_int_32pp;
|
||||
typedef png_uint_16 FAR * FAR * png_uint_16pp;
|
||||
typedef png_int_16 FAR * FAR * png_int_16pp;
|
||||
typedef PNG_CONST char FAR * FAR * png_const_charpp;
|
||||
typedef char FAR * FAR * png_charpp;
|
||||
typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
|
||||
typedef png_byte * * png_bytepp;
|
||||
typedef png_uint_32 * * png_uint_32pp;
|
||||
typedef png_int_32 * * png_int_32pp;
|
||||
typedef png_uint_16 * * png_uint_16pp;
|
||||
typedef png_int_16 * * png_int_16pp;
|
||||
typedef const char * * png_const_charpp;
|
||||
typedef char * * png_charpp;
|
||||
typedef png_fixed_point * * png_fixed_point_pp;
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
typedef double FAR * FAR * png_doublepp;
|
||||
typedef double * * png_doublepp;
|
||||
#endif
|
||||
|
||||
/* Pointers to pointers to pointers; i.e., pointer to array */
|
||||
typedef char FAR * FAR * FAR * png_charppp;
|
||||
typedef char * * * png_charppp;
|
||||
|
||||
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t,
|
||||
* and no smaller than png_uint_32. Casts from png_size_t or png_uint_32
|
||||
* to png_alloc_size_t are not necessary; in fact, it is recommended
|
||||
* not to use them at all so that the compiler can complain when something
|
||||
* turns out to be problematic.
|
||||
* Casts in the other direction (from png_alloc_size_t to png_size_t or
|
||||
* png_uint_32) should be explicitly applied; however, we do not expect
|
||||
* to encounter practical situations that require such conversions.
|
||||
*/
|
||||
#if defined(__TURBOC__) && !defined(__FLAT__)
|
||||
typedef unsigned long png_alloc_size_t;
|
||||
#else
|
||||
# if defined(_MSC_VER) && defined(MAXSEG_64K)
|
||||
typedef unsigned long png_alloc_size_t;
|
||||
# else
|
||||
/* This is an attempt to detect an old Windows system where (int) is
|
||||
* actually 16 bits, in that case png_malloc must have an argument with a
|
||||
* bigger size to accomodate the requirements of the library.
|
||||
*/
|
||||
# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
|
||||
(!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
|
||||
typedef DWORD png_alloc_size_t;
|
||||
# else
|
||||
typedef png_size_t png_alloc_size_t;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif /* PNG_BUILDING_SYMBOL_TABLE */
|
||||
|
||||
#endif /* PNGCONF_H */
|
||||
|
219
libs/include/pnglibconf.h
Normal file
@ -0,0 +1,219 @@
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* libpng version 1.6.37 */
|
||||
|
||||
/* Copyright (c) 2018-2019 Cosmin Truta */
|
||||
/* Copyright (c) 1998-2002,2004,2006-2018 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*/
|
||||
#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
|
||||
/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/
|
||||
/*#undef PNG_POWERPC_VSX_CHECK_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_eXIf_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
|
||||
#define PNG_SAVE_INT_32_SUPPORTED
|
||||
#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
#define PNG_SETJMP_SUPPORTED
|
||||
#define 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_STDIO_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_COMPRESSION_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_eXIf_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_eXIf_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_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_LINKAGE_API extern
|
||||
#define PNG_LINKAGE_CALLBACK extern
|
||||
#define PNG_LINKAGE_DATA extern
|
||||
#define PNG_LINKAGE_FUNCTION extern
|
||||
#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_USER_CHUNK_CACHE_MAX 1000
|
||||
#define PNG_USER_CHUNK_MALLOC_MAX 8000000
|
||||
#define PNG_USER_HEIGHT_MAX 1000000
|
||||
#define PNG_USER_WIDTH_MAX 1000000
|
||||
#define PNG_ZBUF_SIZE 8192
|
||||
#define PNG_ZLIB_VERNUM 0x12b0
|
||||
#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 */
|
@ -55,7 +55,7 @@ typedef struct
|
||||
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
|
||||
PNGUCOLOR bckgrnd; // Background color
|
||||
PNGU_u32 numTrans; // Number of transparent colors
|
||||
PNGUCOLOR *trans; // Transparent colors
|
||||
} PNGUPROP;
|
||||
@ -172,4 +172,3 @@ int PNGU_EncodeFromEFB (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, PNGU_u32 st
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
1545
libs/include/turbojpeg.h
Normal file
@ -1,5 +1,5 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
/* all linked symbols and init macros */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
@ -29,6 +29,7 @@
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# define adler32_z z_adler32_z
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
@ -37,10 +38,14 @@
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define crc32_z z_crc32_z
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateGetDictionary z_deflateGetDictionary
|
||||
# define deflateInit z_deflateInit
|
||||
# define deflateInit2 z_deflateInit2
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
@ -67,6 +72,8 @@
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzfread z_gzfread
|
||||
# define gzfwrite z_gzfwrite
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
@ -78,7 +85,6 @@
|
||||
# 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
|
||||
@ -89,32 +95,39 @@
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit z_inflateBackInit
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCodesUsed z_inflateCodesUsed
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit z_inflateInit
|
||||
# define inflateInit2 z_inflateInit2
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflateValidate z_inflateValidate
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# define uncompress2 z_uncompress2
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
@ -224,9 +237,19 @@
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#ifdef Z_SOLO
|
||||
typedef unsigned long z_size_t;
|
||||
#else
|
||||
# define z_longlong long long
|
||||
# if defined(NO_SIZE_T)
|
||||
typedef unsigned NO_SIZE_T z_size_t;
|
||||
# elif defined(STDC)
|
||||
# include <stddef.h>
|
||||
typedef size_t z_size_t;
|
||||
# else
|
||||
typedef unsigned long z_size_t;
|
||||
# endif
|
||||
# undef z_longlong
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
@ -256,7 +279,7 @@
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.8, April 28th, 2013
|
||||
version 1.2.11, January 15th, 2017
|
||||
|
||||
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2017 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.8"
|
||||
#define ZLIB_VERNUM 0x1280
|
||||
#define ZLIB_VERSION "1.2.11"
|
||||
#define ZLIB_VERNUM 0x12b0
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 2
|
||||
#define ZLIB_VER_REVISION 8
|
||||
#define ZLIB_VER_REVISION 11
|
||||
#define ZLIB_VER_SUBREVISION 0
|
||||
|
||||
/*
|
||||
@ -65,7 +65,8 @@ extern "C" {
|
||||
with "gz". The gzip format is different from the zlib format. gzip is a
|
||||
gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
|
||||
|
||||
This library can optionally read and write gzip streams in memory as well.
|
||||
This library can optionally read and write gzip and raw deflate streams in
|
||||
memory as well.
|
||||
|
||||
The zlib format was designed to be compact and fast for use in memory
|
||||
and on communications channels. The gzip format was designed for single-
|
||||
@ -74,7 +75,7 @@ extern "C" {
|
||||
|
||||
The library does not install any signal handler. The decoder checks
|
||||
the consistency of the compressed data, so the library should never crash
|
||||
even in case of corrupted input.
|
||||
even in the case of corrupted input.
|
||||
*/
|
||||
|
||||
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
|
||||
@ -87,7 +88,7 @@ typedef struct z_stream_s {
|
||||
uInt avail_in; /* number of bytes available at next_in */
|
||||
uLong total_in; /* total number of input bytes read so far */
|
||||
|
||||
Bytef *next_out; /* next output byte should be put there */
|
||||
Bytef *next_out; /* next output byte will go here */
|
||||
uInt avail_out; /* remaining free space at next_out */
|
||||
uLong total_out; /* total number of bytes output so far */
|
||||
|
||||
@ -98,8 +99,9 @@ typedef struct z_stream_s {
|
||||
free_func zfree; /* used to free the internal state */
|
||||
voidpf opaque; /* private data object passed to zalloc and zfree */
|
||||
|
||||
int data_type; /* best guess about the data type: binary or text */
|
||||
uLong adler; /* adler32 value of the uncompressed data */
|
||||
int data_type; /* best guess about the data type: binary or text
|
||||
for deflate, or the decoding state for inflate */
|
||||
uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
|
||||
uLong reserved; /* reserved for future use */
|
||||
} z_stream;
|
||||
|
||||
@ -142,7 +144,9 @@ typedef gz_header FAR *gz_headerp;
|
||||
|
||||
zalloc must return Z_NULL if there is not enough memory for the object.
|
||||
If zlib is used in a multi-threaded application, zalloc and zfree must be
|
||||
thread safe.
|
||||
thread safe. In that case, zlib is thread-safe. When zalloc and zfree are
|
||||
Z_NULL on entry to the initialization function, they are set to internal
|
||||
routines that use the standard library functions malloc() and free().
|
||||
|
||||
On 16-bit systems, the functions zalloc and zfree must be able to allocate
|
||||
exactly 65536 bytes, but will not be required to allocate more than this if
|
||||
@ -155,7 +159,7 @@ typedef gz_header FAR *gz_headerp;
|
||||
|
||||
The fields total_in and total_out can be used for statistics or progress
|
||||
reports. After compression, total_in holds the total size of the
|
||||
uncompressed data and may be saved for use in the decompressor (particularly
|
||||
uncompressed data and may be saved for use by the decompressor (particularly
|
||||
if the decompressor wants to decompress everything in a single step).
|
||||
*/
|
||||
|
||||
@ -200,7 +204,7 @@ typedef gz_header FAR *gz_headerp;
|
||||
#define Z_TEXT 1
|
||||
#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
|
||||
#define Z_UNKNOWN 2
|
||||
/* Possible values of the data_type field (though see inflate()) */
|
||||
/* Possible values of the data_type field for deflate() */
|
||||
|
||||
#define Z_DEFLATED 8
|
||||
/* The deflate compression method (the only one supported in this version) */
|
||||
@ -258,11 +262,11 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||
enough room in the output buffer), next_in and avail_in are updated and
|
||||
processing will resume at this point for the next call of deflate().
|
||||
|
||||
- Provide more output starting at next_out and update next_out and avail_out
|
||||
- Generate more output starting at next_out and update next_out and avail_out
|
||||
accordingly. This action is forced if the parameter flush is non zero.
|
||||
Forcing flush frequently degrades the compression ratio, so this parameter
|
||||
should be set only when necessary (in interactive applications). Some
|
||||
output may be provided even if flush is not set.
|
||||
should be set only when necessary. Some output may be provided even if
|
||||
flush is zero.
|
||||
|
||||
Before the call of deflate(), the application should ensure that at least
|
||||
one of the actions is possible, by providing more input and/or consuming more
|
||||
@ -271,7 +275,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||
output when it wants, for example when the output buffer is full (avail_out
|
||||
== 0), or after each call of deflate(). If deflate returns Z_OK and with
|
||||
zero avail_out, it must be called again after making room in the output
|
||||
buffer because there might be more output pending.
|
||||
buffer because there might be more output pending. See deflatePending(),
|
||||
which can be used if desired to determine whether or not there is more ouput
|
||||
in that case.
|
||||
|
||||
Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
|
||||
decide how much data to accumulate before producing output, in order to
|
||||
@ -292,8 +298,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
|
||||
This completes the current deflate block and follows it with an empty fixed
|
||||
codes block that is 10 bits long. This assures that enough bytes are output
|
||||
in order for the decompressor to finish the block before the empty fixed code
|
||||
block.
|
||||
in order for the decompressor to finish the block before the empty fixed
|
||||
codes block.
|
||||
|
||||
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
||||
for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
|
||||
@ -319,34 +325,38 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||
|
||||
If the parameter flush is set to Z_FINISH, pending input is processed,
|
||||
pending output is flushed and deflate returns with Z_STREAM_END if there was
|
||||
enough output space; if deflate returns with Z_OK, this function must be
|
||||
called again with Z_FINISH and more output space (updated avail_out) but no
|
||||
more input data, until it returns with Z_STREAM_END or an error. After
|
||||
deflate has returned Z_STREAM_END, the only possible operations on the stream
|
||||
are deflateReset or deflateEnd.
|
||||
enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
|
||||
function must be called again with Z_FINISH and more output space (updated
|
||||
avail_out) but no more input data, until it returns with Z_STREAM_END or an
|
||||
error. After deflate has returned Z_STREAM_END, the only possible operations
|
||||
on the stream are deflateReset or deflateEnd.
|
||||
|
||||
Z_FINISH can be used immediately after deflateInit if all the compression
|
||||
is to be done in a single step. In this case, avail_out must be at least the
|
||||
value returned by deflateBound (see below). Then deflate is guaranteed to
|
||||
return Z_STREAM_END. If not enough output space is provided, deflate will
|
||||
not return Z_STREAM_END, and it must be called again as described above.
|
||||
Z_FINISH can be used in the first deflate call after deflateInit if all the
|
||||
compression is to be done in a single step. In order to complete in one
|
||||
call, avail_out must be at least the value returned by deflateBound (see
|
||||
below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
|
||||
output space is provided, deflate will not return Z_STREAM_END, and it must
|
||||
be called again as described above.
|
||||
|
||||
deflate() sets strm->adler to the adler32 checksum of all input read
|
||||
so far (that is, total_in bytes).
|
||||
deflate() sets strm->adler to the Adler-32 checksum of all input read
|
||||
so far (that is, total_in bytes). If a gzip stream is being generated, then
|
||||
strm->adler will be the CRC-32 checksum of the input read so far. (See
|
||||
deflateInit2 below.)
|
||||
|
||||
deflate() may update strm->data_type if it can make a good guess about
|
||||
the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
|
||||
binary. This field is only for information purposes and does not affect the
|
||||
compression algorithm in any manner.
|
||||
the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
|
||||
considered binary. This field is only for information purposes and does not
|
||||
affect the compression algorithm in any manner.
|
||||
|
||||
deflate() returns Z_OK if some progress has been made (more input
|
||||
processed or more output produced), Z_STREAM_END if all input has been
|
||||
consumed and all output has been produced (only when flush is set to
|
||||
Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
|
||||
if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
|
||||
(for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
|
||||
fatal, and deflate() can be called again with more input and more output
|
||||
space to continue compressing.
|
||||
if next_in or next_out was Z_NULL or the state was inadvertently written over
|
||||
by the application), or Z_BUF_ERROR if no progress is possible (for example
|
||||
avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
|
||||
deflate() can be called again with more input and more output space to
|
||||
continue compressing.
|
||||
*/
|
||||
|
||||
|
||||
@ -369,23 +379,21 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
|
||||
|
||||
Initializes the internal stream state for decompression. The fields
|
||||
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
|
||||
the caller. If next_in is not Z_NULL and avail_in is large enough (the
|
||||
exact value depends on the compression method), inflateInit determines the
|
||||
compression method from the zlib header and allocates all data structures
|
||||
accordingly; otherwise the allocation will be deferred to the first call of
|
||||
inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
|
||||
use default allocation functions.
|
||||
the caller. In the current version of inflate, the provided input is not
|
||||
read or consumed. The allocation of a sliding window will be deferred to
|
||||
the first call of inflate (if the decompression does not complete on the
|
||||
first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
|
||||
them to use default allocation functions.
|
||||
|
||||
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
|
||||
version assumed by the caller, or Z_STREAM_ERROR if the parameters are
|
||||
invalid, such as a null pointer to the structure. msg is set to null if
|
||||
there is no error message. inflateInit does not perform any decompression
|
||||
apart from possibly reading the zlib header if present: actual decompression
|
||||
will be done by inflate(). (So next_in and avail_in may be modified, but
|
||||
next_out and avail_out are unused and unchanged.) The current implementation
|
||||
of inflateInit() does not process any header information -- that is deferred
|
||||
until inflate() is called.
|
||||
there is no error message. inflateInit does not perform any decompression.
|
||||
Actual decompression will be done by inflate(). So next_in, and avail_in,
|
||||
next_out, and avail_out are unused and unchanged. The current
|
||||
implementation of inflateInit() does not process any header information --
|
||||
that is deferred until inflate() is called.
|
||||
*/
|
||||
|
||||
|
||||
@ -401,17 +409,20 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
|
||||
- Decompress more input starting at next_in and update next_in and avail_in
|
||||
accordingly. If not all input can be processed (because there is not
|
||||
enough room in the output buffer), next_in is updated and processing will
|
||||
resume at this point for the next call of inflate().
|
||||
enough room in the output buffer), then next_in and avail_in are updated
|
||||
accordingly, and processing will resume at this point for the next call of
|
||||
inflate().
|
||||
|
||||
- Provide more output starting at next_out and update next_out and avail_out
|
||||
- Generate more output starting at next_out and update next_out and avail_out
|
||||
accordingly. inflate() provides as much output as possible, until there is
|
||||
no more input data or no more space in the output buffer (see below about
|
||||
the flush parameter).
|
||||
|
||||
Before the call of inflate(), the application should ensure that at least
|
||||
one of the actions is possible, by providing more input and/or consuming more
|
||||
output, and updating the next_* and avail_* values accordingly. The
|
||||
output, and updating the next_* and avail_* values accordingly. If the
|
||||
caller of inflate() does not provide both available input and available
|
||||
output space, it is possible that there will be no progress made. The
|
||||
application can consume the uncompressed output when it wants, for example
|
||||
when the output buffer is full (avail_out == 0), or after each call of
|
||||
inflate(). If inflate returns Z_OK and with zero avail_out, it must be
|
||||
@ -428,7 +439,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
gets to the end of that block, or when it runs out of data.
|
||||
|
||||
The Z_BLOCK option assists in appending to or combining deflate streams.
|
||||
Also to assist in this, on return inflate() will set strm->data_type to the
|
||||
To assist in this, on return inflate() always sets strm->data_type to the
|
||||
number of unused bits in the last byte taken from strm->next_in, plus 64 if
|
||||
inflate() is currently decoding the last block in the deflate stream, plus
|
||||
128 if inflate() returned immediately after decoding an end-of-block code or
|
||||
@ -476,32 +487,33 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
|
||||
strm->adler to the Adler-32 checksum of all output produced so far (that is,
|
||||
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
|
||||
below. At the end of the stream, inflate() checks that its computed adler32
|
||||
below. At the end of the stream, inflate() checks that its computed Adler-32
|
||||
checksum is equal to that saved by the compressor and returns Z_STREAM_END
|
||||
only if the checksum is correct.
|
||||
|
||||
inflate() can decompress and check either zlib-wrapped or gzip-wrapped
|
||||
deflate data. The header type is detected automatically, if requested when
|
||||
initializing with inflateInit2(). Any information contained in the gzip
|
||||
header is not retained, so applications that need that information should
|
||||
instead use raw inflate, see inflateInit2() below, or inflateBack() and
|
||||
perform their own processing of the gzip header and trailer. When processing
|
||||
header is not retained unless inflateGetHeader() is used. When processing
|
||||
gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
|
||||
producted so far. The CRC-32 is checked against the gzip trailer.
|
||||
produced so far. The CRC-32 is checked against the gzip trailer, as is the
|
||||
uncompressed length, modulo 2^32.
|
||||
|
||||
inflate() returns Z_OK if some progress has been made (more input processed
|
||||
or more output produced), Z_STREAM_END if the end of the compressed data has
|
||||
been reached and all uncompressed output has been produced, Z_NEED_DICT if a
|
||||
preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
|
||||
corrupted (input stream not conforming to the zlib format or incorrect check
|
||||
value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
|
||||
next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
|
||||
Z_BUF_ERROR if no progress is possible or if there was not enough room in the
|
||||
output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
|
||||
value, in which case strm->msg points to a string with a more specific
|
||||
error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
|
||||
next_in or next_out was Z_NULL, or the state was inadvertently written over
|
||||
by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
|
||||
if no progress was possible or if there was not enough room in the output
|
||||
buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
|
||||
inflate() can be called again with more input and more output space to
|
||||
continue decompressing. If Z_DATA_ERROR is returned, the application may
|
||||
then call inflateSync() to look for a good compression block if a partial
|
||||
recovery of the data is desired.
|
||||
recovery of the data is to be attempted.
|
||||
*/
|
||||
|
||||
|
||||
@ -511,9 +523,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
||||
This function discards any unprocessed input and does not flush any pending
|
||||
output.
|
||||
|
||||
inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
|
||||
was inconsistent. In the error case, msg may be set but then points to a
|
||||
static string (which must not be deallocated).
|
||||
inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
|
||||
was inconsistent.
|
||||
*/
|
||||
|
||||
|
||||
@ -544,16 +555,29 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
||||
compression at the expense of memory usage. The default value is 15 if
|
||||
deflateInit is used instead.
|
||||
|
||||
For the current implementation of deflate(), a windowBits value of 8 (a
|
||||
window size of 256 bytes) is not supported. As a result, a request for 8
|
||||
will result in 9 (a 512-byte window). In that case, providing 8 to
|
||||
inflateInit2() will result in an error when the zlib header with 9 is
|
||||
checked against the initialization of inflate(). The remedy is to not use 8
|
||||
with deflateInit2() with this initialization, or at least in that case use 9
|
||||
with inflateInit2().
|
||||
|
||||
windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
|
||||
determines the window size. deflate() will then generate raw deflate data
|
||||
with no zlib header or trailer, and will not compute an adler32 check value.
|
||||
with no zlib header or trailer, and will not compute a check value.
|
||||
|
||||
windowBits can also be greater than 15 for optional gzip encoding. Add
|
||||
16 to windowBits to write a simple gzip header and trailer around the
|
||||
compressed data instead of a zlib wrapper. The gzip header will have no
|
||||
file name, no extra data, no comment, no modification time (set to zero), no
|
||||
header crc, and the operating system will be set to 255 (unknown). If a
|
||||
gzip stream is being written, strm->adler is a crc32 instead of an adler32.
|
||||
header crc, and the operating system will be set to the appropriate value,
|
||||
if the operating system was determined at compile time. If a gzip stream is
|
||||
being written, strm->adler is a CRC-32 instead of an Adler-32.
|
||||
|
||||
For raw deflate or gzip encoding, a request for a 256-byte window is
|
||||
rejected as invalid, since only the zlib header provides a means of
|
||||
transmitting the window size to the decompressor.
|
||||
|
||||
The memLevel parameter specifies how much memory should be allocated
|
||||
for the internal compression state. memLevel=1 uses minimum memory but is
|
||||
@ -614,12 +638,12 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
||||
addition, the current implementation of deflate will use at most the window
|
||||
size minus 262 bytes of the provided dictionary.
|
||||
|
||||
Upon return of this function, strm->adler is set to the adler32 value
|
||||
Upon return of this function, strm->adler is set to the Adler-32 value
|
||||
of the dictionary; the decompressor may later use this value to determine
|
||||
which dictionary has been used by the compressor. (The adler32 value
|
||||
which dictionary has been used by the compressor. (The Adler-32 value
|
||||
applies to the whole dictionary even if only a subset of the dictionary is
|
||||
actually used by the compressor.) If a raw deflate was requested, then the
|
||||
adler32 value is not computed and strm->adler is not set.
|
||||
Adler-32 value is not computed and strm->adler is not set.
|
||||
|
||||
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
|
||||
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
|
||||
@ -628,6 +652,28 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
||||
not perform any compression: this will be done by deflate().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
|
||||
Bytef *dictionary,
|
||||
uInt *dictLength));
|
||||
/*
|
||||
Returns the sliding dictionary being maintained by deflate. 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 deflateGetDictionary() 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.
|
||||
|
||||
deflateGetDictionary() may return a length less than the window size, even
|
||||
when more than the window size in input has been provided. It may return up
|
||||
to 258 bytes less in that case, due to how zlib's implementation of deflate
|
||||
manages the sliding window and lookahead for matches, where matches can be
|
||||
up to 258 bytes long. If the application needs the last window-size bytes of
|
||||
input, then that would need to be saved by the application outside of zlib.
|
||||
|
||||
deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
|
||||
stream state is inconsistent.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
||||
z_streamp source));
|
||||
/*
|
||||
@ -648,10 +694,10 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
||||
|
||||
ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
|
||||
/*
|
||||
This function is equivalent to deflateEnd followed by deflateInit,
|
||||
but does not free and reallocate all the internal compression state. The
|
||||
stream will keep the same compression level and any other attributes that
|
||||
may have been set by deflateInit2.
|
||||
This function is equivalent to deflateEnd followed by deflateInit, but
|
||||
does not free and reallocate the internal compression state. The stream
|
||||
will leave the compression level and any other attributes that may have been
|
||||
set unchanged.
|
||||
|
||||
deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent (such as zalloc or state being Z_NULL).
|
||||
@ -662,20 +708,36 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
|
||||
int strategy));
|
||||
/*
|
||||
Dynamically update the compression level and compression strategy. The
|
||||
interpretation of level and strategy is as in deflateInit2. This can be
|
||||
interpretation of level and strategy is as in deflateInit2(). This can be
|
||||
used to switch between compression and straight copy of the input data, or
|
||||
to switch to a different kind of input data requiring a different strategy.
|
||||
If the compression level is changed, the input available so far is
|
||||
compressed with the old level (and may be flushed); the new level will take
|
||||
effect only at the next call of deflate().
|
||||
If the compression approach (which is a function of the level) or the
|
||||
strategy is changed, and if any input has been consumed in a previous
|
||||
deflate() call, then the input available so far is compressed with the old
|
||||
level and strategy using deflate(strm, Z_BLOCK). There are three approaches
|
||||
for the compression levels 0, 1..3, and 4..9 respectively. The new level
|
||||
and strategy will take effect at the next call of deflate().
|
||||
|
||||
Before the call of deflateParams, the stream state must be set as for
|
||||
a call of deflate(), since the currently available input may have to be
|
||||
compressed and flushed. In particular, strm->avail_out must be non-zero.
|
||||
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
|
||||
not have enough output space to complete, then the parameter change will not
|
||||
take effect. In this case, deflateParams() can be called again with the
|
||||
same parameters and more output space to try again.
|
||||
|
||||
deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
|
||||
strm->avail_out was zero.
|
||||
In order to assure a change in the parameters on the first try, the
|
||||
deflate stream should be flushed using deflate() with Z_BLOCK or other flush
|
||||
request until strm.avail_out is not zero, before calling deflateParams().
|
||||
Then no more input data should be provided before the deflateParams() call.
|
||||
If this is done, the old level and strategy will be applied to the data
|
||||
compressed before deflateParams(), and the new level and strategy will be
|
||||
applied to the the data compressed after deflateParams().
|
||||
|
||||
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
|
||||
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
|
||||
there was not enough output space to complete the compression of the
|
||||
available input data before a change in the strategy or approach. Note that
|
||||
in the case of a Z_BUF_ERROR, the parameters are not changed. A return
|
||||
value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
|
||||
retried with more output space.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
|
||||
@ -793,7 +855,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
||||
is for use with other formats that use the deflate compressed data format
|
||||
such as zip. Those formats provide their own check values. If a custom
|
||||
format is developed using the raw deflate format for compressed data, it is
|
||||
recommended that a check value such as an adler32 or a crc32 be applied to
|
||||
recommended that a check value such as an Adler-32 or a CRC-32 be applied to
|
||||
the uncompressed data as is done in the zlib, gzip, and zip formats. For
|
||||
most applications, the zlib format should be used as is. Note that comments
|
||||
above on the use in deflateInit2() applies to the magnitude of windowBits.
|
||||
@ -802,7 +864,10 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
||||
32 to windowBits to enable zlib and gzip decoding with automatic header
|
||||
detection, or add 16 to decode only the gzip format (the zlib format will
|
||||
return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
|
||||
crc32 instead of an adler32.
|
||||
CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
|
||||
below), inflate() will not automatically decode concatenated gzip streams.
|
||||
inflate() will return Z_STREAM_END at the end of the gzip stream. The state
|
||||
would need to be reset to continue decoding a subsequent gzip stream.
|
||||
|
||||
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
|
||||
@ -823,7 +888,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
||||
Initializes the decompression dictionary from the given uncompressed byte
|
||||
sequence. This function must be called immediately after a call of inflate,
|
||||
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
|
||||
can be determined from the adler32 value returned by that call of inflate.
|
||||
can be determined from the Adler-32 value returned by that call of inflate.
|
||||
The compressor and decompressor must use exactly the same dictionary (see
|
||||
deflateSetDictionary). For raw inflate, this function can be called at any
|
||||
time to set the dictionary. If the provided dictionary is smaller than the
|
||||
@ -834,7 +899,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
||||
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
|
||||
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
|
||||
inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
|
||||
expected one (incorrect adler32 value). inflateSetDictionary does not
|
||||
expected one (incorrect Adler-32 value). inflateSetDictionary does not
|
||||
perform any decompression: this will be done by subsequent calls of
|
||||
inflate().
|
||||
*/
|
||||
@ -892,7 +957,7 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
||||
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
||||
/*
|
||||
This function is equivalent to inflateEnd followed by inflateInit,
|
||||
but does not free and reallocate all the internal decompression state. The
|
||||
but does not free and reallocate the internal decompression state. The
|
||||
stream will keep attributes that may have been set by inflateInit2.
|
||||
|
||||
inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
@ -904,7 +969,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
|
||||
/*
|
||||
This function is the same as inflateReset, but it also permits changing
|
||||
the wrap and window size requests. The windowBits parameter is interpreted
|
||||
the same as it is for inflateInit2.
|
||||
the same as it is for inflateInit2. If the window size is changed, then the
|
||||
memory allocated for the window is freed, and the window will be reallocated
|
||||
by inflate() if needed.
|
||||
|
||||
inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent (such as zalloc or state being Z_NULL), or if
|
||||
@ -956,7 +1023,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
|
||||
location in the input stream can be determined from avail_in and data_type
|
||||
as noted in the description for the Z_BLOCK flush parameter for inflate.
|
||||
|
||||
inflateMark returns the value noted above or -1 << 16 if the provided
|
||||
inflateMark returns the value noted above, or -65536 if the provided
|
||||
source stream state was inconsistent.
|
||||
*/
|
||||
|
||||
@ -1048,9 +1115,9 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
||||
This routine would normally be used in a utility that reads zip or gzip
|
||||
files and writes out uncompressed files. The utility would decode the
|
||||
header and process the trailer on its own, hence this routine expects only
|
||||
the raw deflate stream to decompress. This is different from the normal
|
||||
behavior of inflate(), which expects either a zlib or gzip header and
|
||||
trailer around the deflate stream.
|
||||
the raw deflate stream to decompress. This is different from the default
|
||||
behavior of inflate(), which expects a zlib header and trailer around the
|
||||
deflate stream.
|
||||
|
||||
inflateBack() uses two subroutines supplied by the caller that are then
|
||||
called by inflateBack() for input and output. inflateBack() calls those
|
||||
@ -1060,11 +1127,11 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
||||
typedefs. inflateBack() will call in(in_desc, &buf) which should return the
|
||||
number of bytes of provided input, and a pointer to that input in buf. If
|
||||
there is no input available, in() must return zero -- buf is ignored in that
|
||||
case--and inflateBack() will return a buffer error. inflateBack() will call
|
||||
out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
|
||||
should return zero on success, or non-zero on failure. If out() returns
|
||||
non-zero, inflateBack() will return with an error. Neither in() nor out()
|
||||
are permitted to change the contents of the window provided to
|
||||
case -- and inflateBack() will return a buffer error. inflateBack() will
|
||||
call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
|
||||
out() should return zero on success, or non-zero on failure. If out()
|
||||
returns non-zero, inflateBack() will return with an error. Neither in() nor
|
||||
out() are permitted to change the contents of the window provided to
|
||||
inflateBackInit(), which is also the buffer that out() uses to write from.
|
||||
The length written by out() will be at most the window size. Any non-zero
|
||||
amount of input may be provided by in().
|
||||
@ -1114,7 +1181,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
||||
7.6: size of z_off_t
|
||||
|
||||
Compiler, assembler, and debug options:
|
||||
8: DEBUG
|
||||
8: ZLIB_DEBUG
|
||||
9: ASMV or ASMINF -- use ASM code
|
||||
10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
|
||||
11: 0 (reserved)
|
||||
@ -1164,7 +1231,8 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
|
||||
the byte length of the source buffer. Upon entry, destLen is the total size
|
||||
of the destination buffer, which must be at least the value returned by
|
||||
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
||||
compressed buffer.
|
||||
compressed data. compress() is equivalent to compress2() with a level
|
||||
parameter of Z_DEFAULT_COMPRESSION.
|
||||
|
||||
compress returns Z_OK if success, Z_MEM_ERROR if there was not
|
||||
enough memory, Z_BUF_ERROR if there was not enough room in the output
|
||||
@ -1180,7 +1248,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
|
||||
length of the source buffer. Upon entry, destLen is the total size of the
|
||||
destination buffer, which must be at least the value returned by
|
||||
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
||||
compressed buffer.
|
||||
compressed data.
|
||||
|
||||
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
|
||||
@ -1203,7 +1271,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
||||
uncompressed data. (The size of the uncompressed data must have been saved
|
||||
previously by the compressor and transmitted to the decompressor by some
|
||||
mechanism outside the scope of this compression library.) Upon exit, destLen
|
||||
is the actual size of the uncompressed buffer.
|
||||
is the actual size of the uncompressed data.
|
||||
|
||||
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
|
||||
enough memory, Z_BUF_ERROR if there was not enough room in the output
|
||||
@ -1212,6 +1280,14 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
||||
buffer with the uncompressed data up to that point.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong *sourceLen));
|
||||
/*
|
||||
Same as uncompress, except that sourceLen is a pointer, where the
|
||||
length of the source is *sourceLen. On return, *sourceLen is the number of
|
||||
source bytes consumed.
|
||||
*/
|
||||
|
||||
/* gzip file access functions */
|
||||
|
||||
/*
|
||||
@ -1290,10 +1366,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
|
||||
default buffer size is 8192 bytes. This function must be called after
|
||||
gzopen() or gzdopen(), and before any other calls that read or write the
|
||||
file. The buffer memory allocation is always deferred to the first read or
|
||||
write. Two buffers are allocated, either both of the specified size when
|
||||
writing, or one of the specified size and the other twice that size when
|
||||
reading. A larger buffer size of, for example, 64K or 128K bytes will
|
||||
noticeably increase the speed of decompression (reading).
|
||||
write. Three times that size in buffer space is allocated. A larger buffer
|
||||
size of, for example, 64K or 128K bytes will noticeably increase the speed
|
||||
of decompression (reading).
|
||||
|
||||
The new buffer size also affects the maximum length for gzprintf().
|
||||
|
||||
@ -1304,10 +1379,12 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
|
||||
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
||||
/*
|
||||
Dynamically update the compression level or strategy. See the description
|
||||
of deflateInit2 for the meaning of these parameters.
|
||||
of deflateInit2 for the meaning of these parameters. Previously provided
|
||||
data is flushed before the parameter change.
|
||||
|
||||
gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
|
||||
opened for writing.
|
||||
gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
|
||||
opened for writing, Z_ERRNO if there is an error writing the flushed data,
|
||||
or Z_MEM_ERROR if there is a memory allocation error.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
||||
@ -1335,7 +1412,35 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
||||
case.
|
||||
|
||||
gzread returns the number of uncompressed bytes actually read, less than
|
||||
len for end of file, or -1 for error.
|
||||
len for end of file, or -1 for error. If len is too large to fit in an int,
|
||||
then nothing is read, -1 is returned, and the error state is set to
|
||||
Z_STREAM_ERROR.
|
||||
*/
|
||||
|
||||
ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
|
||||
gzFile file));
|
||||
/*
|
||||
Read up to nitems items of size size from file to buf, otherwise operating
|
||||
as gzread() does. This duplicates the interface of stdio's fread(), with
|
||||
size_t request and return types. If the library defines size_t, then
|
||||
z_size_t is identical to size_t. If not, then z_size_t is an unsigned
|
||||
integer type that can contain a pointer.
|
||||
|
||||
gzfread() returns the number of full items read of size size, or zero if
|
||||
the end of the file was reached and a full item could not be read, or if
|
||||
there was an error. gzerror() must be consulted if zero is returned in
|
||||
order to determine if there was an error. If the multiplication of size and
|
||||
nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
|
||||
is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
|
||||
|
||||
In the event that the end of file is reached and only a partial item is
|
||||
available at the end, i.e. the remaining uncompressed data length is not a
|
||||
multiple of size, then the final partial item is nevetheless read into buf
|
||||
and the end-of-file flag is set. The length of the partial item read is not
|
||||
provided, but could be inferred from the result of gztell(). This behavior
|
||||
is the same as the behavior of fread() implementations in common libraries,
|
||||
but it prevents the direct use of gzfread() to read a concurrently written
|
||||
file, reseting and retrying on end-of-file, when size is not 1.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
||||
@ -1346,19 +1451,33 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
||||
error.
|
||||
*/
|
||||
|
||||
ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
|
||||
z_size_t nitems, gzFile file));
|
||||
/*
|
||||
gzfwrite() writes nitems items of size size from buf to file, duplicating
|
||||
the interface of stdio's fwrite(), with size_t request and return types. If
|
||||
the library defines size_t, then z_size_t is identical to size_t. If not,
|
||||
then z_size_t is an unsigned integer type that can contain a pointer.
|
||||
|
||||
gzfwrite() returns the number of full items written of size size, or zero
|
||||
if there was an error. If the multiplication of size and nitems overflows,
|
||||
i.e. the product does not fit in a z_size_t, then nothing is written, zero
|
||||
is returned, and the error state is set to Z_STREAM_ERROR.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
|
||||
/*
|
||||
Converts, formats, and writes the arguments to the compressed file under
|
||||
control of the format string, as in fprintf. gzprintf returns the number of
|
||||
uncompressed bytes actually written, or 0 in case of error. The number of
|
||||
uncompressed bytes written is limited to 8191, or one less than the buffer
|
||||
size given to gzbuffer(). The caller should assure that this limit is not
|
||||
exceeded. If it is exceeded, then gzprintf() will return an error (0) with
|
||||
nothing written. In this case, there may also be a buffer overflow with
|
||||
unpredictable consequences, which is possible only if zlib was compiled with
|
||||
the insecure functions sprintf() or vsprintf() because the secure snprintf()
|
||||
or vsnprintf() functions were not available. This can be determined using
|
||||
zlibCompileFlags().
|
||||
uncompressed bytes actually written, or a negative zlib error code in case
|
||||
of error. The number of uncompressed bytes written is limited to 8191, or
|
||||
one less than the buffer size given to gzbuffer(). The caller should assure
|
||||
that this limit is not exceeded. If it is exceeded, then gzprintf() will
|
||||
return an error (0) with nothing written. In this case, there may also be a
|
||||
buffer overflow with unpredictable consequences, which is possible only if
|
||||
zlib was compiled with the insecure functions sprintf() or vsprintf()
|
||||
because the secure snprintf() or vsnprintf() functions were not available.
|
||||
This can be determined using zlibCompileFlags().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
||||
@ -1418,7 +1537,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
|
||||
If the flush parameter is Z_FINISH, the remaining data is written and the
|
||||
gzip stream is completed in the output. If gzwrite() is called again, a new
|
||||
gzip stream will be started in the output. gzread() is able to read such
|
||||
concatented gzip streams.
|
||||
concatenated gzip streams.
|
||||
|
||||
gzflush should be called only when strictly necessary because it will
|
||||
degrade compression if called too often.
|
||||
@ -1572,7 +1691,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
return the updated checksum. If buf is Z_NULL, this function returns the
|
||||
required initial value for the checksum.
|
||||
|
||||
An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
|
||||
An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
|
||||
much faster.
|
||||
|
||||
Usage example:
|
||||
@ -1585,6 +1704,12 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
if (adler != original_adler) error();
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
|
||||
z_size_t len));
|
||||
/*
|
||||
Same as adler32(), but with a size_t length.
|
||||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
|
||||
z_off_t len2));
|
||||
@ -1614,6 +1739,12 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
if (crc != original_crc) error();
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
|
||||
z_size_t len));
|
||||
/*
|
||||
Same as crc32(), but with a size_t length.
|
||||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
|
||||
|
||||
@ -1644,6 +1775,21 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
unsigned char FAR *window,
|
||||
const char *version,
|
||||
int stream_size));
|
||||
#ifdef Z_PREFIX_SET
|
||||
# define z_deflateInit(strm, level) \
|
||||
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
# define z_inflateInit(strm) \
|
||||
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
||||
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
||||
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
# define z_inflateInit2(strm, windowBits) \
|
||||
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
||||
(int)sizeof(z_stream))
|
||||
# define z_inflateBackInit(strm, windowBits, window) \
|
||||
inflateBackInit_((strm), (windowBits), (window), \
|
||||
ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
#else
|
||||
# define deflateInit(strm, level) \
|
||||
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
# define inflateInit(strm) \
|
||||
@ -1657,6 +1803,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
# define inflateBackInit(strm, windowBits, window) \
|
||||
inflateBackInit_((strm), (windowBits), (window), \
|
||||
ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
#endif
|
||||
|
||||
#ifndef Z_SOLO
|
||||
|
||||
@ -1676,10 +1823,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
||||
#ifdef Z_PREFIX_SET
|
||||
# undef z_gzgetc
|
||||
# define z_gzgetc(g) \
|
||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
|
||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
|
||||
#else
|
||||
# define gzgetc(g) \
|
||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
|
||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
|
||||
#endif
|
||||
|
||||
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
|
||||
@ -1737,19 +1884,16 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
||||
/* hack for buggy compilers */
|
||||
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
|
||||
struct internal_state {int dummy;};
|
||||
#endif
|
||||
|
||||
/* undocumented functions */
|
||||
ZEXTERN const char * ZEXPORT zError OF((int));
|
||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
||||
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
|
||||
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
|
||||
ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
|
||||
ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp));
|
||||
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
|
||||
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
||||
#if defined(_WIN32) && !defined(Z_SOLO)
|
||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO)
|
||||
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
||||
const char *mode));
|
||||
#endif
|
||||
|