mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
Compare commits
212 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d24a16e5c3 | ||
|
80e4ed0170 | ||
|
3335cf53bd | ||
|
88c6fdb6bd | ||
|
26146cf895 | ||
|
6c1e85279e | ||
|
a1f72297e3 | ||
|
3927544c93 | ||
|
48fdaf50e2 | ||
|
c7e49fa617 | ||
|
a0ef54af49 | ||
c5c769675a | |||
|
14af9a9cf3 | ||
|
df767e9ba1 | ||
|
5e497f7a04 | ||
|
c6bfb7d50a | ||
|
c49df74c65 | ||
|
5415c95fef | ||
|
1989cb3222 | ||
|
57e7e64b1f | ||
|
4d03e0de7b | ||
|
b7fefd0c02 | ||
|
089e0ece6b | ||
|
863135df9d | ||
|
5213311515 | ||
|
04b06e438d | ||
|
07a44551f9 | ||
|
cde0c4ab53 | ||
|
04cdd3de52 | ||
|
e0bb6e936b | ||
|
158a40d89b | ||
|
38d86fe6b3 | ||
|
1239b90751 | ||
|
b878b9e2ee | ||
|
1fa1054f04 | ||
|
9d41f679c3 | ||
|
bd6c18802c | ||
|
290b75fcd5 | ||
|
78832585be | ||
|
877b257e47 | ||
|
c175cf6bb6 | ||
|
31f9d0edc0 | ||
|
da80913558 | ||
|
2d5ed10cfa | ||
|
5e9719d53b | ||
|
7f47c0ead2 | ||
|
3e46a009da | ||
|
2d3f38a079 | ||
|
276c156d97 | ||
|
6556df346b | ||
|
1e3e9f008b | ||
|
3f4f9d1d08 | ||
|
882ad5c672 | ||
|
95d3cd63b1 | ||
|
d77459ad2d | ||
|
d5f0ca6e01 | ||
|
9984778c46 | ||
|
3ac8ecdc5c | ||
|
9498f82038 | ||
|
7d4db44456 | ||
|
aceb49ceb8 | ||
|
ed97c7ace2 | ||
|
3ad6a6cd8d | ||
|
2e3a862450 | ||
|
d1eab33a68 | ||
|
e98bf31d3f | ||
|
345d7fd6e0 | ||
|
2fd07be7a8 | ||
|
363caf4794 | ||
|
2826ec575e | ||
|
c4b949acab | ||
|
4be2d6efda | ||
|
d5bfdedb19 | ||
|
a2c02143f5 | ||
|
8e601ae97e | ||
|
d3eebff59b | ||
|
4db7b7a5c2 | ||
|
cc9aa985ed | ||
|
25a67d6539 | ||
|
3da96c7737 | ||
|
f11fe23f16 | ||
|
b71f76c72f | ||
|
67dc2fa7fb | ||
|
b2359ad180 | ||
|
62813afad3 | ||
|
821b01a533 | ||
|
ae706c6597 | ||
|
ab6c9aaf9e | ||
|
6e3669ae65 | ||
|
2a94fb6cdd | ||
|
e9649fc8d0 | ||
|
626c46b7fa | ||
|
412e46b712 | ||
|
23874285c2 | ||
|
a17c2b7f9d | ||
|
7f269c9406 | ||
|
5a4f3fd759 | ||
|
637be5b08c | ||
|
5fa567e298 | ||
|
1e16afc5bf | ||
|
24e5e28abb | ||
|
172bb46207 | ||
|
05b75dbd98 | ||
|
3335827419 | ||
|
6b1dcabf36 | ||
|
87b6379641 | ||
|
5df5ccc2ee | ||
|
c5f993ef18 | ||
|
fe2c4d50ce | ||
|
dff4272de0 | ||
|
30a5f54cbc | ||
|
bf5870677a | ||
|
20a307e175 | ||
|
ef1f601e9b | ||
|
e1d24b2c82 | ||
|
d9e8333d71 | ||
|
5eae62928a | ||
|
3fc14abfcd | ||
|
6f6b3ec2d8 | ||
|
2553cb2577 | ||
|
8a5a0fd438 | ||
|
105a1bc623 | ||
|
8b2bacf223 | ||
|
6b37a3c362 | ||
|
721629235d | ||
|
f9dffae20f | ||
|
9faa6db839 | ||
|
5e4535bbf7 | ||
|
0ce8640d06 | ||
|
9f7da43da4 | ||
|
a45cc4cbdf | ||
|
7f4f6ea2fc | ||
|
85c0f05b6d | ||
|
2e3504d657 | ||
|
043ff6b423 | ||
|
62126f6ecf | ||
|
30452862cc | ||
|
bbba4c0ebc | ||
|
08785c5ba2 | ||
|
798b77809f | ||
8874a6b74b | |||
b9f2b2cc5a | |||
79e75d2b54 | |||
|
ba74ae3ebd | ||
|
26790615de | ||
|
2a827f6ce3 | ||
|
b2b8ef1601 | ||
|
f9d2a87d5a | ||
|
7900ea9a93 | ||
|
1bc0279056 | ||
|
aa89fb6eb6 | ||
|
d7e552fd44 | ||
|
a05d0b3e25 | ||
|
a0eba4ea8f | ||
|
afed7082f4 | ||
|
5bfb7fcd19 | ||
|
bdefb68ff6 | ||
|
5b7bb4f582 | ||
|
61d7c5caf5 | ||
|
caa01d15b4 | ||
|
214c50c19a | ||
|
26b467b665 | ||
|
a768c2a76a | ||
|
3b1fdf06bd | ||
|
a5dd7d7df1 | ||
|
a349af207d | ||
|
9048d5fe57 | ||
|
346f480b3d | ||
|
01cb1b47fc | ||
|
6c32f57284 | ||
|
d27dc8baa4 | ||
|
1d1ab97e7c | ||
|
12d21fa0a7 | ||
|
ec5bd48a5b | ||
|
65df635c00 | ||
|
096a2bd92d | ||
|
8ba18d3b98 | ||
|
9838c16a5f | ||
|
c90587576b | ||
|
85198bdeb8 | ||
|
c5f4f0f8ca | ||
|
34950647e9 | ||
|
149e25ebe3 | ||
|
9350f51c3b | ||
|
13a8ac0926 | ||
|
9193f9cdac | ||
|
f05d7ceffa | ||
|
2fee0c86d3 | ||
|
d8aa0714ec | ||
|
9cea2f80a9 | ||
|
6ba7dac8d1 | ||
|
352ff7fe3b | ||
9fc354a79f | |||
|
e0eef718e3 | ||
|
9336f80737 | ||
|
63e9d31b74 | ||
|
370d28f1fd | ||
|
29d7100bf1 | ||
|
12a1c456ea | ||
|
b4aa6564cb | ||
|
39067bf186 | ||
|
b78eefe711 | ||
|
ff94e73be8 | ||
|
96a89ba708 | ||
|
47b59f84e6 | ||
|
29c25239c9 | ||
|
3a7152b2bd | ||
|
701d901513 | ||
|
c4443e4a38 | ||
|
29da73ea80 | ||
|
ac4e5ddf1a | ||
|
c629021a44 |
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**What version of WiiFlow Lite**
|
||||||
|
v5.4.9
|
||||||
|
v5.5.0 beta 10
|
||||||
|
|
||||||
|
**On Wii or Wii U vWii**
|
||||||
|
Wii
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
62
.github/workflows/main.yml
vendored
Normal file
62
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
name: Build binaries
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache
|
||||||
|
id: cache-1
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: cache
|
||||||
|
key: ${{ runner.os }}-cache-1
|
||||||
|
|
||||||
|
- name: Download devkitPPC r42.2-1, libogc 2.4.0 and required tools
|
||||||
|
if: steps.cache-1.outputs.cache-hit != 'true'
|
||||||
|
# general-tools is needed for bin2s and gamecube-tools is needed for elf2dol
|
||||||
|
run: |
|
||||||
|
mkdir cache && cd cache
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitPPC-r42.2-1-linux_x86_64.pkg.tar.zst"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitppc-rules-1.1.1-1-any.pkg.tar.xz"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/libogc-2.4.0-1-any.pkg.tar.zst"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Extract downloaded files
|
||||||
|
# general-tools is needed for bin2s and gamecube-tools is needed for elf2dol
|
||||||
|
run: |
|
||||||
|
tar -xf cache/devkitPPC-r42.2-1-linux_x86_64.pkg.tar.zst --strip-components=1
|
||||||
|
tar -xf cache/devkitppc-rules-1.1.1-1-any.pkg.tar.xz --strip-components=1
|
||||||
|
tar -xf cache/libogc-2.4.0-1-any.pkg.tar.zst --strip-components=1
|
||||||
|
tar -xf cache/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
||||||
|
tar -xf cache/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz --strip-components=1
|
||||||
|
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
cp -r wii/apps apps
|
||||||
|
mkdir -p apps/wiiflow/
|
||||||
|
cp -r out/bins apps/wiiflow/bins
|
||||||
|
cp -r out/imgs apps/wiiflow/imgs
|
||||||
|
cp out/boot.dol apps/wiiflow/
|
||||||
|
mkdir -p wiiflow
|
||||||
|
cp -r wii/wiiflow/Languages wiiflow/languages
|
||||||
|
cp -r wii/wiiflow/themes_lite wiiflow/themes_lite
|
||||||
|
echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Upload binaries
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: wiiflow_lite_${{ env.sha }}
|
||||||
|
path: |
|
||||||
|
apps
|
||||||
|
wiiflow
|
10
Makefile
10
Makefile
@ -8,12 +8,6 @@ all:
|
|||||||
@mv -u $(CURDIR_TMP)/resources/app_booter/app_booter.bin \
|
@mv -u $(CURDIR_TMP)/resources/app_booter/app_booter.bin \
|
||||||
$(CURDIR_TMP)/out/bins/app_booter.bin
|
$(CURDIR_TMP)/out/bins/app_booter.bin
|
||||||
|
|
||||||
@echo Make WiiFlow Loader
|
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/extldr \
|
|
||||||
-f $(CURDIR_TMP)/resources/extldr/Makefile
|
|
||||||
@mv -u $(CURDIR_TMP)/resources/extldr/extldr.bin \
|
|
||||||
$(CURDIR_TMP)/out/bins/ext_loader.bin
|
|
||||||
|
|
||||||
@echo Make WiiFlow Booter
|
@echo Make WiiFlow Booter
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
||||||
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile
|
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile
|
||||||
@ -28,10 +22,6 @@ clean:
|
|||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/app_booter \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/app_booter \
|
||||||
-f $(CURDIR_TMP)/resources/app_booter/Makefile clean
|
-f $(CURDIR_TMP)/resources/app_booter/Makefile clean
|
||||||
|
|
||||||
@echo Cleanup WiiFlow Loader
|
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/extldr \
|
|
||||||
-f $(CURDIR_TMP)/resources/extldr/Makefile clean
|
|
||||||
|
|
||||||
@echo Cleanup WiiFlow Booter
|
@echo Cleanup WiiFlow Booter
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
||||||
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile clean
|
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile clean
|
||||||
|
@ -53,10 +53,17 @@ ios := 249
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
CFLAGS = -g -ggdb -O2 -Wall -Wno-multichar -Wextra $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE -DHAVE_CONFIG_H
|
FALSE_POSITIVES := -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread
|
||||||
CXXFLAGS = $(CFLAGS)
|
CFLAGS = -g -ggdb -O2 -Wall -Wno-multichar -Wno-address-of-packed-member -Wextra $(FALSE_POSITIVES) $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE -DHAVE_CONFIG_H
|
||||||
|
CXXFLAGS = $(CFLAGS) -std=c++20
|
||||||
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80620000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,wiiuse_register
|
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80620000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,wiiuse_register
|
||||||
|
|
||||||
|
ifeq ($(GITHUB_ACTIONS),true)
|
||||||
|
SHA = $(GITHUB_SHA)
|
||||||
|
CFLAGS += -DCOMMITHASH='"$(shell echo "$(SHA)" | cut -c 1-8)"'
|
||||||
|
CXXFLAGS += -DCOMMITHASH='"$(shell echo "$(SHA)" | cut -c 1-8)"'
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BUILDMODE),channel)
|
ifeq ($(BUILDMODE),channel)
|
||||||
CFLAGS += -DFULLCHANNEL
|
CFLAGS += -DFULLCHANNEL
|
||||||
CXXFLAGS += -DFULLCHANNEL
|
CXXFLAGS += -DFULLCHANNEL
|
||||||
@ -65,13 +72,14 @@ endif
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# any extra libraries we wish to link with the project
|
# any extra libraries we wish to link with the project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBS := -lwolfssl -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lwupc -lwiidrc -lbte -lasnd -logc -lfreetype -lvorbisidec -lmad -lsicksaxis
|
LIBS := -lwolfssl -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lbte -lwupc -lwiidrc -lsicksaxis -lasnd -lmad -lvorbisidec -logg -lfreetype -lbz2 -logc
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
# include and lib
|
# include and lib
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBDIRS := $(CURDIR)/portlibs
|
LIBDIRS := $(CURDIR)/portlibs
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# no real need to edit anything past this point unless you need to add additional
|
# no real need to edit anything past this point unless you need to add additional
|
||||||
# rules for different file extensions
|
# rules for different file extensions
|
||||||
@ -121,14 +129,13 @@ export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||||
-I$(CURDIR)/$(BUILD) -I$(LIBOGC_INC) \
|
-I$(CURDIR)/$(BUILD) -I$(LIBOGC_INC)
|
||||||
-I$(PORTLIBS)/include
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build a list of library paths
|
# build a list of library paths
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
||||||
-L$(CURDIR)/source/libwolfssl/ -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib
|
-L$(CURDIR)/source/libwolfssl -L$(LIBOGC_LIB)
|
||||||
|
|
||||||
export OUTPUT := $(CURDIR)/out/$(TARGET)
|
export OUTPUT := $(CURDIR)/out/$(TARGET)
|
||||||
.PHONY: $(BUILD) all clean
|
.PHONY: $(BUILD) all clean
|
||||||
@ -147,8 +154,9 @@ all:
|
|||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol \
|
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol \
|
||||||
$(CURDIR)/source/loader/alt_ios_gen.h $(CURDIR)/out/bins/ext_loader.bin \
|
$(CURDIR)/source/loader/alt_ios_gen.h \
|
||||||
$(CURDIR)/out/bins/ext_booter.bin $(CURDIR)/out/bins/app_booter.bin
|
$(CURDIR)/out/bins/ext_booter.bin \
|
||||||
|
$(CURDIR)/out/bins/app_booter.bin
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
else
|
else
|
||||||
|
13
README.md
13
README.md
@ -4,9 +4,6 @@ My mod of the Wii USB Loader WiiFlow
|
|||||||
## Description
|
## Description
|
||||||
WiiFlow Lite is a wii homebrew app used to display and launch your games and apps stored on a USB device or SD card plugged into a Wii or Wii U in Wii mode. The games and apps are displayed in cover flow style display.
|
WiiFlow Lite is a wii homebrew app used to display and launch your games and apps stored on a USB device or SD card plugged into a Wii or Wii U in Wii mode. The games and apps are displayed in cover flow style display.
|
||||||
|
|
||||||
## Compiling
|
|
||||||
WiiFlow Lite is currently compiled using DevkitPro PPC r30 and Libogc 1.8.19. I recommend getting Tortoise Git to checkout the WiiFlow Lite repository.
|
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
As of v5.2.0 WiiFlow Lite will simply be a replacement for WiiFlow. Put it in apps/wiiflow and use wiiflow forwarder's to launch it via the wii system menu. forwarders can be found on wiiflowiki4. for previous wiiflow lite users, sorry but you must uninstall your wiiflow lite forwarder and replace it with a wiiflow forwarder.
|
As of v5.2.0 WiiFlow Lite will simply be a replacement for WiiFlow. Put it in apps/wiiflow and use wiiflow forwarder's to launch it via the wii system menu. forwarders can be found on wiiflowiki4. for previous wiiflow lite users, sorry but you must uninstall your wiiflow lite forwarder and replace it with a wiiflow forwarder.
|
||||||
|
|
||||||
@ -16,9 +13,7 @@ Simply download the latest release and extract it to your apps/wiiflow folder on
|
|||||||
To start WiiFlow Lite you will need the Homebrew Channel or a WiiFlow forwarder channel installed on your Wii or vWii system menu.
|
To start WiiFlow Lite you will need the Homebrew Channel or a WiiFlow forwarder channel installed on your Wii or vWii system menu.
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
Currently only Carbonik Abz and Rhapsodii themes are compatible with WiiFlow Lite. Other older wiiflow themes need to be updated to work properly with WFL.
|
Currently only Rhapsodii and Rhapsodii Shima themes are compatible with WiiFlow Lite. Other older wiiflow themes need to be updated to work properly with WFL.
|
||||||
|
|
||||||
Carbonik Abz is included in the WiiFlow lite download.
|
|
||||||
|
|
||||||
Rhapsodii made by Hakaisha is a new theme designed for wiiflow lite. find it here - (https://gbatemp.net/threads/wiiflow-lite-theme-rhapsodii.511833/)
|
Rhapsodii made by Hakaisha is a new theme designed for wiiflow lite. find it here - (https://gbatemp.net/threads/wiiflow-lite-theme-rhapsodii.511833/)
|
||||||
|
|
||||||
@ -27,6 +22,10 @@ Other wiiflow lite themes can be found on the wiki linked below. but they need t
|
|||||||
## Useful Links
|
## Useful Links
|
||||||
[WiiFlow Lite GBATemp thread](https://gbatemp.net/threads/wiiflow-lite.422685/)
|
[WiiFlow Lite GBATemp thread](https://gbatemp.net/threads/wiiflow-lite.422685/)
|
||||||
|
|
||||||
[WiiFlow Wiki](https://sites.google.com/site/wiiflowiki4/)
|
[WiiFlow Wiki](https://web.archive.org/web/20220414124727/https://sites.google.com/site/wiiflowiki4/)
|
||||||
|
|
||||||
|
[Newer Wiki WIP](https://sites.google.com/view/wiiflow-wiki/welcome)
|
||||||
|
|
||||||
|
[Github Wiki](https://github.com/Fledge68/WiiFlow_Lite/wiki)
|
||||||
|
|
||||||
[Old Sourceforge Project Repository](https://sourceforge.net/projects/wiiflow-lite/)
|
[Old Sourceforge Project Repository](https://sourceforge.net/projects/wiiflow-lite/)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
BIN
data/stub.bin
BIN
data/stub.bin
Binary file not shown.
172
docs/Content.txt
172
docs/Content.txt
@ -1,172 +0,0 @@
|
|||||||
|
|
||||||
Files marked as "GPL" can be used without any constraint.
|
|
||||||
Files marked as GPL require that you respect one of the GPL : http://www.gnu.org/licenses/
|
|
||||||
All the original code in WiiFlow is in Public Domain (or WTFPL if GPL is not possible)
|
|
||||||
|
|
||||||
|
|
||||||
source/
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| boxmesh.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| boxmesh.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| cheat.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| cheat.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| config.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| config.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| cursor.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| cursor.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| dns.c | | GPL | PaulWagener | WiiEarth
|
|
||||||
| dns.h | | GPL | PaulWagener | WiiEarth
|
|
||||||
| FreeTypeGX.cpp | Modified | GPL | Armin Tamzarian | http://code.google.com/p/freetypegx/
|
|
||||||
| FreeTypeGX.hpp | Modified | GPL | Armin Tamzarian | http://code.google.com/p/freetypegx/
|
|
||||||
| gui.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| gui.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| http.c | Modified | GPL | PaulWagener | WiiEarth
|
|
||||||
| http.h | Modified | GPL | PaulWagener | WiiEarth
|
|
||||||
| main.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| mem2.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| mem2.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| mem2alloc.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| mem2alloc.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| Metaphrasis.cpp | Modified | GPL | Armin Tamzarian | http://code.google.com/p/metaphrasis/
|
|
||||||
| Metaphrasis.h | Modified | GPL | Armin Tamzarian | http://code.google.com/p/metaphrasis/
|
|
||||||
| objalloc.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| objalloc.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| oggplayer.c | Modified | GPL | Hermes | Modified version from LibWiiGui
|
|
||||||
| oggplayer.h | Modified | GPL | Hermes | Modified version from LibWiiGui
|
|
||||||
| pngu.c | Modified | ? | | http://frontier-dev.net
|
|
||||||
| pngu.h | Modified | ? | | http://frontier-dev.net
|
|
||||||
| smartalloc.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| smartptr.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| sound.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| sound.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| text.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| text.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| texture.cpp | | GPL | | WiiFlow 1.1 Optimization : "Real-Time DXT Compression" by J.M.P. van Waveren (c) 2006 Id Software, Inc.
|
|
||||||
| texture.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| vector.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| video.cpp | | GPL | | WiiFlow 1.1
|
|
||||||
| video.hpp | | GPL | | WiiFlow 1.1
|
|
||||||
| wstringEx.cpp | | GPL | | WiiFlow 1.1 R8
|
|
||||||
| wstringEx.hpp | | GPL | | WiiFlow 1.1 R8
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
source/data/
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| *.c | Generated | | | WiiFlow 1.1
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
source/loader/
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| alt_ios.c | Modified | GPL | Hermes | uLoader 3.0C
|
|
||||||
| alt_ios.h | Modified | GPL | Hermes | uLoader 3.0C
|
|
||||||
| apploader.c | Modified | GPL | Waninkoko, WiiPower | USB Loader 1.5, NeoGamma
|
|
||||||
| apploader.h | Modified | GPL | Waninkoko, WiiPower | USB Loader 1.5, NeoGamma
|
|
||||||
| dip_plugin_2.c | | GPL | Hermes | uLoader
|
|
||||||
| dip_plugin_2.h | | GPL | Hermes | uLoader
|
|
||||||
| dip_plugin_3.c | | GPL | Hermes | uLoader 2.6
|
|
||||||
| dip_plugin_3.h | | GPL | Hermes | uLoader 2.6
|
|
||||||
| dip_plugin_4.c | | GPL | Hermes | uLoader 3.1
|
|
||||||
| dip_plugin_4.h | | GPL | Hermes | uLoader 3.1
|
|
||||||
| disc.c | Modified | GPL | Kwiirk, Waninkoko, Hermes | YAL, USB Loader 1.5, uLoader 3.0C
|
|
||||||
| disc.h | Modified | GPL | Kwiirk, Waninkoko, Hermes | YAL, USB Loader 1.5, uLoader 3.0C
|
|
||||||
| ehcmodule_2.c | | GPL | Kwiirk?, Hermes | uLoader
|
|
||||||
| ehcmodule_2.h | | GPL | Kwiirk?, Hermes | uLoader
|
|
||||||
| ehcmodule_3.c | | GPL | Kwiirk?, Hermes | uLoader 2.6
|
|
||||||
| ehcmodule_3.h | | GPL | Kwiirk?, Hermes | uLoader 2.6
|
|
||||||
| ehcmodule_4.c | | GPL | Kwiirk?, Hermes | uLoader 3.1
|
|
||||||
| ehcmodule_4.h | | GPL | Kwiirk?, Hermes | uLoader 3.1
|
|
||||||
| fat.c | | GPL | | WiiFlow 1.1
|
|
||||||
| fat.h | | GPL | | WiiFlow 1.1
|
|
||||||
| fwrite_patch.h | | GPL | Nuke, Brkirch | http://code.google.com/p/usbgecko/
|
|
||||||
| geckomenu.h | | GPL | Nuke, Brkirch | http://code.google.com/p/usbgecko/
|
|
||||||
| kenobiwii.c | | GPL | Nuke, Brkirch | http://code.google.com/p/usbgecko/
|
|
||||||
| load_dol.c | | GPL | Shagkur? | ftpii, uLoader 3.0C
|
|
||||||
| load_dol.h | | GPL | Shagkur? | ftpii, uLoader 3.0C
|
|
||||||
| mload.c | | GPL | Hermes | uLoader 3.0C
|
|
||||||
| mload.h | | GPL | Hermes | uLoader 3.0C
|
|
||||||
| partition.c | | GPL | Waninkoko? | USB Loader 1.5
|
|
||||||
| partition.h | | GPL | Waninkoko? | USB Loader 1.5
|
|
||||||
| patchcode.c | Modified | GPL | Nuke, Brkirch | http://code.google.com/p/usbgecko/
|
|
||||||
| patchcode.h | Modified | GPL | Nuke, Brkirch | http://code.google.com/p/usbgecko/
|
|
||||||
| patchhook.S | | GPL | Nuke, Brkirch | http://code.google.com/p/usbgecko/
|
|
||||||
| ppc.h | | GPL | | http://code.google.com/p/usbgecko/
|
|
||||||
| sdhc.c | Modified | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| sdhc.h | Modified | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| sys.c | Modified | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| sys.h | Modified | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| usbstorage.c | Modified | GPL | Kwiirk, Hermes | YAL, USB Loader 1.5, uLoader 3.0C
|
|
||||||
| usbstorage.h | Modified | GPL | Kwiirk | YAL, USB Loader 1.5, uLoader 3.0C
|
|
||||||
| utils.c | | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| utils.h | | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| utils.c | | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| utils.h | | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| videopatch.c | Rewritten | GPL | WiiPower? | NeoGamma
|
|
||||||
| videopatch.h | Rewritten | GPL | WiiPower? | NeoGamma
|
|
||||||
| wbfs.c | Modified | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| wbfs.h | Modified | GPL | Waninkoko | USB Loader 1.5
|
|
||||||
| wdvd.c | Modified | GPL | Kwiirk, Hermes, Waninkoko | USB Loader 1.5
|
|
||||||
| wdvd.h | Modified | GPL | Kwiirk, Hermes, Waninkoko | USB Loader 1.5
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
source/libs/libwbfs/
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| libwbfs.c | Modified | GPL | Kwiirk | YAL?
|
|
||||||
| libwbfs.h | Modified | GPL | Kwiirk | YAL?
|
|
||||||
| libwbfs_os.h | Modified | GPL | Kwiirk | YAL?
|
|
||||||
| rijndael.c | | ? | Mike Scott |
|
|
||||||
| wiidisc.c | Modified | GPL | Kwiirk | YAL?
|
|
||||||
| wiidisc.h | Modified | GPL | Kwiirk | YAL?
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
source/menu/
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| *.cpp, *hpp | | GPL | | WiiFlow 1.1
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
include
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| ft2build.h | | ? | | FreeType
|
|
||||||
| png.h | | PNG | | http://www.libpng.org
|
|
||||||
| pngconf.h | Modified | PNG | | http://www.libpng.org
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
include/freetype
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| *.h | | ? | | FreeType
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
include/tremor
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| *.h | | ? | | Tremor
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
lib
|
|
||||||
|
|
||||||
| File | Comment | Lic | Original author(s) | Project where the original code is
|
|
||||||
|-----------------|------------|------|----------------------------|------------------------------------
|
|
||||||
| *.a | | | |
|
|
||||||
--------------------------------------------------------------------------------------------------------
|
|
@ -1,6 +0,0 @@
|
|||||||
WiiFlow 1.1 since R23 was compiled using devkitPPC r18 or r19.
|
|
||||||
Since R39 it was compiled using devkitPPC r21 and libogc 1.8.3.
|
|
||||||
Since around R374 Wiiflow was compiled using devkitPPC r23 and libogc 1.8.7
|
|
||||||
Since around R400 Wiiflow was compiled using devkitPPC r24 and libogc 1.8.8
|
|
||||||
All required portlibs are included in the source and dont need to be bothered with for compilation.
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
|
|
||||||
[GENERAL]
|
|
||||||
app_zip_size=2042058
|
|
||||||
changes=2.2 Alpha2 Now updates data folder with zip support.\nMany more changes. (see svn for full details.)
|
|
||||||
data_zip_size=456334
|
|
||||||
dol_size=3713248
|
|
||||||
num_versions=6
|
|
||||||
update_url=http://wiiflow.org/update
|
|
||||||
type=zip
|
|
||||||
version=228
|
|
||||||
latestversion=228
|
|
||||||
|
|
||||||
[VERSION1]
|
|
||||||
changes=Fix channels on base 57.\nAdd wiimote gestures and extenstions' stick sensitivity.\nOnly save ini's when they have changed.\nAdd ncard to channel launching.
|
|
||||||
version=181
|
|
||||||
type=dol
|
|
||||||
|
|
||||||
[VERSION2]
|
|
||||||
changes=Some more tweaks.
|
|
||||||
version=170
|
|
||||||
type=dol
|
|
||||||
|
|
||||||
[VERSION3]
|
|
||||||
changes=Full ntfs support with writing.\nAlt-Dol+ and WiiTDB.zip support with game informations.\nWinnertag and gamercard added.\nScreenshot feature added (gcpad z)\n Multiple bug fixes (more to come).
|
|
||||||
version=166
|
|
||||||
type=dol
|
|
||||||
|
|
||||||
[VERSION4]
|
|
||||||
changes=r92a release.
|
|
||||||
version=92
|
|
||||||
type=dol
|
|
||||||
|
|
||||||
#[GENERAL]
|
|
||||||
#app_zip_size= (if type != dol, {ios}.zip size in bytes, else 0)
|
|
||||||
#changes= (Self explanatory)
|
|
||||||
#data_zip_size= (if type != dol, data.zip size in bytes, else 0)
|
|
||||||
#dol_size= (if type == dol, dol size in bytes, else 0)
|
|
||||||
#num_versions= (installed version + number available in this txt file including latest version)
|
|
||||||
#type= (dol|zip set to dol if update is for dol only without zip. defaults to zip.)
|
|
||||||
#update_url= (http://wiiflow.org/update)
|
|
||||||
#version= (latest version revision number)
|
|
||||||
|
|
||||||
#[VERSION#]
|
|
||||||
#app_zip_size=
|
|
||||||
#changes=
|
|
||||||
#data_zip_size=
|
|
||||||
#dol_size=
|
|
||||||
#type=
|
|
||||||
#version= (revision number to DL)
|
|
@ -1 +1 @@
|
|||||||
copy the boot.dol and folders into apps/wiiflow_lite
|
copy the boot.dol and folders into apps/wiiflow
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 4.4 MiB |
BIN
out/imgs/dvdskin_clear.png
Normal file
BIN
out/imgs/dvdskin_clear.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
282
portlibs/include/bzlib.h
Normal file
282
portlibs/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,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
fat.h
|
fat.h
|
||||||
Simple functionality for startup, mounting and unmounting of FAT-based devices.
|
Simple functionality for startup, mounting and unmounting of FAT-based devices.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2012
|
Copyright (c) 2006 - 2012
|
||||||
Michael "Chishm" Chisholm
|
Michael "Chishm" Chisholm
|
||||||
Dave "WinterMute" Murphy
|
Dave "WinterMute" Murphy
|
||||||
@ -73,7 +73,7 @@ extern bool fatInitDefault (void);
|
|||||||
/*
|
/*
|
||||||
Mount the device pointed to by interface, and set up a devoptab entry for it as "name:".
|
Mount the device pointed to by interface, and set up a devoptab entry for it as "name:".
|
||||||
You can then access the filesystem using "name:/".
|
You can then access the filesystem using "name:/".
|
||||||
This will mount the active partition or the first valid partition on the disc,
|
This will mount the active partition or the first valid partition on the disc,
|
||||||
and will use a cache size optimized for the host system.
|
and will use a cache size optimized for the host system.
|
||||||
*/
|
*/
|
||||||
extern bool fatMountSimple (const char* name, const DISC_INTERFACE* interface);
|
extern bool fatMountSimple (const char* name, const DISC_INTERFACE* interface);
|
||||||
@ -111,7 +111,7 @@ extern void fatGetVolumeLabel (const char* name, char *label);
|
|||||||
Methods to modify DOS File Attributes
|
Methods to modify DOS File Attributes
|
||||||
*/
|
*/
|
||||||
int FAT_getAttr(const char *file);
|
int FAT_getAttr(const char *file);
|
||||||
int FAT_setAttr(const char *file, int attr );
|
int FAT_setAttr(const char *file, uint8_t attr );
|
||||||
|
|
||||||
#define LIBFAT_FEOS_MULTICWD
|
#define LIBFAT_FEOS_MULTICWD
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* UNIX-specific configuration file (specification only). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -28,15 +28,15 @@
|
|||||||
/* Note however that if some specific modifications are needed, we */
|
/* Note however that if some specific modifications are needed, we */
|
||||||
/* advise you to place a modified copy in your build directory. */
|
/* advise you to place a modified copy in your build directory. */
|
||||||
/* */
|
/* */
|
||||||
/* The build directory is usually `freetype/builds/<system>', and */
|
/* The build directory is usually `builds/<system>', and contains */
|
||||||
/* contains system-specific files that are always included first when */
|
/* system-specific files that are always included first when building */
|
||||||
/* building the library. */
|
/* the library. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTCONFIG_H__
|
#ifndef FTCONFIG_H_
|
||||||
#define __FTCONFIG_H__
|
#define FTCONFIG_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_CONFIG_OPTIONS_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 */
|
/* These macros can be toggled to suit a specific system. The current */
|
||||||
/* ones are defaults used to compile FreeType in an ANSI C environment */
|
/* ones are defaults used to compile FreeType in an ANSI C environment */
|
||||||
/* (16bit compilers are also supported). Copy this file to your own */
|
/* (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. */
|
/* is copied from default include/freetype/config/ftconfig.h. */
|
||||||
/* If any improvement is required for this file, it should be */
|
/* If any improvement is required for this file, it should be */
|
||||||
/* applied to the original header file for the builders that */
|
/* 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. */
|
/* The size of an `int' type. */
|
||||||
#if FT_UINT_MAX == 0xFFFFUL
|
#if FT_UINT_MAX == 0xFFFFUL
|
||||||
@ -243,6 +243,18 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
typedef signed XXX FT_Int64;
|
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
|
#endif
|
||||||
@ -276,19 +288,46 @@ FT_BEGIN_HEADER
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* determine whether we have a 64-bit int type for platforms without */
|
/* determine whether we have a 64-bit int type */
|
||||||
/* Autoconf */
|
/* (mostly for environments without `autoconf') */
|
||||||
#if FT_SIZEOF_LONG == 8
|
#if FT_SIZEOF_LONG == 8
|
||||||
|
|
||||||
/* FT_LONG64 must be defined if a 64-bit type is available */
|
/* FT_LONG64 must be defined if a 64-bit type is available */
|
||||||
#define FT_LONG64
|
#define FT_LONG64
|
||||||
#define FT_INT64 long
|
#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++) */
|
#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
|
||||||
|
|
||||||
/* this compiler provides the __int64 type */
|
/* this compiler provides the __int64 type */
|
||||||
#define FT_LONG64
|
#define FT_LONG64
|
||||||
#define FT_INT64 __int64
|
#define FT_INT64 __int64
|
||||||
|
#define FT_UINT64 unsigned __int64
|
||||||
|
|
||||||
#elif defined( __BORLANDC__ ) /* Borland C++ */
|
#elif defined( __BORLANDC__ ) /* Borland C++ */
|
||||||
|
|
||||||
@ -297,7 +336,8 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
/* this compiler provides the __int64 type */
|
/* this compiler provides the __int64 type */
|
||||||
#define FT_LONG64
|
#define FT_LONG64
|
||||||
#define FT_INT64 __int64
|
#define FT_INT64 __int64
|
||||||
|
#define FT_UINT64 unsigned __int64
|
||||||
|
|
||||||
#elif defined( __WATCOMC__ ) /* Watcom C++ */
|
#elif defined( __WATCOMC__ ) /* Watcom C++ */
|
||||||
|
|
||||||
@ -306,42 +346,40 @@ FT_BEGIN_HEADER
|
|||||||
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
|
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
|
||||||
|
|
||||||
#define FT_LONG64
|
#define FT_LONG64
|
||||||
#define FT_INT64 long long int
|
#define FT_INT64 long long int
|
||||||
|
#define FT_UINT64 unsigned long long int
|
||||||
|
|
||||||
#elif defined( __GNUC__ )
|
#elif defined( __GNUC__ )
|
||||||
|
|
||||||
/* GCC provides the `long long' type */
|
/* GCC provides the `long long' type */
|
||||||
#define FT_LONG64
|
#define FT_LONG64
|
||||||
#define FT_INT64 long long int
|
#define FT_INT64 long long int
|
||||||
|
#define FT_UINT64 unsigned long long int
|
||||||
|
|
||||||
|
#endif /* __STDC_VERSION__ >= 199901L */
|
||||||
|
|
||||||
#endif /* FT_SIZEOF_LONG == 8 */
|
#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 */
|
/* miscellaneous */
|
||||||
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
#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 {
|
#define FT_BEGIN_STMNT do {
|
||||||
@ -349,148 +387,25 @@ FT_BEGIN_HEADER
|
|||||||
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
|
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
|
||||||
|
|
||||||
|
|
||||||
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
|
/* typeof condition taken from gnulib's `intprops.h' header file */
|
||||||
/* Provide assembler fragments for performance-critical functions. */
|
#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \
|
||||||
/* These must be defined `static __inline__' with GCC. */
|
( defined( __IBMC__ ) && __IBMC__ >= 1210 && \
|
||||||
|
defined( __IBM__TYPEOF__ ) ) || \
|
||||||
#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
|
( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
|
||||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
|
#define FT_TYPEOF( type ) ( __typeof__ ( type ) )
|
||||||
|
#else
|
||||||
/* documentation is in freetype.h */
|
#define FT_TYPEOF( type ) /* empty */
|
||||||
|
|
||||||
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
|
|
||||||
#endif
|
#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
|
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
|
||||||
|
|
||||||
#define FT_LOCAL( x ) static x
|
#define FT_LOCAL( x ) static x
|
||||||
@ -508,7 +423,16 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
|
#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
|
#ifndef FT_BASE
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -531,14 +455,63 @@ FT_BEGIN_HEADER
|
|||||||
#endif /* !FT_BASE_DEF */
|
#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
|
#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
|
#define FT_EXPORT( x ) extern "C" x
|
||||||
#else
|
#else
|
||||||
#define FT_EXPORT( x ) extern x
|
#define FT_EXPORT( x ) extern x
|
||||||
#endif
|
#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 */
|
#endif /* !FT_EXPORT */
|
||||||
|
|
||||||
|
|
||||||
@ -574,7 +547,13 @@ FT_BEGIN_HEADER
|
|||||||
/* functions which are accessed by (global) function pointers. */
|
/* 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 */
|
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
|
||||||
/* contains pointers to callback functions. */
|
/* contains pointers to callback functions. */
|
||||||
@ -594,6 +573,16 @@ FT_BEGIN_HEADER
|
|||||||
#endif
|
#endif
|
||||||
#endif /* FT_CALLBACK_DEF */
|
#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
|
#ifndef FT_CALLBACK_TABLE
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define FT_CALLBACK_TABLE extern "C"
|
#define FT_CALLBACK_TABLE extern "C"
|
||||||
@ -608,7 +597,7 @@ FT_BEGIN_HEADER
|
|||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FTCONFIG_H__ */
|
#endif /* FTCONFIG_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Build macros of the FreeType 2 library. */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -15,8 +15,8 @@
|
|||||||
/* */
|
/* */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
#ifndef __FT_HEADER_H__
|
#ifndef FTHEADER_H_
|
||||||
#define __FT_HEADER_H__
|
#define FTHEADER_H_
|
||||||
|
|
||||||
|
|
||||||
/*@***********************************************************************/
|
/*@***********************************************************************/
|
||||||
@ -315,6 +315,19 @@
|
|||||||
#define FT_RENDER_H <freetype/ftrender.h>
|
#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:
|
* @macro:
|
||||||
@ -324,8 +337,10 @@
|
|||||||
* A macro used in #include statements to name the file containing
|
* A macro used in #include statements to name the file containing
|
||||||
* structures and macros related to the auto-hinting module.
|
* 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
|
* A macro used in #include statements to name the file containing
|
||||||
* structures and macros related to the CFF driver module.
|
* 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>
|
#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:
|
* @macro:
|
||||||
@ -697,14 +687,16 @@
|
|||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
* @macro:
|
* @macro:
|
||||||
* FT_XFREE86_H
|
* FT_FONT_FORMATS_H
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A macro used in #include statements to name the file containing the
|
* A macro used in #include statements to name the file containing the
|
||||||
* FreeType~2 API which provides functions specific to the XFree86 and
|
* FreeType~2 API which provides functions specific to font formats.
|
||||||
* X.Org X11 servers.
|
|
||||||
*/
|
*/
|
||||||
#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>
|
#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:
|
* @macro:
|
||||||
@ -751,7 +731,7 @@
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A macro used in #include statements to name the file containing the
|
* A macro used in #include statements to name the file containing the
|
||||||
* FreeType~2 API which performs color filtering for subpixel rendering.
|
* FreeType~2 API which performs incremental glyph loading.
|
||||||
*/
|
*/
|
||||||
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
|
#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_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 */
|
/* 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 */
|
/* default to FT_CACHE_H at the moment just in case, but we know of */
|
||||||
/* no rogue client that uses them. */
|
/* no rogue client that uses them. */
|
||||||
/* */
|
/* */
|
||||||
#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
|
#define FT_CACHE_MANAGER_H FT_CACHE_H
|
||||||
#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
|
#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H
|
||||||
#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
|
#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H
|
||||||
#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
|
#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H
|
||||||
#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
|
#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H
|
||||||
#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
|
#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H
|
||||||
#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
|
#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H
|
||||||
|
|
||||||
|
|
||||||
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
|
|
||||||
|
|
||||||
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Include internal headers definitions from <freetype/internal/...>
|
* Include internal headers definitions from <internal/...>
|
||||||
* only when building the library.
|
* only when building the library.
|
||||||
*/
|
*/
|
||||||
#ifdef FT2_BUILD_LIBRARY
|
#ifdef FT2_BUILD_LIBRARY
|
||||||
@ -813,7 +798,7 @@
|
|||||||
#endif /* FT2_BUILD_LIBRARY */
|
#endif /* FT2_BUILD_LIBRARY */
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FT2_BUILD_H__ */
|
#endif /* FTHEADER_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* User-selectable configuration macros (specification only). */
|
/* User-selectable configuration macros (specification only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2013 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTOPTION_H__
|
#ifndef FTOPTION_H_
|
||||||
#define __FTOPTION_H__
|
#define FTOPTION_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -61,7 +61,7 @@ FT_BEGIN_HEADER
|
|||||||
/* that are statically linked to the library at compile time. By */
|
/* that are statically linked to the library at compile time. By */
|
||||||
/* default, this file is <freetype/config/ftmodule.h>. */
|
/* default, this file is <freetype/config/ftmodule.h>. */
|
||||||
/* */
|
/* */
|
||||||
/* We highly recommend using the third method whenever possible. */
|
/* We highly recommend using the third method whenever possible. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
@ -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 */
|
/* Uncomment the line below if you want to activate LCD rendering */
|
||||||
/* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
|
/* 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 */
|
/* Note that this feature is covered by several Microsoft patents */
|
||||||
/* and should not be activated in any default build of the library. */
|
/* and should not be activated in any default build of the library. */
|
||||||
/* */
|
/* When this macro is not defined, FreeType offers alternative LCD */
|
||||||
/* This macro has no impact on the FreeType API, only on its */
|
/* rendering technology that produces excellent output without LCD */
|
||||||
/* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
|
/* filtering. */
|
||||||
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
/* #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 */
|
/* Do not #undef this macro here since the build system might define */
|
||||||
/* it for certain configurations only. */
|
/* 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 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 */
|
/* FreeType now handles loading color bitmap glyphs in the PNG format. */
|
||||||
/* special keyword in front OR after the return type of function */
|
/* This requires help from the external libpng library. Uncompressed */
|
||||||
/* declarations. */
|
/* 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 */
|
/* Define this macro if you want to enable this `feature'. */
|
||||||
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
|
|
||||||
/* */
|
/* */
|
||||||
/* 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 ) */
|
/* HarfBuzz support. */
|
||||||
/* FT_Init_FreeType( FT_Library* alibrary ); */
|
|
||||||
/* */
|
/* */
|
||||||
|
/* 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 ) */
|
/* #undef FT_CONFIG_OPTION_USE_HARFBUZZ */
|
||||||
/* 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 */
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -270,7 +301,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* - The TrueType driver will provide its own set of glyph names, */
|
/* - The TrueType driver will provide its own set of glyph names, */
|
||||||
/* if you build it to support postscript names in the TrueType */
|
/* 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 */
|
/* - The Type 1 driver will not be able to synthesize a Unicode */
|
||||||
/* charmap out of the glyphs found in the fonts. */
|
/* 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 */
|
/* The size in bytes of the render pool used by the scan-line converter */
|
||||||
/* to do all of its work. */
|
/* 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
|
#define FT_RENDER_POOL_SIZE 16384L
|
||||||
|
|
||||||
|
|
||||||
@ -408,6 +435,8 @@ FT_BEGIN_HEADER
|
|||||||
/* af_glyph_hints_dump_points */
|
/* af_glyph_hints_dump_points */
|
||||||
/* af_glyph_hints_dump_segments */
|
/* af_glyph_hints_dump_segments */
|
||||||
/* af_glyph_hints_dump_edges */
|
/* 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: */
|
/* As an argument, they use another global variable: */
|
||||||
/* */
|
/* */
|
||||||
@ -467,7 +496,21 @@ FT_BEGIN_HEADER
|
|||||||
/* code will be used. */
|
/* code will be used. */
|
||||||
/* */
|
/* */
|
||||||
/* Setting this macro is needed for systems that prohibit address */
|
/* 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 */
|
/* #define FT_CONFIG_OPTION_PIC */
|
||||||
|
|
||||||
@ -514,7 +557,7 @@ FT_BEGIN_HEADER
|
|||||||
/* does not contain any glyph name though. */
|
/* does not contain any glyph name though. */
|
||||||
/* */
|
/* */
|
||||||
/* Accessing SFNT names is done through the functions declared in */
|
/* Accessing SFNT names is done through the functions declared in */
|
||||||
/* `freetype/ftsnames.h'. */
|
/* `ftsnames.h'. */
|
||||||
/* */
|
/* */
|
||||||
#define TT_CONFIG_OPTION_SFNT_NAMES
|
#define TT_CONFIG_OPTION_SFNT_NAMES
|
||||||
|
|
||||||
@ -555,92 +598,68 @@ FT_BEGIN_HEADER
|
|||||||
/* Do not #undef this macro here, since the build system might */
|
/* Do not #undef this macro here, since the build system might */
|
||||||
/* define it for certain configurations only. */
|
/* 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 */
|
/* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
|
||||||
/* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */
|
/* subpixel hinting support into the TrueType driver. This modifies the */
|
||||||
/* replaces the native TrueType hinting mechanism when anything but */
|
/* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is */
|
||||||
/* FT_RENDER_MODE_MONO is requested. */
|
/* requested. */
|
||||||
/* */
|
/* */
|
||||||
/* Enabling this causes the TrueType driver to ignore instructions under */
|
/* In particular, it modifies the bytecode interpreter to interpret (or */
|
||||||
/* certain conditions. This is done in accordance with the guide here, */
|
/* not) instructions in a certain way so that all TrueType fonts look */
|
||||||
/* with some minor differences: */
|
/* 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 */
|
/* Value 1: */
|
||||||
/* TrueType glyphs with native TT hinting. */
|
/* 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. */
|
||||||
/* */
|
/* */
|
||||||
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
|
/* The corresponding interpreter version is v38. */
|
||||||
/* defined. */
|
|
||||||
/* */
|
/* */
|
||||||
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
|
/* 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. */
|
||||||
/* */
|
/* */
|
||||||
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
|
/* The corresponding interpreter version is v40. */
|
||||||
/* 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* */
|
/* Value 3: */
|
||||||
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
|
/* Compile both, making both v38 and v40 available (the latter is the */
|
||||||
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
|
/* default). */
|
||||||
/* 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 */
|
/* By undefining these, you get rendering behavior like on Windows */
|
||||||
/* for Asian scripts) that require bytecode interpretation to properly */
|
/* without ClearType, i.e., Windows XP without ClearType enabled and */
|
||||||
/* load glyphs. For all other fonts, this produces unpleasant results, */
|
/* Win9x (interpreter version v35). Or not, depending on how much */
|
||||||
/* thus the unpatented interpreter is never used to load glyphs from */
|
/* hinting blood and testing tears the font designer put into a given */
|
||||||
/* TrueType fonts unless one of the following two options is used. */
|
/* 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'). */
|
||||||
/* */
|
/* */
|
||||||
/* - The unpatented interpreter is explicitly activated by the user */
|
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
|
||||||
/* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
|
/* defined. */
|
||||||
/* when opening the FT_Face. */
|
|
||||||
/* */
|
/* */
|
||||||
/* - FreeType detects that the FT_Face corresponds to one of the */
|
/* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
|
||||||
/* `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. */
|
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
|
||||||
/* */
|
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
|
||||||
/* { */
|
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
|
||||||
/* 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
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -656,8 +675,8 @@ FT_BEGIN_HEADER
|
|||||||
/* composite flags array which can be used to disambiguate, but old */
|
/* composite flags array which can be used to disambiguate, but old */
|
||||||
/* fonts will not have them. */
|
/* fonts will not have them. */
|
||||||
/* */
|
/* */
|
||||||
/* http://www.microsoft.com/typography/otspec/glyf.htm */
|
/* https://www.microsoft.com/typography/otspec/glyf.htm */
|
||||||
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
|
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
|
||||||
/* */
|
/* */
|
||||||
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
|
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
|
||||||
|
|
||||||
@ -680,6 +699,24 @@ FT_BEGIN_HEADER
|
|||||||
#define TT_CONFIG_OPTION_BDF
|
#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
|
#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
|
#define AF_CONFIG_OPTION_INDIC
|
||||||
|
|
||||||
@ -765,63 +884,94 @@ FT_BEGIN_HEADER
|
|||||||
/* grid. To find out the optimal scaling and shifting value, various */
|
/* grid. To find out the optimal scaling and shifting value, various */
|
||||||
/* parameter combinations are tried and scored. */
|
/* parameter combinations are tried and scored. */
|
||||||
/* */
|
/* */
|
||||||
/* This experimental option is only active if the render mode is */
|
/* This experimental option is active only if the rendering mode is */
|
||||||
/* FT_RENDER_MODE_LIGHT. */
|
/* 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
|
* This macro is obsolete. Support has been removed in FreeType
|
||||||
* structures that was used prior to FreeType 2.2. This also compiles in
|
* version 2.5.
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
|
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
|
* This macro is defined if native TrueType hinting is requested by the
|
||||||
* we restrict the number of charmaps in a font. The current API of
|
* definitions above.
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
|
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||||
|
#define TT_USE_BYTECODE_INTERPRETER
|
||||||
|
|
||||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||||
#define FT_MAX_CHARMAP_CACHEABLE 15
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This macro is defined if either unpatented or native TrueType
|
* Check CFF darkening parameters. The checks are the same as in function
|
||||||
* hinting is requested by the definitions above.
|
* `cff_property_set' in file `cffdrivr.c'.
|
||||||
*/
|
*/
|
||||||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
|
||||||
#define TT_USE_BYTECODE_INTERPRETER
|
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
|
||||||
#undef TT_CONFIG_OPTION_UNPATENTED_HINTING
|
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
|
||||||
#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
|
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
|
||||||
#define TT_USE_BYTECODE_INTERPRETER
|
\
|
||||||
|
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
|
#endif
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FTOPTION_H__ */
|
#endif /* FTOPTION_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/* ANSI-specific library and header configuration file (specification */
|
/* ANSI-specific library and header configuration file (specification */
|
||||||
/* only). */
|
/* only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002-2007, 2009, 2011-2012 by */
|
/* Copyright 2002-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -23,14 +23,13 @@
|
|||||||
/* FreeType normally requires. It also defines macros to rename the */
|
/* FreeType normally requires. It also defines macros to rename the */
|
||||||
/* standard functions within the FreeType source code. */
|
/* standard functions within the FreeType source code. */
|
||||||
/* */
|
/* */
|
||||||
/* Load a file which defines __FTSTDLIB_H__ before this one to override */
|
/* Load a file which defines FTSTDLIB_H_ before this one to override it. */
|
||||||
/* it. */
|
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTSTDLIB_H__
|
#ifndef FTSTDLIB_H_
|
||||||
#define __FTSTDLIB_H__
|
#define FTSTDLIB_H_
|
||||||
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -64,6 +63,8 @@
|
|||||||
#define FT_INT_MAX INT_MAX
|
#define FT_INT_MAX INT_MAX
|
||||||
#define FT_INT_MIN INT_MIN
|
#define FT_INT_MIN INT_MIN
|
||||||
#define FT_UINT_MAX UINT_MAX
|
#define FT_UINT_MAX UINT_MAX
|
||||||
|
#define FT_LONG_MIN LONG_MIN
|
||||||
|
#define FT_LONG_MAX LONG_MAX
|
||||||
#define FT_ULONG_MAX ULONG_MAX
|
#define FT_ULONG_MAX ULONG_MAX
|
||||||
|
|
||||||
|
|
||||||
@ -141,8 +142,8 @@
|
|||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#define ft_atol atol
|
#define ft_strtol strtol
|
||||||
#define ft_labs labs
|
#define ft_getenv getenv
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
@ -168,7 +169,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FTSTDLIB_H__ */
|
#endif /* FTSTDLIB_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Quick computation of advance widths (specification only). */
|
/* Quick computation of advance widths (specification only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2008 by */
|
/* Copyright 2008-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTADVANC_H__
|
#ifndef FTADVANC_H_
|
||||||
#define __FTADVANC_H__
|
#define FTADVANC_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -48,6 +48,11 @@ FT_BEGIN_HEADER
|
|||||||
* @description:
|
* @description:
|
||||||
* This section contains functions to quickly extract advance values
|
* This section contains functions to quickly extract advance values
|
||||||
* without handling glyph outlines, if possible.
|
* 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 */
|
/* corresponding hinting mode or font driver doesn't allow for very */
|
||||||
/* quick advance computation. */
|
/* 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 */
|
/* or light-hinted can have their advance width computed very */
|
||||||
/* quickly. */
|
/* 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 */
|
/* and hinting of the glyph outline, are extremely slow by */
|
||||||
/* comparison. */
|
/* comparison. */
|
||||||
/* */
|
/* */
|
||||||
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL
|
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -82,8 +87,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Retrieve the advance value of a given glyph outline in an */
|
/* Retrieve the advance value of a given glyph outline in an */
|
||||||
/* @FT_Face. By default, the unhinted advance is returned in font */
|
/* @FT_Face. */
|
||||||
/* units. */
|
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: The source @FT_Face handle. */
|
/* face :: The source @FT_Face handle. */
|
||||||
@ -94,8 +98,9 @@ FT_BEGIN_HEADER
|
|||||||
/* calling @FT_Load_Glyph, used to determine what kind */
|
/* calling @FT_Load_Glyph, used to determine what kind */
|
||||||
/* of advances you need. */
|
/* of advances you need. */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* padvance :: The advance value, in either font units or 16.16 */
|
/* padvance :: The advance value. If scaling is performed (based on */
|
||||||
/* format. */
|
/* 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 */
|
/* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */
|
||||||
/* vertical advance corresponding to a vertical layout. */
|
/* vertical advance corresponding to a vertical layout. */
|
||||||
@ -127,8 +132,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Retrieve the advance values of several glyph outlines in an */
|
/* Retrieve the advance values of several glyph outlines in an */
|
||||||
/* @FT_Face. By default, the unhinted advances are returned in font */
|
/* @FT_Face. */
|
||||||
/* units. */
|
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: The source @FT_Face handle. */
|
/* face :: The source @FT_Face handle. */
|
||||||
@ -141,8 +145,12 @@ FT_BEGIN_HEADER
|
|||||||
/* calling @FT_Load_Glyph. */
|
/* calling @FT_Load_Glyph. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* padvance :: The advances, in either font units or 16.16 format. */
|
/* padvance :: The advance values. This array, to be provided by the */
|
||||||
/* This array must contain at least `count' elements. */
|
/* 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 */
|
/* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */
|
||||||
/* vertical advances corresponding to a vertical layout. */
|
/* vertical advances corresponding to a vertical layout. */
|
||||||
@ -168,12 +176,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_Int32 load_flags,
|
FT_Int32 load_flags,
|
||||||
FT_Fixed *padvances );
|
FT_Fixed *padvances );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTADVANC_H__ */
|
#endif /* FTADVANC_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -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 */
|
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType exact bbox computation (specification). */
|
/* FreeType exact bbox computation (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2003, 2007, 2011 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -27,8 +27,8 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTBBOX_H__
|
#ifndef FTBBOX_H_
|
||||||
#define __FTBBOX_H__
|
#define FTBBOX_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -60,8 +60,8 @@ FT_BEGIN_HEADER
|
|||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Compute the exact bounding box of an outline. This is slower */
|
/* Compute the exact bounding box of an outline. This is slower */
|
||||||
/* than computing the control box. However, it uses an advanced */
|
/* than computing the control box. However, it uses an advanced */
|
||||||
/* algorithm which returns _very_ quickly when the two boxes */
|
/* algorithm that returns _very_ quickly when the two boxes */
|
||||||
/* coincide. Otherwise, the outline Bézier arcs are traversed to */
|
/* coincide. Otherwise, the outline Bezier arcs are traversed to */
|
||||||
/* extract their extrema. */
|
/* extract their extrema. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
@ -78,20 +78,19 @@ FT_BEGIN_HEADER
|
|||||||
/* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
|
/* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
|
||||||
/* reasonable values for the BBox it is necessary to load the glyph */
|
/* reasonable values for the BBox it is necessary to load the glyph */
|
||||||
/* at a large ppem value (so that the hinting instructions can */
|
/* 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. */
|
/* which can be eventually converted back to font units. */
|
||||||
/* */
|
/* */
|
||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Outline_Get_BBox( FT_Outline* outline,
|
FT_Outline_Get_BBox( FT_Outline* outline,
|
||||||
FT_BBox *abbox );
|
FT_BBox *abbox );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTBBOX_H__ */
|
#endif /* FTBBOX_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType API for accessing BDF-specific strings (specification). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTBDF_H__
|
#ifndef FTBDF_H_
|
||||||
#define __FTBDF_H__
|
#define FTBDF_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -53,7 +53,7 @@ FT_BEGIN_HEADER
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @enum:
|
* @enum:
|
||||||
* FT_PropertyType
|
* BDF_PropertyType
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A list of BDF property types.
|
* A list of BDF property types.
|
||||||
@ -106,7 +106,8 @@ FT_BEGIN_HEADER
|
|||||||
* The property type.
|
* The property type.
|
||||||
*
|
*
|
||||||
* u.atom ::
|
* 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 ::
|
* u.integer ::
|
||||||
* A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
|
* A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
|
||||||
@ -199,11 +200,11 @@ FT_BEGIN_HEADER
|
|||||||
const char* prop_name,
|
const char* prop_name,
|
||||||
BDF_PropertyRec *aproperty );
|
BDF_PropertyRec *aproperty );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTBDF_H__ */
|
#endif /* FTBDF_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType utility functions for bitmaps (specification). */
|
/* FreeType utility functions for bitmaps (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2005, 2006, 2008 by */
|
/* Copyright 2004-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTBITMAP_H__
|
#ifndef FTBITMAP_H_
|
||||||
#define __FTBITMAP_H__
|
#define FTBITMAP_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -45,7 +45,9 @@ FT_BEGIN_HEADER
|
|||||||
/* Handling FT_Bitmap objects. */
|
/* Handling FT_Bitmap objects. */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <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> */
|
/* <Function> */
|
||||||
/* FT_Bitmap_New */
|
/* FT_Bitmap_Init */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Initialize a pointer to an @FT_Bitmap structure. */
|
/* Initialize a pointer to an @FT_Bitmap structure. */
|
||||||
@ -61,6 +63,14 @@ FT_BEGIN_HEADER
|
|||||||
/* <InOut> */
|
/* <InOut> */
|
||||||
/* abitmap :: A pointer to the bitmap structure. */
|
/* 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_EXPORT( void )
|
||||||
FT_Bitmap_New( FT_Bitmap *abitmap );
|
FT_Bitmap_New( FT_Bitmap *abitmap );
|
||||||
|
|
||||||
@ -87,7 +97,7 @@ FT_BEGIN_HEADER
|
|||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Bitmap_Copy( FT_Library library,
|
FT_Bitmap_Copy( FT_Library library,
|
||||||
const FT_Bitmap *source,
|
const FT_Bitmap *source,
|
||||||
FT_Bitmap *target);
|
FT_Bitmap *target );
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -122,6 +132,9 @@ FT_BEGIN_HEADER
|
|||||||
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
|
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
|
||||||
/* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Bitmap_Embolden( FT_Library library,
|
FT_Bitmap_Embolden( FT_Library library,
|
||||||
FT_Bitmap* bitmap,
|
FT_Bitmap* bitmap,
|
||||||
@ -135,9 +148,9 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Bitmap_Convert */
|
/* FT_Bitmap_Convert */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */
|
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */
|
||||||
/* bitmap object with depth 8bpp, making the number of used bytes per */
|
/* to a bitmap object with depth 8bpp, making the number of used */
|
||||||
/* line (a.k.a. the `pitch') a multiple of `alignment'. */
|
/* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* library :: A handle to a library object. */
|
/* library :: A handle to a library object. */
|
||||||
@ -197,7 +210,7 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Bitmap_Done */
|
/* FT_Bitmap_Done */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Destroy a bitmap object created with @FT_Bitmap_New. */
|
/* Destroy a bitmap object initialized with @FT_Bitmap_Init. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* library :: A handle to a library object. */
|
/* library :: A handle to a library object. */
|
||||||
@ -221,7 +234,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTBITMAP_H__ */
|
#endif /* FTBITMAP_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Bzip2-compressed stream support. */
|
/* Bzip2-compressed stream support. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2010 by */
|
/* Copyright 2010-2018 by */
|
||||||
/* Joel Klinghed. */
|
/* Joel Klinghed. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTBZIP2_H__
|
#ifndef FTBZIP2_H_
|
||||||
#define __FTBZIP2_H__
|
#define FTBZIP2_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -91,12 +91,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_Stream_OpenBzip2( FT_Stream stream,
|
FT_Stream_OpenBzip2( FT_Stream stream,
|
||||||
FT_Stream source );
|
FT_Stream source );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTBZIP2_H__ */
|
#endif /* FTBZIP2_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType Cache subsystem (specification). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTCACHE_H__
|
#ifndef FTCACHE_H_
|
||||||
#define __FTCACHE_H__
|
#define FTCACHE_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -156,7 +156,7 @@ FT_BEGIN_HEADER
|
|||||||
* @note:
|
* @note:
|
||||||
* Never use NULL as a valid @FTC_FaceID.
|
* 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
|
* when needed, the @FTC_Face_Requester to translate them into new
|
||||||
* @FT_Face objects.
|
* @FT_Face objects.
|
||||||
*
|
*
|
||||||
@ -209,22 +209,11 @@ FT_BEGIN_HEADER
|
|||||||
typedef FT_Error
|
typedef FT_Error
|
||||||
(*FTC_Face_Requester)( FTC_FaceID face_id,
|
(*FTC_Face_Requester)( FTC_FaceID face_id,
|
||||||
FT_Library library,
|
FT_Library library,
|
||||||
FT_Pointer request_data,
|
FT_Pointer req_data,
|
||||||
FT_Face* aface );
|
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. */
|
/* should never try to discard it yourself. */
|
||||||
/* */
|
/* */
|
||||||
/* The @FT_Face object doesn't necessarily have a current size object */
|
/* 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. */
|
/* use @FTC_Manager_LookupSize instead. */
|
||||||
/* */
|
/* */
|
||||||
/* Never change the face's transformation matrix (i.e., never call */
|
/* Never change the face's transformation matrix (i.e., never call */
|
||||||
@ -551,13 +540,6 @@ FT_BEGIN_HEADER
|
|||||||
FTC_FaceID face_id );
|
FTC_FaceID face_id );
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* <Section> */
|
|
||||||
/* cache_subsystem */
|
|
||||||
/* */
|
|
||||||
/*************************************************************************/
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
* @type:
|
* @type:
|
||||||
@ -634,14 +616,6 @@ FT_BEGIN_HEADER
|
|||||||
FT_UInt32 char_code );
|
FT_UInt32 char_code );
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* <Section> */
|
|
||||||
/* cache_subsystem */
|
|
||||||
/* */
|
|
||||||
/*************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -678,8 +652,8 @@ FT_BEGIN_HEADER
|
|||||||
typedef struct FTC_ImageTypeRec_
|
typedef struct FTC_ImageTypeRec_
|
||||||
{
|
{
|
||||||
FTC_FaceID face_id;
|
FTC_FaceID face_id;
|
||||||
FT_Int width;
|
FT_UInt width;
|
||||||
FT_Int height;
|
FT_UInt height;
|
||||||
FT_Int32 flags;
|
FT_Int32 flags;
|
||||||
|
|
||||||
} FTC_ImageTypeRec;
|
} FTC_ImageTypeRec;
|
||||||
@ -705,17 +679,6 @@ FT_BEGIN_HEADER
|
|||||||
(d1)->width == (d2)->width && \
|
(d1)->width == (d2)->width && \
|
||||||
(d1)->flags == (d2)->flags )
|
(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 */
|
/* FTC_ImageCache */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <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 */
|
/* hold many distinct glyph images while not exceeding a certain */
|
||||||
/* memory threshold. */
|
/* memory threshold. */
|
||||||
/* */
|
/* */
|
||||||
@ -771,7 +734,7 @@ FT_BEGIN_HEADER
|
|||||||
/* aglyph :: The corresponding @FT_Glyph object. 0~in case of */
|
/* aglyph :: The corresponding @FT_Glyph object. 0~in case of */
|
||||||
/* failure. */
|
/* 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 */
|
/* node after incrementing its reference count (see note */
|
||||||
/* below). */
|
/* below). */
|
||||||
/* */
|
/* */
|
||||||
@ -824,7 +787,7 @@ FT_BEGIN_HEADER
|
|||||||
/* aglyph :: The corresponding @FT_Glyph object. 0~in case of */
|
/* aglyph :: The corresponding @FT_Glyph object. 0~in case of */
|
||||||
/* failure. */
|
/* 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 */
|
/* cache node after incrementing its reference count */
|
||||||
/* (see note below). */
|
/* (see note below). */
|
||||||
/* */
|
/* */
|
||||||
@ -979,7 +942,7 @@ FT_BEGIN_HEADER
|
|||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* sbit :: A handle to a small bitmap descriptor. */
|
/* 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 */
|
/* node after incrementing its reference count (see note */
|
||||||
/* below). */
|
/* below). */
|
||||||
/* */
|
/* */
|
||||||
@ -1034,7 +997,7 @@ FT_BEGIN_HEADER
|
|||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* sbit :: A handle to a small bitmap descriptor. */
|
/* 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 */
|
/* cache node after incrementing its reference count */
|
||||||
/* (see note below). */
|
/* (see note below). */
|
||||||
/* */
|
/* */
|
||||||
@ -1068,73 +1031,12 @@ FT_BEGIN_HEADER
|
|||||||
FTC_SBit *sbit,
|
FTC_SBit *sbit,
|
||||||
FTC_Node *anode );
|
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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTCACHE_H__ */
|
#endif /* FTCACHE_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* 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,7 +1,7 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* This file defines the structure of the FreeType reference. */
|
/* 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 */
|
/* General Remarks */
|
||||||
/* */
|
/* */
|
||||||
/* <Sections> */
|
/* <Sections> */
|
||||||
|
/* header_inclusion */
|
||||||
/* user_allocation */
|
/* user_allocation */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
@ -67,27 +68,19 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Chapter> */
|
/* <Chapter> */
|
||||||
/* auto_hinter */
|
/* module_specific */
|
||||||
/* */
|
/* */
|
||||||
/* <Title> */
|
/* <Title> */
|
||||||
/* The Auto-Hinter */
|
/* Controlling FreeType Modules */
|
||||||
/* */
|
/* */
|
||||||
/* <Sections> */
|
/* <Sections> */
|
||||||
/* auto_hinter */
|
/* auto_hinter */
|
||||||
/* */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* <Chapter> */
|
|
||||||
/* cff_driver */
|
|
||||||
/* */
|
|
||||||
/* <Title> */
|
|
||||||
/* The CFF Driver */
|
|
||||||
/* */
|
|
||||||
/* <Sections> */
|
|
||||||
/* cff_driver */
|
/* cff_driver */
|
||||||
|
/* t1_cid_driver */
|
||||||
|
/* tt_driver */
|
||||||
|
/* pcf_driver */
|
||||||
|
/* properties */
|
||||||
|
/* parameter_tags */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
@ -130,3 +123,17 @@
|
|||||||
/* lcd_filtering */
|
/* 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). */
|
/* 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, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
/* modified, and distributed under the terms of the FreeType project */
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
@ -15,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTCID_H__
|
#ifndef FTCID_H_
|
||||||
#define __FTCID_H__
|
#define FTCID_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -86,7 +87,7 @@ FT_BEGIN_HEADER
|
|||||||
FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
|
FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
|
||||||
const char* *registry,
|
const char* *registry,
|
||||||
const char* *ordering,
|
const char* *ordering,
|
||||||
FT_Int *supplement);
|
FT_Int *supplement );
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
@ -96,8 +97,8 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Retrieve the type of the input face, CID keyed or not. In
|
* Retrieve the type of the input face, CID keyed or not. In
|
||||||
* constrast to the @FT_IS_CID_KEYED macro this function returns
|
* contrast to the @FT_IS_CID_KEYED macro this function returns
|
||||||
* successfully also for CID-keyed fonts in an SNFT wrapper.
|
* successfully also for CID-keyed fonts in an SFNT wrapper.
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* face ::
|
* face ::
|
||||||
@ -156,11 +157,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_UInt glyph_index,
|
FT_UInt glyph_index,
|
||||||
FT_UInt *cid );
|
FT_UInt *cid );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTCID_H__ */
|
#endif /* FTCID_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
1225
portlibs/include/freetype/ftdriver.h
Normal file
1225
portlibs/include/freetype/ftdriver.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType error codes (specification). */
|
/* FreeType error codes (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */
|
/* Copyright 2002-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,234 +16,265 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*************************************************************************/
|
||||||
/*******************************************************************/
|
/* */
|
||||||
/***** *****/
|
/* <Section> */
|
||||||
/***** LIST OF ERROR CODES/MESSAGES *****/
|
/* 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 */
|
/* generic errors */
|
||||||
|
|
||||||
FT_NOERRORDEF_( Ok, 0x00, \
|
FT_NOERRORDEF_( Ok, 0x00,
|
||||||
"no error" )
|
"no error" )
|
||||||
|
|
||||||
FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \
|
FT_ERRORDEF_( Cannot_Open_Resource, 0x01,
|
||||||
"cannot open resource" )
|
"cannot open resource" )
|
||||||
FT_ERRORDEF_( Unknown_File_Format, 0x02, \
|
FT_ERRORDEF_( Unknown_File_Format, 0x02,
|
||||||
"unknown file format" )
|
"unknown file format" )
|
||||||
FT_ERRORDEF_( Invalid_File_Format, 0x03, \
|
FT_ERRORDEF_( Invalid_File_Format, 0x03,
|
||||||
"broken file" )
|
"broken file" )
|
||||||
FT_ERRORDEF_( Invalid_Version, 0x04, \
|
FT_ERRORDEF_( Invalid_Version, 0x04,
|
||||||
"invalid FreeType version" )
|
"invalid FreeType version" )
|
||||||
FT_ERRORDEF_( Lower_Module_Version, 0x05, \
|
FT_ERRORDEF_( Lower_Module_Version, 0x05,
|
||||||
"module version is too low" )
|
"module version is too low" )
|
||||||
FT_ERRORDEF_( Invalid_Argument, 0x06, \
|
FT_ERRORDEF_( Invalid_Argument, 0x06,
|
||||||
"invalid argument" )
|
"invalid argument" )
|
||||||
FT_ERRORDEF_( Unimplemented_Feature, 0x07, \
|
FT_ERRORDEF_( Unimplemented_Feature, 0x07,
|
||||||
"unimplemented feature" )
|
"unimplemented feature" )
|
||||||
FT_ERRORDEF_( Invalid_Table, 0x08, \
|
FT_ERRORDEF_( Invalid_Table, 0x08,
|
||||||
"broken table" )
|
"broken table" )
|
||||||
FT_ERRORDEF_( Invalid_Offset, 0x09, \
|
FT_ERRORDEF_( Invalid_Offset, 0x09,
|
||||||
"broken offset within table" )
|
"broken offset within table" )
|
||||||
FT_ERRORDEF_( Array_Too_Large, 0x0A, \
|
FT_ERRORDEF_( Array_Too_Large, 0x0A,
|
||||||
"array allocation size too large" )
|
"array allocation size too large" )
|
||||||
FT_ERRORDEF_( Missing_Module, 0x0B, \
|
FT_ERRORDEF_( Missing_Module, 0x0B,
|
||||||
"missing module" )
|
"missing module" )
|
||||||
FT_ERRORDEF_( Missing_Property, 0x0C, \
|
FT_ERRORDEF_( Missing_Property, 0x0C,
|
||||||
"missing property" )
|
"missing property" )
|
||||||
|
|
||||||
/* glyph/character errors */
|
/* glyph/character errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \
|
FT_ERRORDEF_( Invalid_Glyph_Index, 0x10,
|
||||||
"invalid glyph index" )
|
"invalid glyph index" )
|
||||||
FT_ERRORDEF_( Invalid_Character_Code, 0x11, \
|
FT_ERRORDEF_( Invalid_Character_Code, 0x11,
|
||||||
"invalid character code" )
|
"invalid character code" )
|
||||||
FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \
|
FT_ERRORDEF_( Invalid_Glyph_Format, 0x12,
|
||||||
"unsupported glyph image format" )
|
"unsupported glyph image format" )
|
||||||
FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \
|
FT_ERRORDEF_( Cannot_Render_Glyph, 0x13,
|
||||||
"cannot render this glyph format" )
|
"cannot render this glyph format" )
|
||||||
FT_ERRORDEF_( Invalid_Outline, 0x14, \
|
FT_ERRORDEF_( Invalid_Outline, 0x14,
|
||||||
"invalid outline" )
|
"invalid outline" )
|
||||||
FT_ERRORDEF_( Invalid_Composite, 0x15, \
|
FT_ERRORDEF_( Invalid_Composite, 0x15,
|
||||||
"invalid composite glyph" )
|
"invalid composite glyph" )
|
||||||
FT_ERRORDEF_( Too_Many_Hints, 0x16, \
|
FT_ERRORDEF_( Too_Many_Hints, 0x16,
|
||||||
"too many hints" )
|
"too many hints" )
|
||||||
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \
|
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17,
|
||||||
"invalid pixel size" )
|
"invalid pixel size" )
|
||||||
|
|
||||||
/* handle errors */
|
/* handle errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Invalid_Handle, 0x20, \
|
FT_ERRORDEF_( Invalid_Handle, 0x20,
|
||||||
"invalid object handle" )
|
"invalid object handle" )
|
||||||
FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \
|
FT_ERRORDEF_( Invalid_Library_Handle, 0x21,
|
||||||
"invalid library handle" )
|
"invalid library handle" )
|
||||||
FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \
|
FT_ERRORDEF_( Invalid_Driver_Handle, 0x22,
|
||||||
"invalid module handle" )
|
"invalid module handle" )
|
||||||
FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \
|
FT_ERRORDEF_( Invalid_Face_Handle, 0x23,
|
||||||
"invalid face handle" )
|
"invalid face handle" )
|
||||||
FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \
|
FT_ERRORDEF_( Invalid_Size_Handle, 0x24,
|
||||||
"invalid size handle" )
|
"invalid size handle" )
|
||||||
FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \
|
FT_ERRORDEF_( Invalid_Slot_Handle, 0x25,
|
||||||
"invalid glyph slot handle" )
|
"invalid glyph slot handle" )
|
||||||
FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \
|
FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26,
|
||||||
"invalid charmap handle" )
|
"invalid charmap handle" )
|
||||||
FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \
|
FT_ERRORDEF_( Invalid_Cache_Handle, 0x27,
|
||||||
"invalid cache manager handle" )
|
"invalid cache manager handle" )
|
||||||
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \
|
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28,
|
||||||
"invalid stream handle" )
|
"invalid stream handle" )
|
||||||
|
|
||||||
/* driver errors */
|
/* driver errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Too_Many_Drivers, 0x30, \
|
FT_ERRORDEF_( Too_Many_Drivers, 0x30,
|
||||||
"too many modules" )
|
"too many modules" )
|
||||||
FT_ERRORDEF_( Too_Many_Extensions, 0x31, \
|
FT_ERRORDEF_( Too_Many_Extensions, 0x31,
|
||||||
"too many extensions" )
|
"too many extensions" )
|
||||||
|
|
||||||
/* memory errors */
|
/* memory errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Out_Of_Memory, 0x40, \
|
FT_ERRORDEF_( Out_Of_Memory, 0x40,
|
||||||
"out of memory" )
|
"out of memory" )
|
||||||
FT_ERRORDEF_( Unlisted_Object, 0x41, \
|
FT_ERRORDEF_( Unlisted_Object, 0x41,
|
||||||
"unlisted object" )
|
"unlisted object" )
|
||||||
|
|
||||||
/* stream errors */
|
/* stream errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \
|
FT_ERRORDEF_( Cannot_Open_Stream, 0x51,
|
||||||
"cannot open stream" )
|
"cannot open stream" )
|
||||||
FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \
|
FT_ERRORDEF_( Invalid_Stream_Seek, 0x52,
|
||||||
"invalid stream seek" )
|
"invalid stream seek" )
|
||||||
FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \
|
FT_ERRORDEF_( Invalid_Stream_Skip, 0x53,
|
||||||
"invalid stream skip" )
|
"invalid stream skip" )
|
||||||
FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \
|
FT_ERRORDEF_( Invalid_Stream_Read, 0x54,
|
||||||
"invalid stream read" )
|
"invalid stream read" )
|
||||||
FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \
|
FT_ERRORDEF_( Invalid_Stream_Operation, 0x55,
|
||||||
"invalid stream operation" )
|
"invalid stream operation" )
|
||||||
FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \
|
FT_ERRORDEF_( Invalid_Frame_Operation, 0x56,
|
||||||
"invalid frame operation" )
|
"invalid frame operation" )
|
||||||
FT_ERRORDEF_( Nested_Frame_Access, 0x57, \
|
FT_ERRORDEF_( Nested_Frame_Access, 0x57,
|
||||||
"nested frame access" )
|
"nested frame access" )
|
||||||
FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \
|
FT_ERRORDEF_( Invalid_Frame_Read, 0x58,
|
||||||
"invalid frame read" )
|
"invalid frame read" )
|
||||||
|
|
||||||
/* raster errors */
|
/* raster errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Raster_Uninitialized, 0x60, \
|
FT_ERRORDEF_( Raster_Uninitialized, 0x60,
|
||||||
"raster uninitialized" )
|
"raster uninitialized" )
|
||||||
FT_ERRORDEF_( Raster_Corrupted, 0x61, \
|
FT_ERRORDEF_( Raster_Corrupted, 0x61,
|
||||||
"raster corrupted" )
|
"raster corrupted" )
|
||||||
FT_ERRORDEF_( Raster_Overflow, 0x62, \
|
FT_ERRORDEF_( Raster_Overflow, 0x62,
|
||||||
"raster overflow" )
|
"raster overflow" )
|
||||||
FT_ERRORDEF_( Raster_Negative_Height, 0x63, \
|
FT_ERRORDEF_( Raster_Negative_Height, 0x63,
|
||||||
"negative height while rastering" )
|
"negative height while rastering" )
|
||||||
|
|
||||||
/* cache errors */
|
/* cache errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Too_Many_Caches, 0x70, \
|
FT_ERRORDEF_( Too_Many_Caches, 0x70,
|
||||||
"too many registered caches" )
|
"too many registered caches" )
|
||||||
|
|
||||||
/* TrueType and SFNT errors */
|
/* TrueType and SFNT errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Invalid_Opcode, 0x80, \
|
FT_ERRORDEF_( Invalid_Opcode, 0x80,
|
||||||
"invalid opcode" )
|
"invalid opcode" )
|
||||||
FT_ERRORDEF_( Too_Few_Arguments, 0x81, \
|
FT_ERRORDEF_( Too_Few_Arguments, 0x81,
|
||||||
"too few arguments" )
|
"too few arguments" )
|
||||||
FT_ERRORDEF_( Stack_Overflow, 0x82, \
|
FT_ERRORDEF_( Stack_Overflow, 0x82,
|
||||||
"stack overflow" )
|
"stack overflow" )
|
||||||
FT_ERRORDEF_( Code_Overflow, 0x83, \
|
FT_ERRORDEF_( Code_Overflow, 0x83,
|
||||||
"code overflow" )
|
"code overflow" )
|
||||||
FT_ERRORDEF_( Bad_Argument, 0x84, \
|
FT_ERRORDEF_( Bad_Argument, 0x84,
|
||||||
"bad argument" )
|
"bad argument" )
|
||||||
FT_ERRORDEF_( Divide_By_Zero, 0x85, \
|
FT_ERRORDEF_( Divide_By_Zero, 0x85,
|
||||||
"division by zero" )
|
"division by zero" )
|
||||||
FT_ERRORDEF_( Invalid_Reference, 0x86, \
|
FT_ERRORDEF_( Invalid_Reference, 0x86,
|
||||||
"invalid reference" )
|
"invalid reference" )
|
||||||
FT_ERRORDEF_( Debug_OpCode, 0x87, \
|
FT_ERRORDEF_( Debug_OpCode, 0x87,
|
||||||
"found debug opcode" )
|
"found debug opcode" )
|
||||||
FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \
|
FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88,
|
||||||
"found ENDF opcode in execution stream" )
|
"found ENDF opcode in execution stream" )
|
||||||
FT_ERRORDEF_( Nested_DEFS, 0x89, \
|
FT_ERRORDEF_( Nested_DEFS, 0x89,
|
||||||
"nested DEFS" )
|
"nested DEFS" )
|
||||||
FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \
|
FT_ERRORDEF_( Invalid_CodeRange, 0x8A,
|
||||||
"invalid code range" )
|
"invalid code range" )
|
||||||
FT_ERRORDEF_( Execution_Too_Long, 0x8B, \
|
FT_ERRORDEF_( Execution_Too_Long, 0x8B,
|
||||||
"execution context too long" )
|
"execution context too long" )
|
||||||
FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \
|
FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C,
|
||||||
"too many function definitions" )
|
"too many function definitions" )
|
||||||
FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \
|
FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D,
|
||||||
"too many instruction definitions" )
|
"too many instruction definitions" )
|
||||||
FT_ERRORDEF_( Table_Missing, 0x8E, \
|
FT_ERRORDEF_( Table_Missing, 0x8E,
|
||||||
"SFNT font table missing" )
|
"SFNT font table missing" )
|
||||||
FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \
|
FT_ERRORDEF_( Horiz_Header_Missing, 0x8F,
|
||||||
"horizontal header (hhea) table missing" )
|
"horizontal header (hhea) table missing" )
|
||||||
FT_ERRORDEF_( Locations_Missing, 0x90, \
|
FT_ERRORDEF_( Locations_Missing, 0x90,
|
||||||
"locations (loca) table missing" )
|
"locations (loca) table missing" )
|
||||||
FT_ERRORDEF_( Name_Table_Missing, 0x91, \
|
FT_ERRORDEF_( Name_Table_Missing, 0x91,
|
||||||
"name table missing" )
|
"name table missing" )
|
||||||
FT_ERRORDEF_( CMap_Table_Missing, 0x92, \
|
FT_ERRORDEF_( CMap_Table_Missing, 0x92,
|
||||||
"character map (cmap) table missing" )
|
"character map (cmap) table missing" )
|
||||||
FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \
|
FT_ERRORDEF_( Hmtx_Table_Missing, 0x93,
|
||||||
"horizontal metrics (hmtx) table missing" )
|
"horizontal metrics (hmtx) table missing" )
|
||||||
FT_ERRORDEF_( Post_Table_Missing, 0x94, \
|
FT_ERRORDEF_( Post_Table_Missing, 0x94,
|
||||||
"PostScript (post) table missing" )
|
"PostScript (post) table missing" )
|
||||||
FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \
|
FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95,
|
||||||
"invalid horizontal metrics" )
|
"invalid horizontal metrics" )
|
||||||
FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \
|
FT_ERRORDEF_( Invalid_CharMap_Format, 0x96,
|
||||||
"invalid character map (cmap) format" )
|
"invalid character map (cmap) format" )
|
||||||
FT_ERRORDEF_( Invalid_PPem, 0x97, \
|
FT_ERRORDEF_( Invalid_PPem, 0x97,
|
||||||
"invalid ppem value" )
|
"invalid ppem value" )
|
||||||
FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \
|
FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98,
|
||||||
"invalid vertical metrics" )
|
"invalid vertical metrics" )
|
||||||
FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \
|
FT_ERRORDEF_( Could_Not_Find_Context, 0x99,
|
||||||
"could not find context" )
|
"could not find context" )
|
||||||
FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \
|
FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A,
|
||||||
"invalid PostScript (post) table format" )
|
"invalid PostScript (post) table format" )
|
||||||
FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \
|
FT_ERRORDEF_( Invalid_Post_Table, 0x9B,
|
||||||
"invalid PostScript (post) table" )
|
"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 */
|
/* CFF, CID, and Type 1 errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Syntax_Error, 0xA0, \
|
FT_ERRORDEF_( Syntax_Error, 0xA0,
|
||||||
"opcode syntax error" )
|
"opcode syntax error" )
|
||||||
FT_ERRORDEF_( Stack_Underflow, 0xA1, \
|
FT_ERRORDEF_( Stack_Underflow, 0xA1,
|
||||||
"argument stack underflow" )
|
"argument stack underflow" )
|
||||||
FT_ERRORDEF_( Ignore, 0xA2, \
|
FT_ERRORDEF_( Ignore, 0xA2,
|
||||||
"ignore" )
|
"ignore" )
|
||||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
|
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3,
|
||||||
"no Unicode glyph name found" )
|
"no Unicode glyph name found" )
|
||||||
FT_ERRORDEF_( Glyph_Too_Big, 0xA4, \
|
FT_ERRORDEF_( Glyph_Too_Big, 0xA4,
|
||||||
"glyph to big for hinting" )
|
"glyph too big for hinting" )
|
||||||
|
|
||||||
/* BDF errors */
|
/* BDF errors */
|
||||||
|
|
||||||
FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \
|
FT_ERRORDEF_( Missing_Startfont_Field, 0xB0,
|
||||||
"`STARTFONT' field missing" )
|
"`STARTFONT' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Font_Field, 0xB1, \
|
FT_ERRORDEF_( Missing_Font_Field, 0xB1,
|
||||||
"`FONT' field missing" )
|
"`FONT' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
|
FT_ERRORDEF_( Missing_Size_Field, 0xB2,
|
||||||
"`SIZE' field missing" )
|
"`SIZE' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
|
FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3,
|
||||||
"`FONTBOUNDINGBOX' field missing" )
|
"`FONTBOUNDINGBOX' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
|
FT_ERRORDEF_( Missing_Chars_Field, 0xB4,
|
||||||
"`CHARS' field missing" )
|
"`CHARS' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
|
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5,
|
||||||
"`STARTCHAR' field missing" )
|
"`STARTCHAR' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
|
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6,
|
||||||
"`ENCODING' field missing" )
|
"`ENCODING' field missing" )
|
||||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
|
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7,
|
||||||
"`BBX' field missing" )
|
"`BBX' field missing" )
|
||||||
FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
|
FT_ERRORDEF_( Bbx_Too_Big, 0xB8,
|
||||||
"`BBX' too big" )
|
"`BBX' too big" )
|
||||||
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
|
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9,
|
||||||
"Font header corrupted or missing fields" )
|
"Font header corrupted or missing fields" )
|
||||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
|
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA,
|
||||||
"Font glyphs corrupted or missing fields" )
|
"Font glyphs corrupted or missing fields" )
|
||||||
|
|
||||||
|
/* */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType error code handling (specification). */
|
/* FreeType error code handling (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2002, 2004, 2007, 2013 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -18,70 +18,98 @@
|
|||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* This special header file is used to define the handling of FT2 */
|
/* <Section> */
|
||||||
/* enumeration constants. It can also be used to generate error message */
|
/* error_enumerations */
|
||||||
/* strings with a small macro trick explained below. */
|
|
||||||
/* */
|
/* */
|
||||||
/* 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 */
|
/* 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 */
|
/* the module where the error has happened (this is not compatible */
|
||||||
/* with standard builds of FreeType 2). See the file `ftmoderr.h' for */
|
/* with standard builds of FreeType~2, however). See the file */
|
||||||
/* more details. */
|
/* `ftmoderr.h' for more details. */
|
||||||
/* */
|
/* */
|
||||||
|
/* *Error* *Message* *Strings* */
|
||||||
/* */
|
/* */
|
||||||
/* II - Error Message strings */
|
/* 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 */
|
||||||
/* The error definitions below are made through special macros that */
|
/* space (most client applications do not use them). */
|
||||||
/* 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). */
|
|
||||||
/* */
|
/* */
|
||||||
/* To do so, you have to define the following macros before including */
|
/* 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. */
|
/* 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. */
|
||||||
|
/* */
|
||||||
|
/* { */
|
||||||
|
/* 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, NULL } }; */
|
||||||
|
/* */
|
||||||
|
/* const struct */
|
||||||
/* { */
|
/* { */
|
||||||
/* #undef __FTERRORS_H__ */
|
/* int err_code; */
|
||||||
/* #define FT_ERRORDEF( e, v, s ) { e, s }, */
|
/* const char* err_msg; */
|
||||||
/* #define FT_ERROR_START_LIST { */
|
/* } ft_errors[] = */
|
||||||
/* #define FT_ERROR_END_LIST { 0, 0 } }; */
|
|
||||||
/* */
|
/* */
|
||||||
/* const struct */
|
/* #include FT_ERRORS_H */
|
||||||
/* { */
|
/* } */
|
||||||
/* int err_code; */
|
|
||||||
/* const char* err_msg; */
|
|
||||||
/* } ft_errors[] = */
|
|
||||||
/* */
|
/* */
|
||||||
/* #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__
|
#define __FTERRORS_H__
|
||||||
|
|
||||||
|
|
||||||
@ -192,7 +220,7 @@
|
|||||||
#undef FT_ERR_PREFIX
|
#undef FT_ERR_PREFIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __FTERRORS_H__ */
|
#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTXF86_H__
|
#ifndef FTFNTFMT_H_
|
||||||
#define __FTXF86_H__
|
#define FTFNTFMT_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -49,22 +49,20 @@ FT_BEGIN_HEADER
|
|||||||
/* however, there are special cases (like in PDF devices) where it is */
|
/* however, there are special cases (like in PDF devices) where it is */
|
||||||
/* important to differentiate, in spite of FreeType's uniform API. */
|
/* 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> */
|
/* <Function> */
|
||||||
/* FT_Get_X11_Font_Format */
|
/* FT_Get_Font_Format */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Return a string describing the format of a given face, using values */
|
/* Return a string describing the format of a given face. Possible */
|
||||||
/* which can be used as an X11 FONT_PROPERTY. Possible values are */
|
/* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */
|
||||||
/* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
|
/* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */
|
||||||
/* `PFR', and `Windows~FNT'. */
|
/* */
|
||||||
|
/* The return value is suitable to be used as an X11 FONT_PROPERTY. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: */
|
/* face :: */
|
||||||
@ -73,11 +71,25 @@ FT_BEGIN_HEADER
|
|||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* Font format string. NULL in case of error. */
|
/* 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_EXPORT( const char* )
|
||||||
FT_Get_X11_Font_Format( FT_Face face );
|
FT_Get_X11_Font_Format( FT_Face face );
|
||||||
|
|
||||||
/* */
|
|
||||||
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTXF86_H__ */
|
#endif /* FTFNTFMT_H_ */
|
||||||
|
|
||||||
|
|
||||||
|
/* END */
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Access of TrueType's `gasp' table (specification). */
|
/* Access of TrueType's `gasp' table (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2007, 2008, 2011 by */
|
/* Copyright 2007-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _FT_GASP_H_
|
#ifndef FTGASP_H_
|
||||||
#define _FT_GASP_H_
|
#define FTGASP_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -29,6 +29,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
FT_BEGIN_HEADER
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
* @section:
|
* @section:
|
||||||
@ -92,8 +95,8 @@
|
|||||||
#define FT_GASP_NO_TABLE -1
|
#define FT_GASP_NO_TABLE -1
|
||||||
#define FT_GASP_DO_GRIDFIT 0x01
|
#define FT_GASP_DO_GRIDFIT 0x01
|
||||||
#define FT_GASP_DO_GRAY 0x02
|
#define FT_GASP_DO_GRAY 0x02
|
||||||
|
#define FT_GASP_SYMMETRIC_GRIDFIT 0x04
|
||||||
#define FT_GASP_SYMMETRIC_SMOOTHING 0x08
|
#define FT_GASP_SYMMETRIC_SMOOTHING 0x08
|
||||||
#define FT_GASP_SYMMETRIC_GRIDFIT 0x10
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
@ -102,17 +105,25 @@
|
|||||||
* FT_Get_Gasp
|
* FT_Get_Gasp
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Read the `gasp' table from a TrueType or OpenType font file and
|
* For a TrueType or OpenType font file, return the rasterizer behaviour
|
||||||
* return the entry corresponding to a given character pixel size.
|
* flags from the font's `gasp' table corresponding to a given
|
||||||
|
* character pixel size.
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* face :: The source face handle.
|
* face :: The source face handle.
|
||||||
|
*
|
||||||
* ppem :: The vertical character pixel size.
|
* ppem :: The vertical character pixel size.
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
|
* Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
|
||||||
* `gasp' table in the face.
|
* `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:
|
* @since:
|
||||||
* 2.3.0
|
* 2.3.0
|
||||||
*/
|
*/
|
||||||
@ -120,9 +131,12 @@
|
|||||||
FT_Get_Gasp( FT_Face face,
|
FT_Get_Gasp( FT_Face face,
|
||||||
FT_UInt ppem );
|
FT_UInt ppem );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
#endif /* _FT_GASP_H_ */
|
|
||||||
|
FT_END_HEADER
|
||||||
|
|
||||||
|
#endif /* FTGASP_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType convenience functions to handle glyphs (specification). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -29,8 +29,8 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTGLYPH_H__
|
#ifndef FTGLYPH_H_
|
||||||
#define __FTGLYPH_H__
|
#define FTGLYPH_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -231,6 +231,12 @@ FT_BEGIN_HEADER
|
|||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Get_Glyph( FT_GlyphSlot slot,
|
FT_Get_Glyph( FT_GlyphSlot slot,
|
||||||
FT_Glyph *aglyph );
|
FT_Glyph *aglyph );
|
||||||
@ -325,22 +331,8 @@ FT_BEGIN_HEADER
|
|||||||
} FT_Glyph_BBox_Mode;
|
} FT_Glyph_BBox_Mode;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/* these constants are deprecated; use the corresponding */
|
||||||
/* */
|
/* `FT_Glyph_BBox_Mode' values instead */
|
||||||
/* <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. */
|
|
||||||
/* */
|
|
||||||
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
|
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
|
||||||
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
|
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
|
||||||
#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
|
#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
|
||||||
@ -355,20 +347,20 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Return a glyph's `control box'. The control box encloses all the */
|
/* 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 */
|
/* coincides with the exact bounding box for most glyphs, it can be */
|
||||||
/* slightly larger in some situations (like when rotating an outline */
|
/* 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 */
|
/* 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 */
|
/* 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 */
|
/* 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> */
|
/* <Input> */
|
||||||
/* glyph :: A handle to the source glyph object. */
|
/* 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. */
|
/* bounding box values. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
@ -388,7 +380,7 @@ FT_BEGIN_HEADER
|
|||||||
/* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
|
/* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
|
||||||
/* reasonable values for the CBox it is necessary to load the glyph */
|
/* reasonable values for the CBox it is necessary to load the glyph */
|
||||||
/* at a large ppem value (so that the hinting instructions can */
|
/* 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. */
|
/* which can be eventually converted back to font units. */
|
||||||
/* */
|
/* */
|
||||||
/* Note that the maximum coordinates are exclusive, which means that */
|
/* Note that the maximum coordinates are exclusive, which means that */
|
||||||
@ -467,7 +459,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* // load glyph */
|
/* // 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 */
|
/* // extract glyph image */
|
||||||
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
|
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
|
||||||
@ -580,6 +572,9 @@ FT_BEGIN_HEADER
|
|||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* The result is undefined if either `a' or `b' is zero. */
|
/* 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_EXPORT( void )
|
||||||
FT_Matrix_Multiply( const FT_Matrix* a,
|
FT_Matrix_Multiply( const FT_Matrix* a,
|
||||||
FT_Matrix* b );
|
FT_Matrix* b );
|
||||||
@ -603,13 +598,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Matrix_Invert( FT_Matrix* matrix );
|
FT_Matrix_Invert( FT_Matrix* matrix );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTGLYPH_H__ */
|
#endif /* FTGLYPH_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
|
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2005, 2006 by */
|
/* Copyright 2004-2018 by */
|
||||||
/* Masatake YAMATO, Redhat K.K, */
|
/* Masatake YAMATO, Redhat K.K, */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
@ -25,8 +25,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTGXVAL_H__
|
#ifndef FTGXVAL_H_
|
||||||
#define __FTGXVAL_H__
|
#define FTGXVAL_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -57,9 +57,19 @@ FT_BEGIN_HEADER
|
|||||||
/* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */
|
/* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */
|
||||||
/* trak, prop, lcar). */
|
/* 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 */
|
||||||
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
@ -91,15 +101,15 @@ FT_BEGIN_HEADER
|
|||||||
* The number of tables checked in this module. Use it as a parameter
|
* The number of tables checked in this module. Use it as a parameter
|
||||||
* for the `table-length' argument of function @FT_TrueTypeGX_Validate.
|
* for the `table-length' argument of function @FT_TrueTypeGX_Validate.
|
||||||
*/
|
*/
|
||||||
#define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1)
|
#define FT_VALIDATE_GX_LENGTH ( FT_VALIDATE_GX_LAST_INDEX + 1 )
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
/* Up to 0x1000 is used by otvalid.
|
/* Up to 0x1000 is used by otvalid.
|
||||||
Ox2xxx is reserved for feature OT extension. */
|
Ox2xxx is reserved for feature OT extension. */
|
||||||
#define FT_VALIDATE_GX_START 0x4000
|
#define FT_VALIDATE_GX_START 0x4000
|
||||||
#define FT_VALIDATE_GX_BITFIELD( tag ) \
|
#define FT_VALIDATE_GX_BITFIELD( tag ) \
|
||||||
( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
|
( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
@ -171,8 +181,6 @@ FT_BEGIN_HEADER
|
|||||||
FT_VALIDATE_lcar )
|
FT_VALIDATE_lcar )
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
@ -180,7 +188,7 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Validate various TrueTypeGX tables to assure that all offsets and
|
* 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
|
* actually does the text layout can access those tables without
|
||||||
* error checking (which can be quite time consuming).
|
* error checking (which can be quite time consuming).
|
||||||
*
|
*
|
||||||
@ -189,7 +197,7 @@ FT_BEGIN_HEADER
|
|||||||
* A handle to the input face.
|
* A handle to the input face.
|
||||||
*
|
*
|
||||||
* validation_flags ::
|
* 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.
|
* @FT_VALIDATE_GXXXX for possible values.
|
||||||
*
|
*
|
||||||
* table_length ::
|
* table_length ::
|
||||||
@ -221,8 +229,6 @@ FT_BEGIN_HEADER
|
|||||||
FT_UInt table_length );
|
FT_UInt table_length );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
@ -248,8 +254,6 @@ FT_BEGIN_HEADER
|
|||||||
FT_Bytes table );
|
FT_Bytes table );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @enum:
|
* @enum:
|
||||||
@ -277,8 +281,6 @@ FT_BEGIN_HEADER
|
|||||||
#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
|
#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
@ -286,7 +288,7 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Validate classic (16-bit format) kern table to assure that the offsets
|
* 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
|
* actually does the text layout can access those tables without error
|
||||||
* checking (which can be quite time consuming).
|
* checking (which can be quite time consuming).
|
||||||
*
|
*
|
||||||
@ -299,7 +301,7 @@ FT_BEGIN_HEADER
|
|||||||
* A handle to the input face.
|
* A handle to the input face.
|
||||||
*
|
*
|
||||||
* validation_flags ::
|
* 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.
|
* @FT_VALIDATE_CKERNXXX for possible values.
|
||||||
*
|
*
|
||||||
* @output:
|
* @output:
|
||||||
@ -320,8 +322,6 @@ FT_BEGIN_HEADER
|
|||||||
FT_Bytes *ckern_table );
|
FT_Bytes *ckern_table );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
@ -346,13 +346,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_ClassicKern_Free( FT_Face face,
|
FT_ClassicKern_Free( FT_Face face,
|
||||||
FT_Bytes table );
|
FT_Bytes table );
|
||||||
|
|
||||||
|
/* */
|
||||||
/* */
|
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTGXVAL_H__ */
|
#endif /* FTGXVAL_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Gzip-compressed stream support. */
|
/* Gzip-compressed stream support. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002, 2003, 2004, 2006 by */
|
/* Copyright 2002-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTGZIP_H__
|
#ifndef FTGZIP_H_
|
||||||
#define __FTGZIP_H__
|
#define FTGZIP_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -91,12 +91,61 @@ FT_BEGIN_HEADER
|
|||||||
FT_Stream_OpenGzip( FT_Stream stream,
|
FT_Stream_OpenGzip( FT_Stream stream,
|
||||||
FT_Stream source );
|
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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTGZIP_H__ */
|
#endif /* FTGZIP_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
/* FreeType glyph image formats and default raster interface */
|
/* FreeType glyph image formats and default raster interface */
|
||||||
/* (specification). */
|
/* (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
|
/* Copyright 1996-2018 by */
|
||||||
/* 2010 by */
|
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -25,12 +24,12 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTIMAGE_H__
|
#ifndef FTIMAGE_H_
|
||||||
#define __FTIMAGE_H__
|
#define FTIMAGE_H_
|
||||||
|
|
||||||
|
|
||||||
/* _STANDALONE_ is from ftgrays.c */
|
/* STANDALONE_ is from ftgrays.c */
|
||||||
#ifndef _STANDALONE_
|
#ifndef STANDALONE_
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -169,6 +168,15 @@ FT_BEGIN_HEADER
|
|||||||
/* times taller than the original glyph image. See also */
|
/* times taller than the original glyph image. See also */
|
||||||
/* @FT_RENDER_MODE_LCD_V. */
|
/* @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_
|
typedef enum FT_Pixel_Mode_
|
||||||
{
|
{
|
||||||
FT_PIXEL_MODE_NONE = 0,
|
FT_PIXEL_MODE_NONE = 0,
|
||||||
@ -178,73 +186,21 @@ FT_BEGIN_HEADER
|
|||||||
FT_PIXEL_MODE_GRAY4,
|
FT_PIXEL_MODE_GRAY4,
|
||||||
FT_PIXEL_MODE_LCD,
|
FT_PIXEL_MODE_LCD,
|
||||||
FT_PIXEL_MODE_LCD_V,
|
FT_PIXEL_MODE_LCD_V,
|
||||||
|
FT_PIXEL_MODE_BGRA,
|
||||||
|
|
||||||
FT_PIXEL_MODE_MAX /* do not remove */
|
FT_PIXEL_MODE_MAX /* do not remove */
|
||||||
|
|
||||||
} FT_Pixel_Mode;
|
} FT_Pixel_Mode;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */
|
||||||
/* */
|
/* values instead. */
|
||||||
/* <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. */
|
|
||||||
/* */
|
|
||||||
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
|
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
|
||||||
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
|
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
|
||||||
#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
|
#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
|
||||||
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
|
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
|
||||||
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
|
#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 */
|
/* field is intended for paletted pixel modes. Not */
|
||||||
/* used currently. */
|
/* 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_
|
typedef struct FT_Bitmap_
|
||||||
{
|
{
|
||||||
int rows;
|
unsigned int rows;
|
||||||
int width;
|
unsigned int width;
|
||||||
int pitch;
|
int pitch;
|
||||||
unsigned char* buffer;
|
unsigned char* buffer;
|
||||||
short num_grays;
|
unsigned short num_grays;
|
||||||
char pixel_mode;
|
unsigned char pixel_mode;
|
||||||
char palette_mode;
|
unsigned char palette_mode;
|
||||||
void* palette;
|
void* palette;
|
||||||
|
|
||||||
} FT_Bitmap;
|
} FT_Bitmap;
|
||||||
@ -350,11 +301,11 @@ FT_BEGIN_HEADER
|
|||||||
/* each outline point's type. */
|
/* each outline point's type. */
|
||||||
/* */
|
/* */
|
||||||
/* If bit~0 is unset, the point is `off' the curve, */
|
/* 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. */
|
/* set. */
|
||||||
/* */
|
/* */
|
||||||
/* Bit~1 is meaningful for `off' points only. 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. */
|
/* and a second-order control point if unset. */
|
||||||
/* */
|
/* */
|
||||||
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
|
/* 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 */
|
/* flags :: A set of bit flags used to characterize the outline */
|
||||||
/* and give hints to the scan-converter and hinter on */
|
/* 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> */
|
/* <Note> */
|
||||||
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
|
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
|
||||||
@ -393,6 +344,8 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
} FT_Outline;
|
} FT_Outline;
|
||||||
|
|
||||||
|
/* */
|
||||||
|
|
||||||
/* Following limits must be consistent with */
|
/* Following limits must be consistent with */
|
||||||
/* FT_Outline.{n_contours,n_points} */
|
/* FT_Outline.{n_contours,n_points} */
|
||||||
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
|
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
|
||||||
@ -402,7 +355,7 @@ FT_BEGIN_HEADER
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Enum> */
|
/* <Enum> */
|
||||||
/* FT_OUTLINE_FLAGS */
|
/* FT_OUTLINE_XXX */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A list of bit-field constants use for the flags in an outline's */
|
/* 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
|
#define FT_OUTLINE_SINGLE_PASS 0x200
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/* these constants are deprecated; use the corresponding */
|
||||||
*
|
/* `FT_OUTLINE_XXX' values instead */
|
||||||
* @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.
|
|
||||||
*/
|
|
||||||
#define ft_outline_none FT_OUTLINE_NONE
|
#define ft_outline_none FT_OUTLINE_NONE
|
||||||
#define ft_outline_owner FT_OUTLINE_OWNER
|
#define ft_outline_owner FT_OUTLINE_OWNER
|
||||||
#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
|
#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
|
||||||
@ -546,7 +483,7 @@ FT_BEGIN_HEADER
|
|||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* to :: A pointer to the target point of the `move to'. */
|
/* 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. */
|
/* decomposition function. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
@ -573,7 +510,7 @@ FT_BEGIN_HEADER
|
|||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* to :: A pointer to the target point of the `line to'. */
|
/* 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. */
|
/* decomposition function. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
@ -595,7 +532,7 @@ FT_BEGIN_HEADER
|
|||||||
/* A function pointer type used to describe the signature of a `conic */
|
/* A function pointer type used to describe the signature of a `conic */
|
||||||
/* to' function during outline walking or decomposition. */
|
/* 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. */
|
/* the outline. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
@ -604,7 +541,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* to :: A pointer to the target end point of the conic arc. */
|
/* 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. */
|
/* the decomposition function. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
@ -627,16 +564,16 @@ FT_BEGIN_HEADER
|
|||||||
/* A function pointer type used to describe the signature of a `cubic */
|
/* A function pointer type used to describe the signature of a `cubic */
|
||||||
/* to' function during outline walking or decomposition. */
|
/* 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> */
|
/* <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. */
|
/* 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. */
|
/* the decomposition function. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
@ -658,16 +595,16 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure to hold various function pointers used during outline */
|
/* 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> */
|
/* <Fields> */
|
||||||
/* move_to :: The `move to' emitter. */
|
/* move_to :: The `move to' emitter. */
|
||||||
/* */
|
/* */
|
||||||
/* line_to :: The segment 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 */
|
/* shift :: The shift that is applied to coordinates before they */
|
||||||
/* are sent to the emitter. */
|
/* are sent to the emitter. */
|
||||||
@ -682,7 +619,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* { */
|
/* { */
|
||||||
/* x' = (x << shift) - delta */
|
/* 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 */
|
/* Set the values of `shift' and `delta' to~0 to get the original */
|
||||||
@ -764,7 +701,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* FT_GLYPH_FORMAT_OUTLINE :: */
|
/* FT_GLYPH_FORMAT_OUTLINE :: */
|
||||||
/* The glyph image is a vectorial outline made of line segments */
|
/* 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 */
|
/* generally want to access the `outline' field of the */
|
||||||
/* @FT_GlyphSlotRec structure to read it. */
|
/* @FT_GlyphSlotRec structure to read it. */
|
||||||
/* */
|
/* */
|
||||||
@ -787,22 +724,8 @@ FT_BEGIN_HEADER
|
|||||||
} FT_Glyph_Format;
|
} FT_Glyph_Format;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/* these constants are deprecated; use the corresponding */
|
||||||
/* */
|
/* `FT_Glyph_Format' values instead. */
|
||||||
/* <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. */
|
|
||||||
/* */
|
|
||||||
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
|
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
|
||||||
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
|
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
|
||||||
#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
|
#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 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 */
|
/* Note that in FreeType 2, all rasters are now encapsulated within */
|
||||||
/* specific modules called `renderers'. See `freetype/ftrender.h' for */
|
/* specific modules called `renderers'. See `ftrender.h' for more */
|
||||||
/* more details on renderers. */
|
/* details on renderers. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
@ -847,6 +770,21 @@ FT_BEGIN_HEADER
|
|||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* This section contains technical definitions. */
|
/* 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 */
|
/* FT_Raster */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A handle (pointer) to a raster object. Each object can be used */
|
/* An opaque handle (pointer) to a raster object. Each object can be */
|
||||||
/* independently to convert an outline into a bitmap or pixmap. */
|
/* used independently to convert an outline into a bitmap or pixmap. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct FT_RasterRec_* FT_Raster;
|
typedef struct FT_RasterRec_* FT_Raster;
|
||||||
|
|
||||||
@ -868,8 +806,8 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Span */
|
/* FT_Span */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model a single span of gray (or black) pixels */
|
/* A structure used to model a single span of gray pixels when */
|
||||||
/* when rendering a monochrome or anti-aliased bitmap. */
|
/* rendering an anti-aliased bitmap. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* x :: The span's horizontal start position. */
|
/* x :: The span's horizontal start position. */
|
||||||
@ -877,13 +815,12 @@ FT_BEGIN_HEADER
|
|||||||
/* len :: The span's length in pixels. */
|
/* len :: The span's length in pixels. */
|
||||||
/* */
|
/* */
|
||||||
/* coverage :: The span color/coverage, ranging from 0 (background) */
|
/* coverage :: The span color/coverage, ranging from 0 (background) */
|
||||||
/* to 255 (foreground). Only used for anti-aliased */
|
/* to 255 (foreground). */
|
||||||
/* rendering. */
|
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* This structure is used by the span drawing callback type named */
|
/* This structure is used by the span drawing callback type named */
|
||||||
/* @FT_SpanFunc which takes the y~coordinate of the span as a */
|
/* @FT_SpanFunc that takes the y~coordinate of the span as a */
|
||||||
/* a parameter. */
|
/* parameter. */
|
||||||
/* */
|
/* */
|
||||||
/* The coverage value is always between 0 and 255. If you want less */
|
/* The coverage value is always between 0 and 255. If you want less */
|
||||||
/* gray values, the callback function has to reduce them. */
|
/* 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 */
|
/* This can be used to write anti-aliased outlines directly to a */
|
||||||
/* given background bitmap, and even perform translucency. */
|
/* 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
|
typedef void
|
||||||
(*FT_SpanFunc)( int y,
|
(*FT_SpanFunc)( int y,
|
||||||
int count,
|
int count,
|
||||||
@ -948,22 +875,7 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Raster_BitTest_Func */
|
/* FT_Raster_BitTest_Func */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
|
/* Deprecated, unimplemented. */
|
||||||
/* */
|
|
||||||
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef int
|
typedef int
|
||||||
(*FT_Raster_BitTest_Func)( int y,
|
(*FT_Raster_BitTest_Func)( int y,
|
||||||
@ -977,21 +889,7 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Raster_BitSet_Func */
|
/* FT_Raster_BitSet_Func */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
|
/* Deprecated, unimplemented. */
|
||||||
/* */
|
|
||||||
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef void
|
typedef void
|
||||||
(*FT_Raster_BitSet_Func)( int y,
|
(*FT_Raster_BitSet_Func)( int y,
|
||||||
@ -1025,8 +923,8 @@ FT_BEGIN_HEADER
|
|||||||
/* pixmap's buffer _must_ be zeroed before */
|
/* pixmap's buffer _must_ be zeroed before */
|
||||||
/* rendering. */
|
/* rendering. */
|
||||||
/* */
|
/* */
|
||||||
/* Note that for now, direct rendering is */
|
/* Direct rendering is only possible with */
|
||||||
/* only possible with anti-aliased glyphs. */
|
/* anti-aliased glyphs. */
|
||||||
/* */
|
/* */
|
||||||
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
|
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
|
||||||
/* rendering mode. If set, the output will */
|
/* rendering mode. If set, the output will */
|
||||||
@ -1044,7 +942,8 @@ FT_BEGIN_HEADER
|
|||||||
#define FT_RASTER_FLAG_DIRECT 0x2
|
#define FT_RASTER_FLAG_DIRECT 0x2
|
||||||
#define FT_RASTER_FLAG_CLIP 0x4
|
#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_default FT_RASTER_FLAG_DEFAULT
|
||||||
#define ft_raster_flag_aa FT_RASTER_FLAG_AA
|
#define ft_raster_flag_aa FT_RASTER_FLAG_AA
|
||||||
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
|
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
|
||||||
@ -1070,11 +969,11 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* gray_spans :: The gray span drawing callback. */
|
/* 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 */
|
/* user :: User-supplied data that is passed to each drawing */
|
||||||
/* callback. */
|
/* callback. */
|
||||||
@ -1091,15 +990,9 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
|
/* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
|
||||||
/* raster will call the `gray_spans' callback to draw gray pixel */
|
/* raster will call the `gray_spans' callback to draw gray pixel */
|
||||||
/* spans, in the case of an aa glyph bitmap, it will call */
|
/* spans. This allows direct composition over a pre-existing bitmap */
|
||||||
/* `black_spans', and `bit_test' and `bit_set' in the case of a */
|
/* through user-provided callbacks to perform the span drawing and */
|
||||||
/* monochrome bitmap. This allows direct composition over a */
|
/* composition. Not supported by the monochrome rasterizer. */
|
||||||
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef struct FT_Raster_Params_
|
typedef struct FT_Raster_Params_
|
||||||
{
|
{
|
||||||
@ -1107,9 +1000,9 @@ FT_BEGIN_HEADER
|
|||||||
const void* source;
|
const void* source;
|
||||||
int flags;
|
int flags;
|
||||||
FT_SpanFunc gray_spans;
|
FT_SpanFunc gray_spans;
|
||||||
FT_SpanFunc black_spans; /* doesn't work! */
|
FT_SpanFunc black_spans; /* unused */
|
||||||
FT_Raster_BitTest_Func bit_test; /* doesn't work! */
|
FT_Raster_BitTest_Func bit_test; /* unused */
|
||||||
FT_Raster_BitSet_Func bit_set; /* doesn't work! */
|
FT_Raster_BitSet_Func bit_set; /* unused */
|
||||||
void* user;
|
void* user;
|
||||||
FT_BBox clip_box;
|
FT_BBox clip_box;
|
||||||
|
|
||||||
@ -1170,26 +1063,25 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Raster_ResetFunc */
|
/* FT_Raster_ResetFunc */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* FreeType provides an area of memory called the `render pool', */
|
/* FreeType used to provide an area of memory called the `render */
|
||||||
/* available to all registered rasters. This pool can be freely used */
|
/* pool' available to all registered rasterizers. This was not */
|
||||||
/* during a given scan-conversion but is shared by all rasters. Its */
|
/* thread safe, however, and now FreeType never allocates this pool. */
|
||||||
/* content is thus transient. */
|
|
||||||
/* */
|
/* */
|
||||||
/* This function is called each time the render pool changes, or just */
|
/* This function is called after a new raster object is created. */
|
||||||
/* after a new raster object is created. */
|
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* raster :: A handle to the new raster object. */
|
/* 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> */
|
/* <Note> */
|
||||||
/* Rasters can ignore the render pool and rely on dynamic memory */
|
/* Rasterizers should rely on dynamic or stack allocation if they */
|
||||||
/* allocation if they want to (a handle to the memory allocator is */
|
/* want to (a handle to the memory allocator is passed to the */
|
||||||
/* passed to the raster constructor). However, this is not */
|
/* rasterizer constructor). */
|
||||||
/* recommended for efficiency purposes. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef void
|
typedef void
|
||||||
(*FT_Raster_ResetFunc)( FT_Raster raster,
|
(*FT_Raster_ResetFunc)( FT_Raster raster,
|
||||||
@ -1256,7 +1148,7 @@ FT_BEGIN_HEADER
|
|||||||
/* XXX: For now, the standard raster doesn't support direct */
|
/* XXX: For now, the standard raster doesn't support direct */
|
||||||
/* composition but this should change for the final release (see */
|
/* composition but this should change for the final release (see */
|
||||||
/* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
|
/* 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). */
|
/* composition). */
|
||||||
/* */
|
/* */
|
||||||
typedef int
|
typedef int
|
||||||
@ -1288,6 +1180,7 @@ FT_BEGIN_HEADER
|
|||||||
typedef struct FT_Raster_Funcs_
|
typedef struct FT_Raster_Funcs_
|
||||||
{
|
{
|
||||||
FT_Glyph_Format glyph_format;
|
FT_Glyph_Format glyph_format;
|
||||||
|
|
||||||
FT_Raster_NewFunc raster_new;
|
FT_Raster_NewFunc raster_new;
|
||||||
FT_Raster_ResetFunc raster_reset;
|
FT_Raster_ResetFunc raster_reset;
|
||||||
FT_Raster_SetModeFunc raster_set_mode;
|
FT_Raster_SetModeFunc raster_set_mode;
|
||||||
@ -1296,13 +1189,12 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
} FT_Raster_Funcs;
|
} FT_Raster_Funcs;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTIMAGE_H__ */
|
#endif /* FTIMAGE_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType incremental loading (specification). */
|
/* FreeType incremental loading (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */
|
/* Copyright 2002-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,11 +16,12 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTINCREM_H__
|
#ifndef FTINCREM_H_
|
||||||
#define __FTINCREM_H__
|
#define FTINCREM_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
#include FT_PARAMETER_TAGS_H
|
||||||
|
|
||||||
#ifdef FREETYPE_H
|
#ifdef FREETYPE_H
|
||||||
#error "freetype.h of FreeType 1 has been loaded!"
|
#error "freetype.h of FreeType 1 has been loaded!"
|
||||||
@ -45,7 +46,7 @@ FT_BEGIN_HEADER
|
|||||||
* @description:
|
* @description:
|
||||||
* This section contains various functions used to perform so-called
|
* This section contains various functions used to perform so-called
|
||||||
* `incremental' glyph loading. This is a mode where all glyphs loaded
|
* `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
|
* Apart from that, all other tables are loaded normally from the font
|
||||||
* file. This mode is useful when FreeType is used within another
|
* 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;
|
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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTINCREM_H__ */
|
#endif /* FTINCREM_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/* FreeType API for color filtering of subpixel bitmap glyphs */
|
/* FreeType API for color filtering of subpixel bitmap glyphs */
|
||||||
/* (specification). */
|
/* (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2006, 2007, 2008, 2010 by */
|
/* Copyright 2006-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -17,11 +17,12 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FT_LCD_FILTER_H__
|
#ifndef FTLCDFIL_H_
|
||||||
#define __FT_LCD_FILTER_H__
|
#define FTLCDFIL_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
#include FT_PARAMETER_TAGS_H
|
||||||
|
|
||||||
#ifdef FREETYPE_H
|
#ifdef FREETYPE_H
|
||||||
#error "freetype.h of FreeType 1 has been loaded!"
|
#error "freetype.h of FreeType 1 has been loaded!"
|
||||||
@ -41,56 +42,92 @@ FT_BEGIN_HEADER
|
|||||||
* LCD Filtering
|
* LCD Filtering
|
||||||
*
|
*
|
||||||
* @abstract:
|
* @abstract:
|
||||||
* Reduce color fringes of LCD-optimized bitmaps.
|
* Reduce color fringes of subpixel-rendered bitmaps.
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* The @FT_Library_SetLcdFilter API can be used to specify a low-pass
|
* Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your
|
||||||
* filter which is then applied to LCD-optimized bitmaps generated
|
* `ftoption.h', which enables patented ClearType-style rendering,
|
||||||
* through @FT_Render_Glyph. This is useful to reduce color fringes
|
* the LCD-optimized glyph bitmaps should be filtered to reduce color
|
||||||
* which would occur with unfiltered rendering.
|
* fringes inherent to this technology. The default FreeType LCD
|
||||||
|
* rendering uses different technology, and API described below,
|
||||||
|
* although available, does nothing.
|
||||||
*
|
*
|
||||||
* Note that no filter is active by default, and that this function is
|
* ClearType-style LCD rendering exploits the color-striped structure of
|
||||||
* *not* implemented in default builds of the library. You need to
|
* LCD pixels, increasing the available resolution in the direction of
|
||||||
* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
|
* the stripe (usually horizontal RGB) by a factor of~3. Since these
|
||||||
* in order to activate it.
|
* 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.
|
||||||
*
|
*
|
||||||
* FreeType generates alpha coverage maps, which are linear by nature.
|
* A filter should have two properties:
|
||||||
* 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
|
|
||||||
*
|
*
|
||||||
* {
|
* 1) It should be normalized, meaning the sum of the 5~components
|
||||||
* dst = alpha * src + (1 - alpha) * dst ,
|
* 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.
|
||||||
*
|
*
|
||||||
* which is known as OVER. However, when calculating the output of the
|
* 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
|
||||||
* OVER operator, the source colors should first be transformed to a
|
* where a~+ b~=~c. It distributes the computed coverage for one
|
||||||
* linear color space, then alpha blended in that space, and transformed
|
* subpixel to all subpixels equally, sacrificing some won resolution
|
||||||
* back to the output color space.
|
* 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.
|
||||||
*
|
*
|
||||||
* When linear light blending is used, the default FIR5 filtering
|
* Regarding the form, a filter can be a `boxy' filter or a `beveled'
|
||||||
* weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
|
* filter. Boxy filters are sharper but are less forgiving of non-ideal
|
||||||
* they have been designed for black on white rendering while lacking
|
* gamma curves of a screen (viewing angles!), beveled filters are
|
||||||
* gamma correction. To preserve color neutrality, weights for a FIR5
|
* fuzzier but more tolerant.
|
||||||
* filter should be chosen according to two free parameters `a' and `c',
|
|
||||||
* and the FIR weights should be
|
|
||||||
*
|
*
|
||||||
* {
|
* Examples:
|
||||||
* [a - c, a + c, 2 * a, a + c, a - c] .
|
|
||||||
* }
|
|
||||||
*
|
*
|
||||||
* This formula generates equal weights for all the color primaries
|
* - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
|
||||||
* across the filter kernel, which makes it colorless. One suggested
|
* normalized.
|
||||||
* set of weights is
|
|
||||||
*
|
*
|
||||||
* {
|
* - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
|
||||||
* [0x10, 0x50, 0x60, 0x50, 0x10] ,
|
* normalized.
|
||||||
* }
|
|
||||||
*
|
*
|
||||||
* where `a' has value 0x30 and `b' value 0x20. The weights in filter
|
* - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
|
||||||
* may have a sum larger than 0x100, which increases coloration slightly
|
* balanced.
|
||||||
* but also improves contrast.
|
*
|
||||||
|
* - [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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -111,10 +148,23 @@ FT_BEGIN_HEADER
|
|||||||
* The default filter reduces color fringes considerably, at the cost
|
* The default filter reduces color fringes considerably, at the cost
|
||||||
* of a slight blurriness in the output.
|
* 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 ::
|
* FT_LCD_FILTER_LIGHT ::
|
||||||
* The light filter is a variant that produces less blurriness at the
|
* The light filter is a variant that is sharper at the cost of
|
||||||
* cost of slightly more color fringes than the default one. It might
|
* slightly more color fringes than the default one.
|
||||||
* be better, depending on taste, your monitor, or your personal vision.
|
*
|
||||||
|
* 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 ::
|
* FT_LCD_FILTER_LEGACY ::
|
||||||
* This filter corresponds to the original libXft color filter. It
|
* This filter corresponds to the original libXft color filter. It
|
||||||
@ -126,14 +176,23 @@ FT_BEGIN_HEADER
|
|||||||
* This filter is only provided for comparison purposes, and might be
|
* This filter is only provided for comparison purposes, and might be
|
||||||
* disabled or stay unsupported in the future.
|
* 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:
|
* @since:
|
||||||
* 2.3.0
|
* 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
|
||||||
*/
|
*/
|
||||||
typedef enum FT_LcdFilter_
|
typedef enum FT_LcdFilter_
|
||||||
{
|
{
|
||||||
FT_LCD_FILTER_NONE = 0,
|
FT_LCD_FILTER_NONE = 0,
|
||||||
FT_LCD_FILTER_DEFAULT = 1,
|
FT_LCD_FILTER_DEFAULT = 1,
|
||||||
FT_LCD_FILTER_LIGHT = 2,
|
FT_LCD_FILTER_LIGHT = 2,
|
||||||
|
FT_LCD_FILTER_LEGACY1 = 3,
|
||||||
FT_LCD_FILTER_LEGACY = 16,
|
FT_LCD_FILTER_LEGACY = 16,
|
||||||
|
|
||||||
FT_LCD_FILTER_MAX /* do not remove */
|
FT_LCD_FILTER_MAX /* do not remove */
|
||||||
@ -176,22 +235,6 @@ FT_BEGIN_HEADER
|
|||||||
* defined in your build of the library, which should correspond to all
|
* defined in your build of the library, which should correspond to all
|
||||||
* default builds of FreeType.
|
* 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:
|
* @since:
|
||||||
* 2.3.0
|
* 2.3.0
|
||||||
*/
|
*/
|
||||||
@ -206,11 +249,8 @@ FT_BEGIN_HEADER
|
|||||||
* FT_Library_SetLcdFilterWeights
|
* FT_Library_SetLcdFilterWeights
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Use this function to override the filter weights selected by
|
* This function can be used to enable LCD filter with custom weights,
|
||||||
* @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
|
* instead of using presets in @FT_Library_SetLcdFilter.
|
||||||
* (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:
|
* @input:
|
||||||
* library ::
|
* library ::
|
||||||
@ -230,8 +270,8 @@ FT_BEGIN_HEADER
|
|||||||
* defined in your build of the library, which should correspond to all
|
* defined in your build of the library, which should correspond to all
|
||||||
* default builds of FreeType.
|
* default builds of FreeType.
|
||||||
*
|
*
|
||||||
* This function must be called after @FT_Library_SetLcdFilter to have
|
* LCD filter weights can also be set per face using @FT_Face_Properties
|
||||||
* any effect.
|
* with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
|
||||||
*
|
*
|
||||||
* @since:
|
* @since:
|
||||||
* 2.4.0
|
* 2.4.0
|
||||||
@ -240,12 +280,30 @@ FT_BEGIN_HEADER
|
|||||||
FT_Library_SetLcdFilterWeights( FT_Library library,
|
FT_Library_SetLcdFilterWeights( FT_Library library,
|
||||||
unsigned char *weights );
|
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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FT_LCD_FILTER_H__ */
|
#endif /* FTLCDFIL_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Generic list support for FreeType (specification). */
|
/* Generic list support for FreeType (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2003, 2007, 2010 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -24,8 +24,8 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTLIST_H__
|
#ifndef FTLIST_H_
|
||||||
#define __FTLIST_H__
|
#define FTLIST_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -173,7 +173,7 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_List_Iterator */
|
/* FT_List_Iterator */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <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. */
|
/* by @FT_List_Iterate. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
@ -200,7 +200,7 @@ FT_BEGIN_HEADER
|
|||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* list :: A handle to the list. */
|
/* list :: A handle to the list. */
|
||||||
/* iterator :: An iterator function, called on each node of 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. */
|
/* argument to the iterator. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
@ -218,7 +218,7 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_List_Destructor */
|
/* FT_List_Destructor */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <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 */
|
/* finalization by @FT_List_Finalize to destroy all elements in a */
|
||||||
/* given list. */
|
/* given list. */
|
||||||
/* */
|
/* */
|
||||||
@ -248,11 +248,11 @@ FT_BEGIN_HEADER
|
|||||||
/* list :: A handle to the list. */
|
/* list :: A handle to the list. */
|
||||||
/* */
|
/* */
|
||||||
/* destroy :: A list destructor that will be applied to each element */
|
/* 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. */
|
/* argument to the destructor. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
@ -265,13 +265,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_Memory memory,
|
FT_Memory memory,
|
||||||
void* user );
|
void* user );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTLIST_H__ */
|
#endif /* FTLIST_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* LZW-compressed stream support. */
|
/* LZW-compressed stream support. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2006 by */
|
/* Copyright 2004-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTLZW_H__
|
#ifndef FTLZW_H_
|
||||||
#define __FTLZW_H__
|
#define FTLZW_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -88,12 +88,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_Stream_OpenLZW( FT_Stream stream,
|
FT_Stream_OpenLZW( FT_Stream stream,
|
||||||
FT_Stream source );
|
FT_Stream source );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTLZW_H__ */
|
#endif /* FTLZW_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Additional Mac-specific API. */
|
/* 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. */
|
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -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 */
|
/* Mac-specific headers (because this header uses Mac types such as */
|
||||||
/* Handle, FSSpec, FSRef, etc.) */
|
/* Handle, FSSpec, FSRef, etc.) */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTMAC_H__
|
#ifndef FTMAC_H_
|
||||||
#define __FTMAC_H__
|
#define FTMAC_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -35,11 +35,12 @@
|
|||||||
FT_BEGIN_HEADER
|
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
|
#ifndef FT_DEPRECATED_ATTRIBUTE
|
||||||
#if defined(__GNUC__) && \
|
#if defined( __GNUC__ ) && \
|
||||||
((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
( ( __GNUC__ >= 4 ) || \
|
||||||
#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 1 ) ) )
|
||||||
|
#define FT_DEPRECATED_ATTRIBUTE __attribute__(( deprecated ))
|
||||||
#else
|
#else
|
||||||
#define FT_DEPRECATED_ATTRIBUTE
|
#define FT_DEPRECATED_ATTRIBUTE
|
||||||
#endif
|
#endif
|
||||||
@ -168,7 +169,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Return a pathname of the disk file and face index for given font */
|
/* 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> */
|
/* <Input> */
|
||||||
/* fontName :: Mac OS name of the font in ATS framework. */
|
/* fontName :: Mac OS name of the font in ATS framework. */
|
||||||
@ -268,7 +269,7 @@ FT_BEGIN_HEADER
|
|||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FTMAC_H__ */
|
#endif /* FTMAC_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType Multiple Master font interface (specification). */
|
/* FreeType Multiple Master font interface (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTMM_H__
|
#ifndef FTMM_H_
|
||||||
#define __FTMM_H__
|
#define FTMM_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -43,11 +43,10 @@ FT_BEGIN_HEADER
|
|||||||
/* Master fonts, i.e., the selection of specific design instances by */
|
/* Master fonts, i.e., the selection of specific design instances by */
|
||||||
/* setting design axis coordinates. */
|
/* setting design axis coordinates. */
|
||||||
/* */
|
/* */
|
||||||
/* George Williams has extended this interface to make it work with */
|
/* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */
|
||||||
/* both Type~1 Multiple Masters fonts and GX distortable (var) */
|
/* and OpenType variation fonts. Some of the routines only work with */
|
||||||
/* fonts. Some of these routines only work with MM fonts, others */
|
/* Adobe MM fonts, others will work with all three types. They are */
|
||||||
/* will work with both types. They are similar enough that a */
|
/* similar enough that a consistent interface makes sense. */
|
||||||
/* consistent interface makes sense. */
|
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
@ -58,10 +57,11 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_MM_Axis */
|
/* FT_MM_Axis */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A simple structure used to model a given axis in design space for */
|
/* A structure to model a given axis in design space for Multiple */
|
||||||
/* Multiple Masters fonts. */
|
/* Masters fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* This structure can't be used for GX var fonts. */
|
/* This structure can't be used for TrueType GX or OpenType variation */
|
||||||
|
/* fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* name :: The axis's name. */
|
/* name :: The axis's name. */
|
||||||
@ -85,18 +85,19 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Multi_Master */
|
/* FT_Multi_Master */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model the axes and space of a Multiple Masters */
|
/* A structure to model the axes and space of a Multiple Masters */
|
||||||
/* font. */
|
/* font. */
|
||||||
/* */
|
/* */
|
||||||
/* This structure can't be used for GX var fonts. */
|
/* This structure can't be used for TrueType GX or OpenType variation */
|
||||||
|
/* fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* num_axis :: Number of axes. Cannot exceed~4. */
|
/* num_axis :: Number of axes. Cannot exceed~4. */
|
||||||
/* */
|
/* */
|
||||||
/* num_designs :: Number of designs; should be normally 2^num_axis */
|
/* num_designs :: Number of designs; should be normally 2^num_axis */
|
||||||
/* even though the Type~1 specification strangely */
|
/* even though the Type~1 specification strangely */
|
||||||
/* allows for intermediate designs to be present. This */
|
/* allows for intermediate designs to be present. */
|
||||||
/* number cannot exceed~16. */
|
/* This number cannot exceed~16. */
|
||||||
/* */
|
/* */
|
||||||
/* axis :: A table of axis descriptors. */
|
/* axis :: A table of axis descriptors. */
|
||||||
/* */
|
/* */
|
||||||
@ -115,27 +116,35 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Var_Axis */
|
/* FT_Var_Axis */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A simple structure used to model a given axis in design space for */
|
/* A structure to model a given axis in design space for Multiple */
|
||||||
/* Multiple Masters and GX var fonts. */
|
/* Masters, TrueType GX, and OpenType variation fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* name :: The axis's name. */
|
/* name :: The axis's name. */
|
||||||
/* Not always meaningful for GX. */
|
/* Not always meaningful for TrueType GX or OpenType */
|
||||||
|
/* variation fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* minimum :: The axis's minimum design coordinate. */
|
/* minimum :: The axis's minimum design coordinate. */
|
||||||
/* */
|
/* */
|
||||||
/* def :: The axis's default design coordinate. */
|
/* def :: The axis's default design coordinate. */
|
||||||
/* FreeType computes meaningful default values for MM; it */
|
/* FreeType computes meaningful default values for Adobe */
|
||||||
/* is then an integer value, not in 16.16 format. */
|
/* MM fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* maximum :: The axis's maximum design coordinate. */
|
/* maximum :: The axis's maximum design coordinate. */
|
||||||
/* */
|
/* */
|
||||||
/* tag :: The axis's tag (the GX equivalent to `name'). */
|
/* tag :: The axis's tag (the equivalent to `name' for TrueType */
|
||||||
/* FreeType provides default values for MM if possible. */
|
/* GX and OpenType variation fonts). FreeType provides */
|
||||||
|
/* default values for Adobe MM fonts if possible. */
|
||||||
/* */
|
/* */
|
||||||
/* strid :: The entry in `name' table (another GX version of */
|
/* strid :: The axis name entry in the font's `name' table. This */
|
||||||
/* `name'). */
|
/* is another (and often better) version of the `name' */
|
||||||
/* Not meaningful for MM. */
|
/* 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_
|
typedef struct FT_Var_Axis_
|
||||||
{
|
{
|
||||||
@ -157,20 +166,26 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Var_Named_Style */
|
/* FT_Var_Named_Style */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A simple structure used to model a named style in a GX var font. */
|
/* A structure to model a named instance in a TrueType GX or OpenType */
|
||||||
|
/* variation font. */
|
||||||
/* */
|
/* */
|
||||||
/* This structure can't be used for MM fonts. */
|
/* This structure can't be used for Adobe MM fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* coords :: The design coordinates for this style. */
|
/* coords :: The design coordinates for this instance. */
|
||||||
/* This is an array with one entry for each axis. */
|
/* This is an array with one entry for each axis. */
|
||||||
/* */
|
/* */
|
||||||
/* strid :: The entry in `name' table identifying this style. */
|
/* 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_
|
typedef struct FT_Var_Named_Style_
|
||||||
{
|
{
|
||||||
FT_Fixed* coords;
|
FT_Fixed* coords;
|
||||||
FT_UInt strid;
|
FT_UInt strid;
|
||||||
|
FT_UInt psid; /* since 2.7.1 */
|
||||||
|
|
||||||
} FT_Var_Named_Style;
|
} FT_Var_Named_Style;
|
||||||
|
|
||||||
@ -181,31 +196,43 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_MM_Var */
|
/* FT_MM_Var */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model the axes and space of a Multiple Masters */
|
/* A structure to model the axes and space of an Adobe MM, TrueType */
|
||||||
/* or GX var distortable font. */
|
/* GX, or OpenType variation font. */
|
||||||
/* */
|
/* */
|
||||||
/* Some fields are specific to one format and not to the other. */
|
/* Some fields are specific to one format and not to the others. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* num_axis :: The number of axes. The maximum value is~4 for */
|
/* num_axis :: The number of axes. The maximum value is~4 for */
|
||||||
/* MM; no limit in GX. */
|
/* Adobe MM fonts; no limit in TrueType GX or */
|
||||||
|
/* OpenType variation fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* num_designs :: The number of designs; should be normally */
|
/* num_designs :: The number of designs; should be normally */
|
||||||
/* 2^num_axis for MM fonts. Not meaningful for GX */
|
/* 2^num_axis for Adobe MM fonts. Not meaningful */
|
||||||
|
/* for TrueType GX or OpenType variation fonts */
|
||||||
/* (where every glyph could have a different */
|
/* (where every glyph could have a different */
|
||||||
/* number of designs). */
|
/* number of designs). */
|
||||||
/* */
|
/* */
|
||||||
/* num_namedstyles :: The number of named styles; only meaningful for */
|
/* num_namedstyles :: The number of named styles; a `named style' is */
|
||||||
/* GX which allows certain design coordinates to */
|
/* a tuple of design coordinates that has a string */
|
||||||
/* have a string ID (in the `name' table) */
|
/* ID (in the `name' table) associated with it. */
|
||||||
/* associated with them. The font can tell the */
|
/* The font can tell the user that, for example, */
|
||||||
/* user that, for example, Weight=1.5 is `Bold'. */
|
/* [Weight=1.5,Width=1.1] is `Bold'. Another name */
|
||||||
|
/* for `named style' is `named instance'. */
|
||||||
/* */
|
/* */
|
||||||
/* axis :: A table of axis descriptors. */
|
/* For Adobe Multiple Masters fonts, this value is */
|
||||||
/* GX fonts contain slightly more data than MM. */
|
/* always zero because the format does not support */
|
||||||
|
/* named styles. */
|
||||||
/* */
|
/* */
|
||||||
/* namedstyles :: A table of named styles. */
|
/* axis :: An axis descriptor table. */
|
||||||
/* Only meaningful with GX. */
|
/* 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_
|
typedef struct FT_MM_Var_
|
||||||
{
|
{
|
||||||
@ -218,18 +245,16 @@ FT_BEGIN_HEADER
|
|||||||
} FT_MM_Var;
|
} FT_MM_Var;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Function> */
|
/* <Function> */
|
||||||
/* FT_Get_Multi_Master */
|
/* FT_Get_Multi_Master */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Retrieve the Multiple Master descriptor of a given font. */
|
/* Retrieve a variation descriptor of a given Adobe MM font. */
|
||||||
/* */
|
/* */
|
||||||
/* This function can't be used with GX fonts. */
|
/* This function can't be used with TrueType GX or OpenType variation */
|
||||||
|
/* fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the source face. */
|
/* face :: A handle to the source face. */
|
||||||
@ -251,15 +276,17 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Get_MM_Var */
|
/* FT_Get_MM_Var */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Retrieve the Multiple Master/GX var descriptor of a given font. */
|
/* Retrieve a variation descriptor for a given font. */
|
||||||
|
/* */
|
||||||
|
/* This function works with all supported variation formats. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the source face. */
|
/* face :: A handle to the source face. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* amaster :: The Multiple Masters/GX var descriptor. */
|
/* amaster :: The variation descriptor. */
|
||||||
/* Allocates a data structure, which the user must free */
|
/* Allocates a data structure, which the user must */
|
||||||
/* (a single call to FT_FREE will do it). */
|
/* deallocate with a call to @FT_Done_MM_Var after use. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* FreeType error code. 0~means success. */
|
||||||
@ -269,29 +296,61 @@ FT_BEGIN_HEADER
|
|||||||
FT_MM_Var* *amaster );
|
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> */
|
/* <Function> */
|
||||||
/* FT_Set_MM_Design_Coordinates */
|
/* FT_Set_MM_Design_Coordinates */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* For Multiple Masters fonts, choose an interpolated font design */
|
/* For Adobe MM fonts, choose an interpolated font design through */
|
||||||
/* through design coordinates. */
|
/* design coordinates. */
|
||||||
/* */
|
/* */
|
||||||
/* This function can't be used with GX fonts. */
|
/* This function can't be used with TrueType GX or OpenType variation */
|
||||||
|
/* fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <InOut> */
|
||||||
/* face :: A handle to the source face. */
|
/* face :: A handle to the source face. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* num_coords :: The number of design coordinates (must be equal to */
|
/* num_coords :: The number of available design coordinates. If it */
|
||||||
/* the number of axes in the font). */
|
/* 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. */
|
/* coords :: An array of design coordinates. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Set_MM_Design_Coordinates( FT_Face face,
|
FT_Set_MM_Design_Coordinates( FT_Face face,
|
||||||
FT_UInt num_coords,
|
FT_UInt num_coords,
|
||||||
@ -304,55 +363,153 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Set_Var_Design_Coordinates */
|
/* FT_Set_Var_Design_Coordinates */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* For Multiple Master or GX Var fonts, choose an interpolated font */
|
/* Choose an interpolated font design through design coordinates. */
|
||||||
/* design through design coordinates. */
|
/* */
|
||||||
|
/* This function works with all supported variation formats. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <InOut> */
|
||||||
/* face :: A handle to the source face. */
|
/* face :: A handle to the source face. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* num_coords :: The number of design coordinates (must be equal to */
|
/* num_coords :: The number of available design coordinates. If it */
|
||||||
/* the number of axes in the font). */
|
/* 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. */
|
/* coords :: An array of design coordinates. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Set_Var_Design_Coordinates( FT_Face face,
|
FT_Set_Var_Design_Coordinates( FT_Face face,
|
||||||
FT_UInt num_coords,
|
FT_UInt num_coords,
|
||||||
FT_Fixed* 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> */
|
/* <Function> */
|
||||||
/* FT_Set_MM_Blend_Coordinates */
|
/* FT_Set_MM_Blend_Coordinates */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* For Multiple Masters and GX var fonts, choose an interpolated font */
|
/* Choose an interpolated font design through normalized blend */
|
||||||
/* design through normalized blend coordinates. */
|
/* coordinates. */
|
||||||
|
/* */
|
||||||
|
/* This function works with all supported variation formats. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <InOut> */
|
||||||
/* face :: A handle to the source face. */
|
/* face :: A handle to the source face. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* num_coords :: The number of design coordinates (must be equal to */
|
/* num_coords :: The number of available design coordinates. If it */
|
||||||
/* the number of axes in the font). */
|
/* 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 */
|
/* coords :: The design coordinates array (each element must be */
|
||||||
/* between 0 and 1.0). */
|
/* between 0 and 1.0 for Adobe MM fonts, and between */
|
||||||
|
/* -1.0 and 1.0 for TrueType GX and OpenType variation */
|
||||||
|
/* fonts). */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Set_MM_Blend_Coordinates( FT_Face face,
|
FT_Set_MM_Blend_Coordinates( FT_Face face,
|
||||||
FT_UInt num_coords,
|
FT_UInt num_coords,
|
||||||
FT_Fixed* 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> */
|
/* <Function> */
|
||||||
@ -367,12 +524,115 @@ FT_BEGIN_HEADER
|
|||||||
FT_Fixed* 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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTMM_H__ */
|
#endif /* FTMM_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType modules public interface (specification). */
|
/* FreeType modules public interface (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2003, 2006, 2008-2010, 2012 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTMODAPI_H__
|
#ifndef FTMODAPI_H_
|
||||||
#define __FTMODAPI_H__
|
#define FTMODAPI_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -63,7 +63,7 @@ FT_BEGIN_HEADER
|
|||||||
/* psaux */
|
/* psaux */
|
||||||
/* pshinter */
|
/* pshinter */
|
||||||
/* psnames */
|
/* psnames */
|
||||||
/* raster1, raster5 */
|
/* raster1 */
|
||||||
/* sfnt */
|
/* sfnt */
|
||||||
/* smooth, smooth-lcd, smooth-lcdv */
|
/* smooth, smooth-lcd, smooth-lcdv */
|
||||||
/* truetype */
|
/* truetype */
|
||||||
@ -75,6 +75,34 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* Note that the FreeType Cache sub-system is not a FreeType module. */
|
/* 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 */
|
||||||
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
@ -84,12 +112,14 @@ FT_BEGIN_HEADER
|
|||||||
#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */
|
#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */
|
||||||
#define FT_MODULE_STYLER 8 /* this module is a styler */
|
#define FT_MODULE_STYLER 8 /* this module is a styler */
|
||||||
|
|
||||||
#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
|
#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
|
||||||
/* scalable fonts */
|
/* scalable fonts */
|
||||||
#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
|
#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
|
||||||
/* support vector outlines */
|
/* support vector outlines */
|
||||||
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
||||||
/* own hinter */
|
/* own hinter */
|
||||||
|
#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */
|
||||||
|
/* produces LIGHT hints */
|
||||||
|
|
||||||
|
|
||||||
/* deprecated values */
|
/* deprecated values */
|
||||||
@ -98,9 +128,10 @@ FT_BEGIN_HEADER
|
|||||||
#define ft_module_hinter FT_MODULE_HINTER
|
#define ft_module_hinter FT_MODULE_HINTER
|
||||||
#define ft_module_styler FT_MODULE_STYLER
|
#define ft_module_styler FT_MODULE_STYLER
|
||||||
|
|
||||||
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
||||||
#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
|
#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_has_hinter FT_MODULE_DRIVER_HAS_HINTER
|
||||||
|
#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY
|
||||||
|
|
||||||
|
|
||||||
typedef FT_Pointer FT_Module_Interface;
|
typedef FT_Pointer FT_Module_Interface;
|
||||||
@ -292,16 +323,15 @@ FT_BEGIN_HEADER
|
|||||||
* The module name.
|
* The module name.
|
||||||
*
|
*
|
||||||
* property_name ::
|
* property_name ::
|
||||||
* The property name. Properties are described in the `Synopsis'
|
* The property name. Properties are described in section
|
||||||
* subsection of the module's documentation.
|
* @properties.
|
||||||
*
|
*
|
||||||
* Note that only a few modules have properties.
|
* Note that only a few modules have properties.
|
||||||
*
|
*
|
||||||
* value ::
|
* 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
|
* value of the property. The exact definition of `value' is
|
||||||
* dependent on the property; see the `Synopsis' subsection of the
|
* dependent on the property; see section @properties.
|
||||||
* module's documentation.
|
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* FreeType error code. 0~means success.
|
* FreeType error code. 0~means success.
|
||||||
@ -322,14 +352,21 @@ FT_BEGIN_HEADER
|
|||||||
* FT_Property_Set( library, "foo", "bar", &bar );
|
* 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
|
* 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:
|
* @since:
|
||||||
* 2.4.11
|
* 2.4.11
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
FT_Error
|
FT_EXPORT( FT_Error )
|
||||||
FT_Property_Set( FT_Library library,
|
FT_Property_Set( FT_Library library,
|
||||||
const FT_String* module_name,
|
const FT_String* module_name,
|
||||||
const FT_String* property_name,
|
const FT_String* property_name,
|
||||||
@ -352,15 +389,14 @@ FT_BEGIN_HEADER
|
|||||||
* The module name.
|
* The module name.
|
||||||
*
|
*
|
||||||
* property_name ::
|
* property_name ::
|
||||||
* The property name. Properties are described in the `Synopsis'
|
* The property name. Properties are described in section
|
||||||
* subsection of the module's documentation.
|
* @properties.
|
||||||
*
|
*
|
||||||
* @inout:
|
* @inout:
|
||||||
* value ::
|
* 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
|
* value of the property. The exact definition of `value' is
|
||||||
* dependent on the property; see the `Synopsis' subsection of the
|
* dependent on the property; see section @properties.
|
||||||
* module's documentation.
|
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* FreeType error code. 0~means success.
|
* FreeType error code. 0~means success.
|
||||||
@ -393,13 +429,57 @@ FT_BEGIN_HEADER
|
|||||||
* 2.4.11
|
* 2.4.11
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
FT_Error
|
FT_EXPORT( FT_Error )
|
||||||
FT_Property_Get( FT_Library library,
|
FT_Property_Get( FT_Library library,
|
||||||
const FT_String* module_name,
|
const FT_String* module_name,
|
||||||
const FT_String* property_name,
|
const FT_String* property_name,
|
||||||
void* value );
|
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> */
|
/* <Function> */
|
||||||
@ -411,7 +491,7 @@ FT_BEGIN_HEADER
|
|||||||
/* @FT_Done_Library then only destroys a library if the counter is~1, */
|
/* @FT_Done_Library then only destroys a library if the counter is~1, */
|
||||||
/* otherwise it simply decrements the counter. */
|
/* 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. */
|
/* reference @FT_Library objects. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
@ -435,11 +515,14 @@ FT_BEGIN_HEADER
|
|||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* This function is used to create a new FreeType library instance */
|
/* This function is used to create a new FreeType library instance */
|
||||||
/* from a given memory object. It is thus possible to use libraries */
|
/* 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 */
|
/* Normally, you would call this function (followed by a call to */
|
||||||
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
|
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, */
|
||||||
/* instead of @FT_Init_FreeType to initialize the FreeType library. */
|
/* 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 */
|
/* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */
|
||||||
/* library instance. */
|
/* library instance. */
|
||||||
@ -484,7 +567,7 @@ FT_BEGIN_HEADER
|
|||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Done_Library( FT_Library library );
|
FT_Done_Library( FT_Library library );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
typedef void
|
typedef void
|
||||||
(*FT_DebugHook_Func)( void* arg );
|
(*FT_DebugHook_Func)( void* arg );
|
||||||
@ -574,12 +657,7 @@ FT_BEGIN_HEADER
|
|||||||
* The library doesn't implement any kind of bytecode interpreter.
|
* The library doesn't implement any kind of bytecode interpreter.
|
||||||
*
|
*
|
||||||
* FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
|
* FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
|
||||||
* The library implements a bytecode interpreter that doesn't
|
* Deprecated and removed.
|
||||||
* 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.
|
|
||||||
*
|
*
|
||||||
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
|
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
|
||||||
* The library implements a bytecode interpreter that covers
|
* The library implements a bytecode interpreter that covers
|
||||||
@ -622,13 +700,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_EXPORT( FT_TrueTypeEngineType )
|
FT_EXPORT( FT_TrueTypeEngineType )
|
||||||
FT_Get_TrueType_Engine_Type( FT_Library library );
|
FT_Get_TrueType_Engine_Type( FT_Library library );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTMODAPI_H__ */
|
#endif /* FTMODAPI_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType module error offsets (specification). */
|
/* FreeType module error offsets (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2001-2005, 2010, 2013 by */
|
/* Copyright 2001-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -74,7 +74,7 @@
|
|||||||
/* with something like */
|
/* with something like */
|
||||||
/* */
|
/* */
|
||||||
/* { */
|
/* { */
|
||||||
/* #undef __FTMODERR_H__ */
|
/* #undef FTMODERR_H_ */
|
||||||
/* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */
|
/* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */
|
||||||
/* #define FT_MODERR_START_LIST { */
|
/* #define FT_MODERR_START_LIST { */
|
||||||
/* #define FT_MODERR_END_LIST { 0, 0 } }; */
|
/* #define FT_MODERR_END_LIST { 0, 0 } }; */
|
||||||
@ -91,8 +91,8 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTMODERR_H__
|
#ifndef FTMODERR_H_
|
||||||
#define __FTMODERR_H__
|
#define FTMODERR_H_
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
@ -188,7 +188,7 @@
|
|||||||
#undef FT_NEED_EXTERN_C
|
#undef FT_NEED_EXTERN_C
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FTMODERR_H__ */
|
#endif /* FTMODERR_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType API for validating OpenType tables (specification). */
|
/* FreeType API for validating OpenType tables (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2005, 2006, 2007 by */
|
/* Copyright 2004-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -27,8 +27,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTOTVAL_H__
|
#ifndef FTOTVAL_H_
|
||||||
#define __FTOTVAL_H__
|
#define FTOTVAL_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -58,6 +58,12 @@ FT_BEGIN_HEADER
|
|||||||
/* This section contains the declaration of functions to validate */
|
/* This section contains the declaration of functions to validate */
|
||||||
/* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */
|
/* 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_JSTF 0x1000
|
||||||
#define FT_VALIDATE_MATH 0x2000
|
#define FT_VALIDATE_MATH 0x2000
|
||||||
|
|
||||||
#define FT_VALIDATE_OT FT_VALIDATE_BASE | \
|
#define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \
|
||||||
FT_VALIDATE_GDEF | \
|
FT_VALIDATE_GDEF | \
|
||||||
FT_VALIDATE_GPOS | \
|
FT_VALIDATE_GPOS | \
|
||||||
FT_VALIDATE_GSUB | \
|
FT_VALIDATE_GSUB | \
|
||||||
FT_VALIDATE_JSTF | \
|
FT_VALIDATE_JSTF | \
|
||||||
FT_VALIDATE_MATH
|
FT_VALIDATE_MATH )
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
@ -116,7 +120,7 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Validate various OpenType tables to assure that all offsets and
|
* 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
|
* actually does the text layout can access those tables without
|
||||||
* error checking (which can be quite time consuming).
|
* error checking (which can be quite time consuming).
|
||||||
*
|
*
|
||||||
@ -125,7 +129,7 @@ FT_BEGIN_HEADER
|
|||||||
* A handle to the input face.
|
* A handle to the input face.
|
||||||
*
|
*
|
||||||
* validation_flags ::
|
* 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.
|
* @FT_VALIDATE_OTXXX for possible values.
|
||||||
*
|
*
|
||||||
* @output:
|
* @output:
|
||||||
@ -165,8 +169,6 @@ FT_BEGIN_HEADER
|
|||||||
FT_Bytes *GSUB_table,
|
FT_Bytes *GSUB_table,
|
||||||
FT_Bytes *JSTF_table );
|
FT_Bytes *JSTF_table );
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
@ -191,13 +193,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_OpenType_Free( FT_Face face,
|
FT_OpenType_Free( FT_Face face,
|
||||||
FT_Bytes table );
|
FT_Bytes table );
|
||||||
|
|
||||||
|
/* */
|
||||||
/* */
|
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTOTVAL_H__ */
|
#endif /* FTOTVAL_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/* Support for the FT_Outline type used to store glyph shapes of */
|
/* Support for the FT_Outline type used to store glyph shapes of */
|
||||||
/* most scalable font formats (specification). */
|
/* most scalable font formats (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2003, 2005-2012 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -17,8 +17,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTOUTLN_H__
|
#ifndef FTOUTLN_H_
|
||||||
#define __FTOUTLN_H__
|
#define FTOUTLN_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -52,7 +52,6 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Order> */
|
/* <Order> */
|
||||||
/* FT_Outline */
|
/* FT_Outline */
|
||||||
/* FT_OUTLINE_FLAGS */
|
|
||||||
/* FT_Outline_New */
|
/* FT_Outline_New */
|
||||||
/* FT_Outline_Done */
|
/* FT_Outline_Done */
|
||||||
/* FT_Outline_Copy */
|
/* FT_Outline_Copy */
|
||||||
@ -68,13 +67,17 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* FT_Outline_Get_Bitmap */
|
/* FT_Outline_Get_Bitmap */
|
||||||
/* FT_Outline_Render */
|
/* FT_Outline_Render */
|
||||||
/* */
|
|
||||||
/* FT_Outline_Decompose */
|
/* FT_Outline_Decompose */
|
||||||
/* FT_Outline_Funcs */
|
/* FT_Outline_Funcs */
|
||||||
/* FT_Outline_MoveTo_Func */
|
/* FT_Outline_MoveToFunc */
|
||||||
/* FT_Outline_LineTo_Func */
|
/* FT_Outline_LineToFunc */
|
||||||
/* FT_Outline_ConicTo_Func */
|
/* FT_Outline_ConicToFunc */
|
||||||
/* FT_Outline_CubicTo_Func */
|
/* FT_Outline_CubicToFunc */
|
||||||
|
/* */
|
||||||
|
/* FT_Orientation */
|
||||||
|
/* FT_Outline_Get_Orientation */
|
||||||
|
/* */
|
||||||
|
/* FT_OUTLINE_XXX */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
@ -86,7 +89,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Walk over an outline's structure to decompose it into individual */
|
/* 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. */
|
/* operations to indicate the start of new contours in the outline. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
@ -97,7 +100,7 @@ FT_BEGIN_HEADER
|
|||||||
/* operations. */
|
/* operations. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <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 */
|
/* emitter during the decomposition. It can be */
|
||||||
/* used to store the state during the */
|
/* used to store the state during the */
|
||||||
/* decomposition. */
|
/* decomposition. */
|
||||||
@ -105,6 +108,17 @@ FT_BEGIN_HEADER
|
|||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Outline_Decompose( FT_Outline* outline,
|
FT_Outline_Decompose( FT_Outline* outline,
|
||||||
const FT_Outline_Funcs* func_interface,
|
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 */
|
/* If the outline's `owner' field is not set, only the outline */
|
||||||
/* descriptor will be released. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Outline_Done( FT_Library library,
|
FT_Outline_Done( FT_Library library,
|
||||||
FT_Outline* outline );
|
FT_Outline* outline );
|
||||||
@ -203,6 +214,10 @@ FT_BEGIN_HEADER
|
|||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0~means success. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Outline_Check( FT_Outline* outline );
|
FT_Outline_Check( FT_Outline* outline );
|
||||||
|
|
||||||
@ -214,15 +229,15 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Return an outline's `control box'. The control box encloses all */
|
/* 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 */
|
/* coincides with the exact bounding box for most glyphs, it can be */
|
||||||
/* slightly larger in some situations (like when rotating an outline */
|
/* 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 */
|
/* 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 */
|
/* 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 */
|
/* 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> */
|
/* <Input> */
|
||||||
/* outline :: A pointer to the source outline descriptor. */
|
/* outline :: A pointer to the source outline descriptor. */
|
||||||
@ -344,10 +359,13 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* { */
|
/* { */
|
||||||
/* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
|
/* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
|
||||||
/* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */
|
/* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) */
|
||||||
/* FT_Outline_Embolden( &face->slot->outline, strength ); */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Outline_Embolden( FT_Outline* outline,
|
FT_Outline_Embolden( FT_Outline* outline,
|
||||||
FT_Pos strength );
|
FT_Pos strength );
|
||||||
@ -364,6 +382,9 @@ FT_BEGIN_HEADER
|
|||||||
/* @FT_Outline_Embolden, which uses the same strength in both */
|
/* @FT_Outline_Embolden, which uses the same strength in both */
|
||||||
/* directions. */
|
/* directions. */
|
||||||
/* */
|
/* */
|
||||||
|
/* <Since> */
|
||||||
|
/* 2.4.10 */
|
||||||
|
/* */
|
||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Outline_EmboldenXY( FT_Outline* outline,
|
FT_Outline_EmboldenXY( FT_Outline* outline,
|
||||||
FT_Pos xstrength,
|
FT_Pos xstrength,
|
||||||
@ -525,9 +546,11 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* This function analyzes a glyph outline and tries to compute its
|
* This function analyzes a glyph outline and tries to compute its
|
||||||
* fill orientation (see @FT_Orientation). This is done by computing
|
* fill orientation (see @FT_Orientation). This is done by integrating
|
||||||
* the direction of each global horizontal and/or vertical extrema
|
* the total area covered by the outline. The positive integral
|
||||||
* within the outline.
|
* 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
|
* Note that this will return @FT_ORIENTATION_TRUETYPE for empty
|
||||||
* outlines.
|
* outlines.
|
||||||
@ -543,13 +566,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_EXPORT( FT_Orientation )
|
FT_EXPORT( FT_Orientation )
|
||||||
FT_Outline_Get_Orientation( FT_Outline* outline );
|
FT_Outline_Get_Orientation( FT_Outline* outline );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTOUTLN_H__ */
|
#endif /* FTOUTLN_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
205
portlibs/include/freetype/ftparams.h
Normal file
205
portlibs/include/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). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTPFR_H__
|
#ifndef FTPFR_H_
|
||||||
#define __FTPFR_H__
|
#define FTPFR_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -71,7 +71,7 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* ametrics_x_scale ::
|
* ametrics_x_scale ::
|
||||||
* A 16.16 fixed-point number used to scale distance expressed
|
* 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
|
* `face->size->x_scale', but for metrics only. Optional (parameter
|
||||||
* can be NULL).
|
* can be NULL).
|
||||||
*
|
*
|
||||||
@ -123,7 +123,7 @@ FT_BEGIN_HEADER
|
|||||||
* mode, which always returns distances converted to outline units.
|
* mode, which always returns distances converted to outline units.
|
||||||
*
|
*
|
||||||
* You can use the value of the `x_scale' and `y_scale' parameters
|
* 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_EXPORT( FT_Error )
|
||||||
FT_Get_PFR_Kerning( FT_Face face,
|
FT_Get_PFR_Kerning( FT_Face face,
|
||||||
@ -154,19 +154,19 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @note:
|
* @note:
|
||||||
* You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
|
* 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_EXPORT( FT_Error )
|
||||||
FT_Get_PFR_Advance( FT_Face face,
|
FT_Get_PFR_Advance( FT_Face face,
|
||||||
FT_UInt gindex,
|
FT_UInt gindex,
|
||||||
FT_Pos *aadvance );
|
FT_Pos *aadvance );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTPFR_H__ */
|
#endif /* FTPFR_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType renderer modules public interface (specification). */
|
/* FreeType renderer modules public interface (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2005, 2006, 2010 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTRENDER_H__
|
#ifndef FTRENDER_H_
|
||||||
#define __FTRENDER_H__
|
#define FTRENDER_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -75,6 +75,7 @@ FT_BEGIN_HEADER
|
|||||||
{
|
{
|
||||||
FT_Long glyph_size;
|
FT_Long glyph_size;
|
||||||
FT_Glyph_Format glyph_format;
|
FT_Glyph_Format glyph_format;
|
||||||
|
|
||||||
FT_Glyph_InitFunc glyph_init;
|
FT_Glyph_InitFunc glyph_init;
|
||||||
FT_Glyph_DoneFunc glyph_done;
|
FT_Glyph_DoneFunc glyph_done;
|
||||||
FT_Glyph_CopyFunc glyph_copy;
|
FT_Glyph_CopyFunc glyph_copy;
|
||||||
@ -87,7 +88,7 @@ FT_BEGIN_HEADER
|
|||||||
typedef FT_Error
|
typedef FT_Error
|
||||||
(*FT_Renderer_RenderFunc)( FT_Renderer renderer,
|
(*FT_Renderer_RenderFunc)( FT_Renderer renderer,
|
||||||
FT_GlyphSlot slot,
|
FT_GlyphSlot slot,
|
||||||
FT_UInt mode,
|
FT_Render_Mode mode,
|
||||||
const FT_Vector* origin );
|
const FT_Vector* origin );
|
||||||
|
|
||||||
typedef FT_Error
|
typedef FT_Error
|
||||||
@ -212,13 +213,8 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* This doesn't change the current renderer for other formats. */
|
/* This doesn't change the current renderer for other formats. */
|
||||||
/* */
|
/* */
|
||||||
/* Currently, only the B/W renderer, if compiled with */
|
/* Currently, no FreeType renderer module uses `parameters'; you */
|
||||||
/* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */
|
/* should thus always pass NULL as the value. */
|
||||||
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Set_Renderer( FT_Library library,
|
FT_Set_Renderer( FT_Library library,
|
||||||
@ -226,13 +222,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_UInt num_params,
|
FT_UInt num_params,
|
||||||
FT_Parameter* parameters );
|
FT_Parameter* parameters );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTRENDER_H__ */
|
#endif /* FTRENDER_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType size objects management (specification). */
|
/* FreeType size objects management (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -25,8 +25,8 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTSIZES_H__
|
#ifndef FTSIZES_H_
|
||||||
#define __FTSIZES_H__
|
#define FTSIZES_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -129,7 +129,7 @@ FT_BEGIN_HEADER
|
|||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Even though it is possible to create several size objects for a */
|
/* Even though it is possible to create several size objects for a */
|
||||||
/* given face (see @FT_New_Size for details), functions like */
|
/* 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'. */
|
/* activated last to determine the `current character pixel size'. */
|
||||||
/* */
|
/* */
|
||||||
/* This function can be used to `activate' a previously created size */
|
/* This function can be used to `activate' a previously created size */
|
||||||
@ -153,7 +153,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTSIZES_H__ */
|
#endif /* FTSIZES_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
/* */
|
/* */
|
||||||
/* ftsnames.h */
|
/* 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). */
|
/* to hold font names, copyright info, notices, etc.) (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* This is _not_ used to retrieve glyph names! */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -19,12 +19,13 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FT_SFNT_NAMES_H__
|
#ifndef FTSNAMES_H_
|
||||||
#define __FT_SFNT_NAMES_H__
|
#define FTSNAMES_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
#include FT_PARAMETER_TAGS_H
|
||||||
|
|
||||||
#ifdef FREETYPE_H
|
#ifdef FREETYPE_H
|
||||||
#error "freetype.h of FreeType 1 has been loaded!"
|
#error "freetype.h of FreeType 1 has been loaded!"
|
||||||
@ -49,7 +50,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* The TrueType and OpenType specifications allow the inclusion of */
|
/* 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, */
|
/* textual (and internationalized) information regarding the font, */
|
||||||
/* like family name, copyright, version, etc. */
|
/* like family name, copyright, version, etc. */
|
||||||
/* */
|
/* */
|
||||||
@ -70,30 +71,37 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* platform_id :: The platform ID for `string'. */
|
/* platform_id :: The platform ID for `string'. */
|
||||||
|
/* See @TT_PLATFORM_XXX for possible values. */
|
||||||
/* */
|
/* */
|
||||||
/* encoding_id :: The encoding ID for `string'. */
|
/* 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'. */
|
/* 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'. */
|
/* name_id :: An identifier for `string'. */
|
||||||
|
/* See @TT_NAME_ID_XXX for possible values. */
|
||||||
/* */
|
/* */
|
||||||
/* string :: The `name' string. Note that its format differs */
|
/* string :: The `name' string. Note that its format differs */
|
||||||
/* depending on the (platform,encoding) pair. It can */
|
/* depending on the (platform,encoding) pair, being */
|
||||||
/* be a Pascal String, a UTF-16 one, etc. */
|
/* either a string of bytes (without a terminating */
|
||||||
/* */
|
/* NULL byte) or containing UTF-16BE entities. */
|
||||||
/* Generally speaking, the string is not */
|
|
||||||
/* zero-terminated. Please refer to the TrueType */
|
|
||||||
/* specification for details. */
|
|
||||||
/* */
|
/* */
|
||||||
/* string_len :: The length of `string' in bytes. */
|
/* string_len :: The length of `string' in bytes. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* Possible values for `platform_id', `encoding_id', `language_id', */
|
/* Please refer to the TrueType or OpenType specification for more */
|
||||||
/* and `name_id' are given in the file `ttnameid.h'. For details */
|
/* 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. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef struct FT_SfntName_
|
typedef struct FT_SfntName_
|
||||||
{
|
{
|
||||||
@ -103,7 +111,7 @@ FT_BEGIN_HEADER
|
|||||||
FT_UShort name_id;
|
FT_UShort name_id;
|
||||||
|
|
||||||
FT_Byte* string; /* this string is *not* null-terminated! */
|
FT_Byte* string; /* this string is *not* null-terminated! */
|
||||||
FT_UInt string_len; /* in bytes */
|
FT_UInt string_len; /* in bytes */
|
||||||
|
|
||||||
} FT_SfntName;
|
} FT_SfntName;
|
||||||
|
|
||||||
@ -147,54 +155,99 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* The `string' array returned in the `aname' structure is not */
|
/* The `string' array returned in the `aname' structure is not */
|
||||||
/* null-terminated. The application should deallocate it if it is no */
|
/* null-terminated. Note that you don't have to deallocate `string' */
|
||||||
/* longer in use. */
|
/* 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 */
|
/* 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 */
|
/* `name' table entries, then do a loop until you get the right */
|
||||||
/* platform, encoding, and name ID. */
|
/* 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_EXPORT( FT_Error )
|
||||||
FT_Get_Sfnt_Name( FT_Face face,
|
FT_Get_Sfnt_Name( FT_Face face,
|
||||||
FT_UInt idx,
|
FT_UInt idx,
|
||||||
FT_SfntName *aname );
|
FT_SfntName *aname );
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/*************************************************************************/
|
||||||
*
|
/* */
|
||||||
* @constant:
|
/* <Struct> */
|
||||||
* FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
|
/* FT_SfntLangTag */
|
||||||
*
|
/* */
|
||||||
* @description:
|
/* <Description> */
|
||||||
* A constant used as the tag of @FT_Parameter structures to make
|
/* A structure to model a language tag entry from an SFNT `name' */
|
||||||
* FT_Open_Face() ignore preferred family subfamily names in `name'
|
/* table. */
|
||||||
* table since OpenType version 1.4. For backwards compatibility with
|
/* */
|
||||||
* legacy systems which has 4-face-per-family restriction.
|
/* <Fields> */
|
||||||
*
|
/* string :: The language tag string, encoded in UTF-16BE */
|
||||||
*/
|
/* (without trailing NULL bytes). */
|
||||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
|
/* */
|
||||||
|
/* 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:
|
/* <Function> */
|
||||||
* FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
|
/* FT_Get_Sfnt_LangTag */
|
||||||
*
|
/* */
|
||||||
* @description:
|
/* <Description> */
|
||||||
* A constant used as the tag of @FT_Parameter structures to make
|
/* Retrieve the language tag associated with a language ID of an SFNT */
|
||||||
* FT_Open_Face() ignore preferred subfamily names in `name' table since
|
/* `name' table entry. */
|
||||||
* OpenType version 1.4. For backwards compatibility with legacy
|
/* */
|
||||||
* systems which has 4-face-per-family restriction.
|
/* <Input> */
|
||||||
*
|
/* face :: A handle to the source face. */
|
||||||
*/
|
/* */
|
||||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
|
/* 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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FT_SFNT_NAMES_H__ */
|
#endif /* FTSNAMES_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType path stroker (specification). */
|
/* FreeType path stroker (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002-2006, 2008, 2009, 2011-2012 by */
|
/* Copyright 2002-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FT_STROKE_H__
|
#ifndef FTSTROKE_H_
|
||||||
#define __FT_STROKE_H__
|
#define FTSTROKE_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_OUTLINE_H
|
#include FT_OUTLINE_H
|
||||||
@ -46,6 +46,38 @@ FT_BEGIN_HEADER
|
|||||||
* This can be useful to generate `bordered' glyph, i.e., glyphs
|
* This can be useful to generate `bordered' glyph, i.e., glyphs
|
||||||
* displayed with a coloured (and anti-aliased) border around their
|
* displayed with a coloured (and anti-aliased) border around their
|
||||||
* shape.
|
* 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
|
* FT_Stroker
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Opaque handler to a path stroker object.
|
* Opaque handle to a path stroker object.
|
||||||
*/
|
*/
|
||||||
typedef struct FT_StrokerRec_* FT_Stroker;
|
typedef struct FT_StrokerRec_* FT_Stroker;
|
||||||
|
|
||||||
@ -104,7 +136,7 @@ FT_BEGIN_HEADER
|
|||||||
* FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
|
* FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
|
||||||
* join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
|
* join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
|
||||||
* for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
|
* for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
|
||||||
* backwards compatibility.
|
* backward compatibility.
|
||||||
*/
|
*/
|
||||||
typedef enum FT_Stroker_LineJoin_
|
typedef enum FT_Stroker_LineJoin_
|
||||||
{
|
{
|
||||||
@ -276,6 +308,8 @@ FT_BEGIN_HEADER
|
|||||||
* @note:
|
* @note:
|
||||||
* The radius is expressed in the same units as the outline
|
* The radius is expressed in the same units as the outline
|
||||||
* coordinates.
|
* coordinates.
|
||||||
|
*
|
||||||
|
* This function calls @FT_Stroker_Rewind automatically.
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( void )
|
FT_EXPORT( void )
|
||||||
FT_Stroker_Set( FT_Stroker stroker,
|
FT_Stroker_Set( FT_Stroker stroker,
|
||||||
@ -432,7 +466,7 @@ FT_BEGIN_HEADER
|
|||||||
* FT_Stroker_ConicTo
|
* FT_Stroker_ConicTo
|
||||||
*
|
*
|
||||||
* @description:
|
* @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.
|
* from the last position.
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
@ -440,7 +474,7 @@ FT_BEGIN_HEADER
|
|||||||
* The target stroker handle.
|
* The target stroker handle.
|
||||||
*
|
*
|
||||||
* control ::
|
* control ::
|
||||||
* A pointer to a Bézier control point.
|
* A pointer to a Bezier control point.
|
||||||
*
|
*
|
||||||
* to ::
|
* to ::
|
||||||
* A pointer to the destination point.
|
* A pointer to the destination point.
|
||||||
@ -464,7 +498,7 @@ FT_BEGIN_HEADER
|
|||||||
* FT_Stroker_CubicTo
|
* FT_Stroker_CubicTo
|
||||||
*
|
*
|
||||||
* @description:
|
* @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.
|
* from the last position.
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
@ -472,10 +506,10 @@ FT_BEGIN_HEADER
|
|||||||
* The target stroker handle.
|
* The target stroker handle.
|
||||||
*
|
*
|
||||||
* control1 ::
|
* control1 ::
|
||||||
* A pointer to the first Bézier control point.
|
* A pointer to the first Bezier control point.
|
||||||
*
|
*
|
||||||
* control2 ::
|
* control2 ::
|
||||||
* A pointer to second Bézier control point.
|
* A pointer to second Bezier control point.
|
||||||
*
|
*
|
||||||
* to ::
|
* to ::
|
||||||
* A pointer to the destination point.
|
* A pointer to the destination point.
|
||||||
@ -570,10 +604,10 @@ FT_BEGIN_HEADER
|
|||||||
* receive all new data.
|
* receive all new data.
|
||||||
*
|
*
|
||||||
* When an outline, or a sub-path, is `closed', the stroker generates
|
* 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
|
* When the outline, or a sub-path, is `opened', the stroker merges
|
||||||
* the `border' outlines with caps. The `left' border receives all
|
* the `border' outlines with caps. The `left' border receives all
|
||||||
* points, while the `right' border becomes empty.
|
* points, while the `right' border becomes empty.
|
||||||
*
|
*
|
||||||
* Use the function @FT_Stroker_Export instead if you want to
|
* Use the function @FT_Stroker_Export instead if you want to
|
||||||
@ -736,11 +770,11 @@ FT_BEGIN_HEADER
|
|||||||
FT_Bool inside,
|
FT_Bool inside,
|
||||||
FT_Bool destroy );
|
FT_Bool destroy );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FT_STROKE_H__ */
|
#endif /* FTSTROKE_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/* FreeType synthesizing code for emboldening and slanting */
|
/* FreeType synthesizing code for emboldening and slanting */
|
||||||
/* (specification). */
|
/* (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2000-2001, 2003, 2006, 2008, 2012 by */
|
/* Copyright 2000-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -37,12 +37,12 @@
|
|||||||
/* Main reason for not lifting the functions in this module to a */
|
/* Main reason for not lifting the functions in this module to a */
|
||||||
/* `standard' API is that the used parameters for emboldening and */
|
/* `standard' API is that the used parameters for emboldening and */
|
||||||
/* slanting are not configurable. Consider the functions as a */
|
/* 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. */
|
/* adapted to the particular needs. */
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTSYNTH_H__
|
#ifndef FTSYNTH_H_
|
||||||
#define __FTSYNTH_H__
|
#define FTSYNTH_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -62,8 +62,10 @@ FT_BEGIN_HEADER
|
|||||||
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
|
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
|
||||||
/* */
|
/* */
|
||||||
/* For emboldened outlines the height, width, and advance metrics are */
|
/* For emboldened outlines the height, width, and advance metrics are */
|
||||||
/* increased by the strength of the emboldening. You can also call */
|
/* increased by the strength of the emboldening -- this even affects */
|
||||||
/* @FT_Outline_Get_CBox to get precise values. */
|
/* mono-width fonts! */
|
||||||
|
/* */
|
||||||
|
/* You can also call @FT_Outline_Get_CBox to get precise values. */
|
||||||
FT_EXPORT( void )
|
FT_EXPORT( void )
|
||||||
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
|
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
|
||||||
|
|
||||||
@ -73,9 +75,10 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTSYNTH_H__ */
|
#endif /* FTSYNTH_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType low-level system interface definition (specification). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTSYSTEM_H__
|
#ifndef FTSYSTEM_H_
|
||||||
#define __FTSYSTEM_H__
|
#define FTSYSTEM_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -192,6 +192,10 @@ FT_BEGIN_HEADER
|
|||||||
* @description:
|
* @description:
|
||||||
* A handle to an input stream.
|
* 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;
|
typedef struct FT_StreamRec_* FT_Stream;
|
||||||
|
|
||||||
@ -285,6 +289,11 @@ FT_BEGIN_HEADER
|
|||||||
* size ::
|
* size ::
|
||||||
* The stream size in bytes.
|
* 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 ::
|
* pos ::
|
||||||
* The current position within the stream.
|
* The current position within the stream.
|
||||||
*
|
*
|
||||||
@ -335,13 +344,12 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
} FT_StreamRec;
|
} FT_StreamRec;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTSYSTEM_H__ */
|
#endif /* FTSYSTEM_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType trigonometric functions (specification). */
|
/* FreeType trigonometric functions (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2001, 2003, 2005, 2007, 2013 by */
|
/* Copyright 2001-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTTRIGON_H__
|
#ifndef FTTRIGON_H_
|
||||||
#define __FTTRIGON_H__
|
#define FTTRIGON_H_
|
||||||
|
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
|
||||||
@ -225,8 +225,8 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Return the unit vector corresponding to a given angle. After the
|
* 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
|
* call, the value of `vec.x' will be `cos(angle)', and the value of
|
||||||
* `vec.y' will be `cos(angle)'.
|
* `vec.y' will be `sin(angle)'.
|
||||||
*
|
*
|
||||||
* This function is useful to retrieve both the sinus and cosinus of a
|
* This function is useful to retrieve both the sinus and cosinus of a
|
||||||
* given angle quickly.
|
* given angle quickly.
|
||||||
@ -237,7 +237,7 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* angle ::
|
* angle ::
|
||||||
* The address of angle.
|
* The input angle.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( void )
|
FT_EXPORT( void )
|
||||||
@ -259,7 +259,7 @@ FT_BEGIN_HEADER
|
|||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* angle ::
|
* angle ::
|
||||||
* The address of angle.
|
* The input angle.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( void )
|
FT_EXPORT( void )
|
||||||
@ -344,7 +344,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTTRIGON_H__ */
|
#endif /* FTTRIGON_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType simple types definitions (specification only). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTTYPES_H__
|
#ifndef FTTYPES_H_
|
||||||
#define __FTTYPES_H__
|
#define FTTYPES_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -57,6 +57,8 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_UInt16 */
|
/* FT_UInt16 */
|
||||||
/* FT_Int32 */
|
/* FT_Int32 */
|
||||||
/* FT_UInt32 */
|
/* FT_UInt32 */
|
||||||
|
/* FT_Int64 */
|
||||||
|
/* FT_UInt64 */
|
||||||
/* FT_Short */
|
/* FT_Short */
|
||||||
/* FT_UShort */
|
/* FT_UShort */
|
||||||
/* FT_Long */
|
/* FT_Long */
|
||||||
@ -78,7 +80,9 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_F2Dot14 */
|
/* FT_F2Dot14 */
|
||||||
/* FT_UnitVector */
|
/* FT_UnitVector */
|
||||||
/* FT_F26Dot6 */
|
/* FT_F26Dot6 */
|
||||||
|
/* FT_Data */
|
||||||
/* */
|
/* */
|
||||||
|
/* FT_MAKE_TAG */
|
||||||
/* */
|
/* */
|
||||||
/* FT_Generic */
|
/* FT_Generic */
|
||||||
/* FT_Generic_Finalizer */
|
/* FT_Generic_Finalizer */
|
||||||
@ -418,10 +422,10 @@ FT_BEGIN_HEADER
|
|||||||
/* details of usage. */
|
/* details of usage. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <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. */
|
/* Its client data is accessed through its `generic' field. */
|
||||||
/* */
|
/* */
|
||||||
typedef void (*FT_Generic_Finalizer)(void* object);
|
typedef void (*FT_Generic_Finalizer)( void* object );
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -466,8 +470,8 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_MAKE_TAG */
|
/* FT_MAKE_TAG */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* This macro converts four-letter tags which are used to label */
|
/* This macro converts four-letter tags that are used to label */
|
||||||
/* TrueType tables into an unsigned long to be used within FreeType. */
|
/* TrueType tables into an unsigned long, to be used within FreeType. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* The produced values *must* be 32-bit integers. Don't redefine */
|
/* The produced values *must* be 32-bit integers. Don't redefine */
|
||||||
@ -567,9 +571,9 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
} FT_ListRec;
|
} FT_ListRec;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
||||||
#define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
#define FT_BOOL( x ) ( (FT_Bool)( x ) )
|
||||||
|
|
||||||
@ -592,7 +596,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTTYPES_H__ */
|
#endif /* FTTYPES_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* FreeType API for accessing Windows fnt-specific data. */
|
/* FreeType API for accessing Windows fnt-specific data. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2003, 2004, 2008 by */
|
/* Copyright 2003-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FTWINFNT_H__
|
#ifndef FTWINFNT_H_
|
||||||
#define __FTWINFNT_H__
|
#define FTWINFNT_H_
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
@ -58,9 +58,10 @@ FT_BEGIN_HEADER
|
|||||||
* @description:
|
* @description:
|
||||||
* A list of valid values for the `charset' byte in
|
* A list of valid values for the `charset' byte in
|
||||||
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
|
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
|
||||||
* encodings (except for cp1361) can be found at ftp://ftp.unicode.org
|
* encodings (except for cp1361) can be found at
|
||||||
* in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
|
* ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
|
||||||
* roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
|
* subdirectory. cp1361 is roughly a superset of
|
||||||
|
* MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
|
||||||
*
|
*
|
||||||
* @values:
|
* @values:
|
||||||
* FT_WinFNT_ID_DEFAULT ::
|
* FT_WinFNT_ID_DEFAULT ::
|
||||||
@ -77,7 +78,7 @@ FT_BEGIN_HEADER
|
|||||||
* Mac Roman encoding.
|
* Mac Roman encoding.
|
||||||
*
|
*
|
||||||
* FT_WinFNT_ID_OEM ::
|
* 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
|
* The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
|
||||||
* is used for the charset of vector fonts, like `modern.fon',
|
* 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
|
* second default codepage that most international versions of
|
||||||
* Windows have. It is one of the OEM codepages from
|
* 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.
|
* and is used for the `DOS boxes', to support legacy applications.
|
||||||
* A German Windows version for example usually uses ANSI codepage
|
* 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_Get_WinFNT_Header( FT_Face face,
|
||||||
FT_WinFNT_HeaderRec *aheader );
|
FT_WinFNT_HeaderRec *aheader );
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __FTWINFNT_H__ */
|
#endif /* FTWINFNT_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/* Basic Type 1/Type 2 tables definitions and interface (specification */
|
/* Basic Type 1/Type 2 tables definitions and interface (specification */
|
||||||
/* only). */
|
/* only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -17,8 +17,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __T1TABLES_H__
|
#ifndef T1TABLES_H_
|
||||||
#define __T1TABLES_H__
|
#define T1TABLES_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -49,6 +49,26 @@ FT_BEGIN_HEADER
|
|||||||
/* This section contains the definition of Type 1-specific tables, */
|
/* This section contains the definition of Type 1-specific tables, */
|
||||||
/* including structures related to other PostScript font formats. */
|
/* 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 */
|
/* given blend dictionary (font info or private). Used to support */
|
||||||
/* Multiple Masters fonts. */
|
/* 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_
|
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_POSITION = 0,
|
||||||
T1_BLEND_UNDERLINE_THICKNESS,
|
T1_BLEND_UNDERLINE_THICKNESS,
|
||||||
T1_BLEND_ITALIC_ANGLE,
|
T1_BLEND_ITALIC_ANGLE,
|
||||||
|
|
||||||
/*# required fields in a Private blend dictionary */
|
/* required fields in a Private blend dictionary */
|
||||||
T1_BLEND_BLUE_VALUES,
|
T1_BLEND_BLUE_VALUES,
|
||||||
T1_BLEND_OTHER_BLUES,
|
T1_BLEND_OTHER_BLUES,
|
||||||
T1_BLEND_STANDARD_WIDTH,
|
T1_BLEND_STANDARD_WIDTH,
|
||||||
@ -210,15 +246,13 @@ FT_BEGIN_HEADER
|
|||||||
T1_BLEND_FAMILY_OTHER_BLUES,
|
T1_BLEND_FAMILY_OTHER_BLUES,
|
||||||
T1_BLEND_FORCE_BOLD,
|
T1_BLEND_FORCE_BOLD,
|
||||||
|
|
||||||
/*# never remove */
|
T1_BLEND_MAX /* do not remove */
|
||||||
T1_BLEND_MAX
|
|
||||||
|
|
||||||
} T1_Blend_Flags;
|
} T1_Blend_Flags;
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
|
/* these constants are deprecated; use the corresponding */
|
||||||
/*# backwards compatible definitions */
|
/* `T1_Blend_Flags' values instead */
|
||||||
#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
|
#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
|
||||||
#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
|
#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
|
||||||
#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
|
#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_force_bold T1_BLEND_FORCE_BOLD
|
||||||
#define t1_blend_max T1_BLEND_MAX
|
#define t1_blend_max T1_BLEND_MAX
|
||||||
|
|
||||||
|
/* */
|
||||||
|
|
||||||
|
|
||||||
/* maximum number of Multiple Masters designs, as defined in the spec */
|
/* maximum number of Multiple Masters designs, as defined in the spec */
|
||||||
#define T1_MAX_MM_DESIGNS 16
|
#define T1_MAX_MM_DESIGNS 16
|
||||||
@ -255,7 +291,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
} PS_DesignMapRec, *PS_DesignMap;
|
} PS_DesignMapRec, *PS_DesignMap;
|
||||||
|
|
||||||
/* backwards-compatible definition */
|
/* backward compatible definition */
|
||||||
typedef PS_DesignMapRec T1_DesignMap;
|
typedef PS_DesignMapRec T1_DesignMap;
|
||||||
|
|
||||||
|
|
||||||
@ -290,7 +326,7 @@ FT_BEGIN_HEADER
|
|||||||
} PS_BlendRec, *PS_Blend;
|
} PS_BlendRec, *PS_Blend;
|
||||||
|
|
||||||
|
|
||||||
/* backwards-compatible definition */
|
/* backward compatible definition */
|
||||||
typedef PS_BlendRec T1_Blend;
|
typedef PS_BlendRec T1_Blend;
|
||||||
|
|
||||||
|
|
||||||
@ -333,10 +369,17 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
typedef struct CID_FaceDictRec_* CID_FaceDict;
|
typedef struct CID_FaceDictRec_* CID_FaceDict;
|
||||||
|
|
||||||
/* */
|
|
||||||
|
|
||||||
|
/*************************************************************************/
|
||||||
/* backwards-compatible definition */
|
/* */
|
||||||
|
/* <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. */
|
||||||
|
/* */
|
||||||
typedef CID_FaceDictRec CID_FontDict;
|
typedef CID_FaceDictRec CID_FontDict;
|
||||||
|
|
||||||
|
|
||||||
@ -449,8 +492,9 @@ FT_BEGIN_HEADER
|
|||||||
* FreeType error code. 0~means success.
|
* FreeType error code. 0~means success.
|
||||||
*
|
*
|
||||||
* @note:
|
* @note:
|
||||||
* The string pointers within the font info structure are owned by
|
* String pointers within the @PS_FontInfoRec structure are owned by
|
||||||
* the face and don't need to be freed by the caller.
|
* 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
|
* If the font's format is not PostScript-based, this function will
|
||||||
* return the `FT_Err_Invalid_Argument' error code.
|
* 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 */
|
/* An enumeration describing the `Encoding' entry in a Type 1 */
|
||||||
/* dictionary. */
|
/* 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_
|
typedef enum T1_EncodingType_
|
||||||
{
|
{
|
||||||
T1_ENCODING_TYPE_NONE = 0,
|
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 */
|
/* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */
|
||||||
/* the Type~1 dictionary entry to retrieve. */
|
/* 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_
|
typedef enum PS_Dict_Keys_
|
||||||
{
|
{
|
||||||
/* conventionally in the font dictionary */
|
/* conventionally in the font dictionary */
|
||||||
@ -644,6 +749,9 @@ FT_BEGIN_HEADER
|
|||||||
* If the font's format is not PostScript-based, this function returns
|
* If the font's format is not PostScript-based, this function returns
|
||||||
* the `FT_Err_Invalid_Argument' error code.
|
* the `FT_Err_Invalid_Argument' error code.
|
||||||
*
|
*
|
||||||
|
* @since:
|
||||||
|
* 2.4.8
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( FT_Long )
|
FT_EXPORT( FT_Long )
|
||||||
FT_Get_PS_Font_Value( FT_Face face,
|
FT_Get_PS_Font_Value( FT_Face face,
|
||||||
@ -656,7 +764,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __T1TABLES_H__ */
|
#endif /* T1TABLES_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
|||||||
/* Basic SFNT/TrueType tables definitions and interface */
|
/* Basic SFNT/TrueType tables definitions and interface */
|
||||||
/* (specification only). */
|
/* (specification only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2005, 2008-2012 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -17,8 +17,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __TTTABLES_H__
|
#ifndef TTTABLES_H_
|
||||||
#define __TTTABLES_H__
|
#define TTTABLES_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -45,8 +45,28 @@ FT_BEGIN_HEADER
|
|||||||
/* TrueType specific table types and functions. */
|
/* TrueType specific table types and functions. */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* This section contains the definition of TrueType-specific tables */
|
/* This section contains definitions of some basic tables specific to */
|
||||||
/* as well as some routines used to access and process them. */
|
/* 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 */
|
/* TT_Header */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model a TrueType font header table. All */
|
/* A structure to model a TrueType font header table. All fields */
|
||||||
/* fields follow the TrueType specification. */
|
/* follow the OpenType specification. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_Header_
|
typedef struct TT_Header_
|
||||||
{
|
{
|
||||||
@ -95,9 +115,9 @@ FT_BEGIN_HEADER
|
|||||||
/* TT_HoriHeader */
|
/* TT_HoriHeader */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <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, */
|
/* table, as well as the corresponding horizontal metrics table, */
|
||||||
/* i.e., the `hmtx' table. */
|
/* `hmtx'. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* Version :: The table version. */
|
/* Version :: The table version. */
|
||||||
@ -112,7 +132,7 @@ FT_BEGIN_HEADER
|
|||||||
/* glyphs found in the font (maybe ASCII). */
|
/* glyphs found in the font (maybe ASCII). */
|
||||||
/* */
|
/* */
|
||||||
/* You should use the `sTypoAscender' field */
|
/* 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. */
|
/* the correct one. */
|
||||||
/* */
|
/* */
|
||||||
/* Descender :: The font's descender, i.e., the distance */
|
/* Descender :: The font's descender, i.e., the distance */
|
||||||
@ -126,7 +146,7 @@ FT_BEGIN_HEADER
|
|||||||
/* glyphs found in the font (maybe ASCII). */
|
/* glyphs found in the font (maybe ASCII). */
|
||||||
/* */
|
/* */
|
||||||
/* You should use the `sTypoDescender' */
|
/* 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. */
|
/* want the correct one. */
|
||||||
/* */
|
/* */
|
||||||
/* Line_Gap :: The font's line gap, i.e., the distance */
|
/* 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 */
|
/* caret_Slope_Run :: The run coefficient of the cursor's */
|
||||||
/* slope. */
|
/* slope. */
|
||||||
/* */
|
/* */
|
||||||
|
/* caret_Offset :: The cursor's offset for slanted fonts. */
|
||||||
|
/* */
|
||||||
/* Reserved :: 8~reserved bytes. */
|
/* Reserved :: 8~reserved bytes. */
|
||||||
/* */
|
/* */
|
||||||
/* metric_Data_Format :: Always~0. */
|
/* metric_Data_Format :: Always~0. */
|
||||||
@ -169,13 +191,10 @@ FT_BEGIN_HEADER
|
|||||||
/* short_metrics :: A pointer into the `hmtx' table. */
|
/* short_metrics :: A pointer into the `hmtx' table. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
|
/* For an OpenType variation font, the values of the following fields */
|
||||||
/* be identical except for the names of their fields which */
|
/* can change after a call to @FT_Set_Var_Design_Coordinates (and */
|
||||||
/* are different. */
|
/* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */
|
||||||
/* */
|
/* `caret_Slope_Run', and `caret_Offset'. */
|
||||||
/* This ensures that a single function in the `ttload' */
|
|
||||||
/* module is able to read both the horizontal and vertical */
|
|
||||||
/* headers. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_HoriHeader_
|
typedef struct TT_HoriHeader_
|
||||||
{
|
{
|
||||||
@ -198,9 +217,9 @@ FT_BEGIN_HEADER
|
|||||||
FT_Short metric_Data_Format;
|
FT_Short metric_Data_Format;
|
||||||
FT_UShort number_Of_HMetrics;
|
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 */
|
/* but they are used to connect the metrics header to the relevant */
|
||||||
/* `HMTX' table. */
|
/* `hmtx' table. */
|
||||||
|
|
||||||
void* long_metrics;
|
void* long_metrics;
|
||||||
void* short_metrics;
|
void* short_metrics;
|
||||||
@ -215,8 +234,8 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model a TrueType vertical header, the `vhea' */
|
/* A structure used to model a TrueType vertical header, the `vhea' */
|
||||||
/* table, as well as the corresponding vertical metrics table, i.e., */
|
/* table, as well as the corresponding vertical metrics table, */
|
||||||
/* the `vmtx' table. */
|
/* `vmtx'. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* Version :: The table version. */
|
/* Version :: The table version. */
|
||||||
@ -232,8 +251,8 @@ FT_BEGIN_HEADER
|
|||||||
/* ASCII). */
|
/* ASCII). */
|
||||||
/* */
|
/* */
|
||||||
/* You should use the `sTypoAscender' */
|
/* You should use the `sTypoAscender' */
|
||||||
/* field of the OS/2 table instead if you */
|
/* field of the `OS/2' table instead if */
|
||||||
/* want the correct one. */
|
/* you want the correct one. */
|
||||||
/* */
|
/* */
|
||||||
/* Descender :: The font's descender, i.e., the */
|
/* Descender :: The font's descender, i.e., the */
|
||||||
/* distance from the baseline to the */
|
/* distance from the baseline to the */
|
||||||
@ -247,8 +266,8 @@ FT_BEGIN_HEADER
|
|||||||
/* ASCII). */
|
/* ASCII). */
|
||||||
/* */
|
/* */
|
||||||
/* You should use the `sTypoDescender' */
|
/* You should use the `sTypoDescender' */
|
||||||
/* field of the OS/2 table instead if you */
|
/* field of the `OS/2' table instead if */
|
||||||
/* want the correct one. */
|
/* you want the correct one. */
|
||||||
/* */
|
/* */
|
||||||
/* Line_Gap :: The font's line gap, i.e., the distance */
|
/* Line_Gap :: The font's line gap, i.e., the distance */
|
||||||
/* to add to the ascender and descender to */
|
/* to add to the ascender and descender to */
|
||||||
@ -278,30 +297,26 @@ FT_BEGIN_HEADER
|
|||||||
/* slope. */
|
/* slope. */
|
||||||
/* */
|
/* */
|
||||||
/* caret_Offset :: The cursor's offset for slanted fonts. */
|
/* caret_Offset :: The cursor's offset for slanted fonts. */
|
||||||
/* This value is `reserved' in vmtx */
|
|
||||||
/* version 1.0. */
|
|
||||||
/* */
|
/* */
|
||||||
/* Reserved :: 8~reserved bytes. */
|
/* Reserved :: 8~reserved bytes. */
|
||||||
/* */
|
/* */
|
||||||
/* metric_Data_Format :: Always~0. */
|
/* 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 */
|
/* `vmtx' table -- this value can be */
|
||||||
/* smaller than the total number of glyphs */
|
/* smaller than the total number of glyphs */
|
||||||
/* in the font. */
|
/* in the font. */
|
||||||
/* */
|
/* */
|
||||||
/* long_metrics :: A pointer into the `vmtx' table. */
|
/* long_metrics :: A pointer into the `vmtx' table. */
|
||||||
/* */
|
/* */
|
||||||
/* short_metrics :: A pointer into the `vmtx' table. */
|
/* short_metrics :: A pointer into the `vmtx' table. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
|
/* For an OpenType variation font, the values of the following fields */
|
||||||
/* be identical except for the names of their fields which */
|
/* can change after a call to @FT_Set_Var_Design_Coordinates (and */
|
||||||
/* are different. */
|
/* friends) if the font contains an `MVAR' table: `Ascender', */
|
||||||
/* */
|
/* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', */
|
||||||
/* This ensures that a single function in the `ttload' */
|
/* and `caret_Offset'. */
|
||||||
/* module is able to read both the horizontal and vertical */
|
|
||||||
/* headers. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_VertHeader_
|
typedef struct TT_VertHeader_
|
||||||
{
|
{
|
||||||
@ -312,9 +327,9 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_UShort advance_Height_Max; /* advance height maximum */
|
FT_UShort advance_Height_Max; /* advance height maximum */
|
||||||
|
|
||||||
FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */
|
FT_Short min_Top_Side_Bearing; /* minimum top-sb */
|
||||||
FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */
|
FT_Short min_Bottom_Side_Bearing; /* minimum bottom-sb */
|
||||||
FT_Short yMax_Extent; /* xmax or ymax extents */
|
FT_Short yMax_Extent; /* ymax extents */
|
||||||
FT_Short caret_Slope_Rise;
|
FT_Short caret_Slope_Rise;
|
||||||
FT_Short caret_Slope_Run;
|
FT_Short caret_Slope_Run;
|
||||||
FT_Short caret_Offset;
|
FT_Short caret_Offset;
|
||||||
@ -324,9 +339,9 @@ FT_BEGIN_HEADER
|
|||||||
FT_Short metric_Data_Format;
|
FT_Short metric_Data_Format;
|
||||||
FT_UShort number_Of_VMetrics;
|
FT_UShort number_Of_VMetrics;
|
||||||
|
|
||||||
/* The following fields are not defined by the TrueType specification */
|
/* The following fields are not defined by the OpenType specification */
|
||||||
/* but they're used to connect the metrics header to the relevant */
|
/* but they are used to connect the metrics header to the relevant */
|
||||||
/* `HMTX' or `VMTX' table. */
|
/* `vmtx' table. */
|
||||||
|
|
||||||
void* long_metrics;
|
void* long_metrics;
|
||||||
void* short_metrics;
|
void* short_metrics;
|
||||||
@ -340,20 +355,35 @@ FT_BEGIN_HEADER
|
|||||||
/* TT_OS2 */
|
/* TT_OS2 */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model a TrueType OS/2 table. This is the long */
|
/* A structure to model a TrueType `OS/2' table. All fields comply */
|
||||||
/* table version. All fields comply to the TrueType specification. */
|
/* to the OpenType specification. */
|
||||||
/* */
|
/* */
|
||||||
/* Note that we now support old Mac fonts which do not include an */
|
/* 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 */
|
/* `OS/2' table. In this case, the `version' field is always set to */
|
||||||
/* 0xFFFF. */
|
/* 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_
|
typedef struct TT_OS2_
|
||||||
{
|
{
|
||||||
FT_UShort version; /* 0x0001 - more or 0xFFFF */
|
FT_UShort version; /* 0x0001 - more or 0xFFFF */
|
||||||
FT_Short xAvgCharWidth;
|
FT_Short xAvgCharWidth;
|
||||||
FT_UShort usWeightClass;
|
FT_UShort usWeightClass;
|
||||||
FT_UShort usWidthClass;
|
FT_UShort usWidthClass;
|
||||||
FT_Short fsType;
|
FT_UShort fsType;
|
||||||
FT_Short ySubscriptXSize;
|
FT_Short ySubscriptXSize;
|
||||||
FT_Short ySubscriptYSize;
|
FT_Short ySubscriptYSize;
|
||||||
FT_Short ySubscriptXOffset;
|
FT_Short ySubscriptXOffset;
|
||||||
@ -384,12 +414,12 @@ FT_BEGIN_HEADER
|
|||||||
FT_UShort usWinAscent;
|
FT_UShort usWinAscent;
|
||||||
FT_UShort usWinDescent;
|
FT_UShort usWinDescent;
|
||||||
|
|
||||||
/* only version 1 tables: */
|
/* only version 1 and higher: */
|
||||||
|
|
||||||
FT_ULong ulCodePageRange1; /* Bits 0-31 */
|
FT_ULong ulCodePageRange1; /* Bits 0-31 */
|
||||||
FT_ULong ulCodePageRange2; /* Bits 32-63 */
|
FT_ULong ulCodePageRange2; /* Bits 32-63 */
|
||||||
|
|
||||||
/* only version 2 tables: */
|
/* only version 2 and higher: */
|
||||||
|
|
||||||
FT_Short sxHeight;
|
FT_Short sxHeight;
|
||||||
FT_Short sCapHeight;
|
FT_Short sCapHeight;
|
||||||
@ -397,6 +427,11 @@ FT_BEGIN_HEADER
|
|||||||
FT_UShort usBreakChar;
|
FT_UShort usBreakChar;
|
||||||
FT_UShort usMaxContext;
|
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;
|
} TT_OS2;
|
||||||
|
|
||||||
|
|
||||||
@ -406,10 +441,16 @@ FT_BEGIN_HEADER
|
|||||||
/* TT_Postscript */
|
/* TT_Postscript */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model a TrueType PostScript table. All fields */
|
/* A structure to model a TrueType `post' table. All fields comply */
|
||||||
/* comply to the TrueType specification. This structure does not */
|
/* to the OpenType specification. This structure does not reference */
|
||||||
/* reference the PostScript glyph names, which can be nevertheless */
|
/* a font's PostScript glyph names; use @FT_Get_Glyph_Name to */
|
||||||
/* accessed with the `ttpost' module. */
|
/* 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_
|
typedef struct TT_Postscript_
|
||||||
{
|
{
|
||||||
@ -423,8 +464,8 @@ FT_BEGIN_HEADER
|
|||||||
FT_ULong minMemType1;
|
FT_ULong minMemType1;
|
||||||
FT_ULong maxMemType1;
|
FT_ULong maxMemType1;
|
||||||
|
|
||||||
/* Glyph names follow in the file, but we don't */
|
/* Glyph names follow in the `post' table, but we don't */
|
||||||
/* load them by default. See the ttpost.c file. */
|
/* load them by default. */
|
||||||
|
|
||||||
} TT_Postscript;
|
} TT_Postscript;
|
||||||
|
|
||||||
@ -435,8 +476,8 @@ FT_BEGIN_HEADER
|
|||||||
/* TT_PCLT */
|
/* TT_PCLT */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model a TrueType PCLT table. All fields */
|
/* A structure to model a TrueType `PCLT' table. All fields comply */
|
||||||
/* comply to the TrueType specification. */
|
/* to the OpenType specification. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_PCLT_
|
typedef struct TT_PCLT_
|
||||||
{
|
{
|
||||||
@ -465,9 +506,9 @@ FT_BEGIN_HEADER
|
|||||||
/* TT_MaxProfile */
|
/* TT_MaxProfile */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* The maximum profile is a table containing many max values which */
|
/* The maximum profile (`maxp') table contains many max values, which */
|
||||||
/* can be used to pre-allocate arrays. This ensures that no memory */
|
/* can be used to pre-allocate arrays for speeding up glyph loading */
|
||||||
/* allocation occurs during a glyph load. */
|
/* and hinting. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* version :: The version number. */
|
/* version :: The version number. */
|
||||||
@ -477,21 +518,19 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* maxPoints :: The maximum number of points in a */
|
/* maxPoints :: The maximum number of points in a */
|
||||||
/* non-composite TrueType glyph. See also */
|
/* non-composite TrueType glyph. See also */
|
||||||
/* the structure element */
|
|
||||||
/* `maxCompositePoints'. */
|
/* `maxCompositePoints'. */
|
||||||
/* */
|
/* */
|
||||||
/* maxContours :: The maximum number of contours in a */
|
/* maxContours :: The maximum number of contours in a */
|
||||||
/* non-composite TrueType glyph. See also */
|
/* non-composite TrueType glyph. See also */
|
||||||
/* the structure element */
|
|
||||||
/* `maxCompositeContours'. */
|
/* `maxCompositeContours'. */
|
||||||
/* */
|
/* */
|
||||||
/* maxCompositePoints :: The maximum number of points in a */
|
/* maxCompositePoints :: The maximum number of points in a */
|
||||||
/* composite TrueType glyph. See also the */
|
/* composite TrueType glyph. See also */
|
||||||
/* structure element `maxPoints'. */
|
/* `maxPoints'. */
|
||||||
/* */
|
/* */
|
||||||
/* maxCompositeContours :: The maximum number of contours in a */
|
/* maxCompositeContours :: The maximum number of contours in a */
|
||||||
/* composite TrueType glyph. See also the */
|
/* composite TrueType glyph. See also */
|
||||||
/* structure element `maxContours'. */
|
/* `maxContours'. */
|
||||||
/* */
|
/* */
|
||||||
/* maxZones :: The maximum number of zones used for */
|
/* maxZones :: The maximum number of zones used for */
|
||||||
/* glyph hinting. */
|
/* glyph hinting. */
|
||||||
@ -552,24 +591,48 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Sfnt_Tag */
|
/* FT_Sfnt_Tag */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* An enumeration used to specify the index of an SFNT table. */
|
/* An enumeration to specify indices of SFNT tables loaded and parsed */
|
||||||
/* Used in the @FT_Get_Sfnt_Table API function. */
|
/* 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_
|
typedef enum FT_Sfnt_Tag_
|
||||||
{
|
{
|
||||||
ft_sfnt_head = 0, /* TT_Header */
|
FT_SFNT_HEAD,
|
||||||
ft_sfnt_maxp = 1, /* TT_MaxProfile */
|
FT_SFNT_MAXP,
|
||||||
ft_sfnt_os2 = 2, /* TT_OS2 */
|
FT_SFNT_OS2,
|
||||||
ft_sfnt_hhea = 3, /* TT_HoriHeader */
|
FT_SFNT_HHEA,
|
||||||
ft_sfnt_vhea = 4, /* TT_VertHeader */
|
FT_SFNT_VHEA,
|
||||||
ft_sfnt_post = 5, /* TT_Postscript */
|
FT_SFNT_POST,
|
||||||
ft_sfnt_pclt = 6, /* TT_PCLT */
|
FT_SFNT_PCLT,
|
||||||
|
|
||||||
sfnt_max /* internal end mark */
|
FT_SFNT_MAX
|
||||||
|
|
||||||
} FT_Sfnt_Tag;
|
} 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 */
|
/* FT_Get_Sfnt_Table */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <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> */
|
/* <Input> */
|
||||||
/* face :: A handle to the source. */
|
/* face :: A handle to the source. */
|
||||||
@ -586,7 +649,7 @@ FT_BEGIN_HEADER
|
|||||||
/* tag :: The index of the SFNT table. */
|
/* tag :: The index of the SFNT table. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <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 */
|
/* error, or if the corresponding table was not found *OR* loaded */
|
||||||
/* from the file. */
|
/* from the file. */
|
||||||
/* */
|
/* */
|
||||||
@ -607,7 +670,7 @@ FT_BEGIN_HEADER
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* vert_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* )
|
FT_EXPORT( void* )
|
||||||
@ -615,64 +678,70 @@ FT_BEGIN_HEADER
|
|||||||
FT_Sfnt_Tag tag );
|
FT_Sfnt_Tag tag );
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
* FT_Load_Sfnt_Table
|
* FT_Load_Sfnt_Table
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Load any font table into client memory.
|
* Load any SFNT font table into client memory.
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* face ::
|
* face ::
|
||||||
* A handle to the source face.
|
* A handle to the source face.
|
||||||
*
|
*
|
||||||
* tag ::
|
* 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
|
* 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
|
* definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
|
||||||
* one with @FT_MAKE_TAG.
|
* one with @FT_MAKE_TAG.
|
||||||
*
|
*
|
||||||
* offset ::
|
* offset ::
|
||||||
* The starting offset in the table (or file if tag == 0).
|
* The starting offset in the table (or file if tag~==~0).
|
||||||
*
|
*
|
||||||
* @output:
|
* @output:
|
||||||
* buffer ::
|
* buffer ::
|
||||||
* The target buffer address. The client must ensure that the memory
|
* The target buffer address. The client must ensure that the memory
|
||||||
* array is big enough to hold the data.
|
* array is big enough to hold the data.
|
||||||
*
|
*
|
||||||
* @inout:
|
* @inout:
|
||||||
* length ::
|
* 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.
|
* Return an error code if it fails.
|
||||||
*
|
*
|
||||||
* Else, if `*length' is~0, exit immediately while returning the
|
* Else, if `*length' is~0, exit immediately while returning the
|
||||||
* table's (or file) full size in it.
|
* table's (or file) full size in it.
|
||||||
*
|
*
|
||||||
* Else the number of bytes to read from the table or file, from the
|
* Else the number of bytes to read from the table or file, from the
|
||||||
* starting offset.
|
* starting offset.
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* FreeType error code. 0~means success.
|
* FreeType error code. 0~means success.
|
||||||
*
|
*
|
||||||
* @note:
|
* @note:
|
||||||
* If you need to determine the table's length you should first call this
|
* If you need to determine the table's length you should first call this
|
||||||
* function with `*length' set to~0, as in the following example:
|
* function with `*length' set to~0, as in the following example:
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* FT_ULong length = 0;
|
* FT_ULong length = 0;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
|
* error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
|
||||||
* if ( error ) { ... table does not exist ... }
|
* if ( error ) { ... table does not exist ... }
|
||||||
*
|
*
|
||||||
* buffer = malloc( length );
|
* buffer = malloc( length );
|
||||||
* if ( buffer == NULL ) { ... not enough memory ... }
|
* if ( buffer == NULL ) { ... not enough memory ... }
|
||||||
*
|
*
|
||||||
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
|
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
|
||||||
* if ( error ) { ... could not load table ... }
|
* 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_EXPORT( FT_Error )
|
||||||
FT_Load_Sfnt_Table( FT_Face face,
|
FT_Load_Sfnt_Table( FT_Face face,
|
||||||
FT_ULong tag,
|
FT_ULong tag,
|
||||||
@ -681,41 +750,41 @@ FT_BEGIN_HEADER
|
|||||||
FT_ULong* length );
|
FT_ULong* length );
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
* @function:
|
* @function:
|
||||||
* FT_Sfnt_Table_Info
|
* FT_Sfnt_Table_Info
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* Return information on an SFNT table.
|
* Return information on an SFNT table.
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* face ::
|
* face ::
|
||||||
* A handle to the source face.
|
* A handle to the source face.
|
||||||
*
|
*
|
||||||
* table_index ::
|
* table_index ::
|
||||||
* The index of an SFNT table. The function returns
|
* The index of an SFNT table. The function returns
|
||||||
* FT_Err_Table_Missing for an invalid value.
|
* FT_Err_Table_Missing for an invalid value.
|
||||||
*
|
*
|
||||||
* @inout:
|
* @inout:
|
||||||
* tag ::
|
* tag ::
|
||||||
* The name tag of the SFNT table. If the value is NULL, `table_index'
|
* The name tag of the SFNT table. If the value is NULL, `table_index'
|
||||||
* is ignored, and `length' returns the number of SFNT tables in the
|
* is ignored, and `length' returns the number of SFNT tables in the
|
||||||
* font.
|
* font.
|
||||||
*
|
*
|
||||||
* @output:
|
* @output:
|
||||||
* length ::
|
* length ::
|
||||||
* The length of the SFNT table (or the number of SFNT tables, depending
|
* The length of the SFNT table (or the number of SFNT tables, depending
|
||||||
* on `tag').
|
* on `tag').
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* FreeType error code. 0~means success.
|
* FreeType error code. 0~means success.
|
||||||
*
|
*
|
||||||
* @note:
|
* @note:
|
||||||
* While parsing fonts, FreeType handles SFNT tables with length zero as
|
* While parsing fonts, FreeType handles SFNT tables with length zero as
|
||||||
* missing.
|
* missing.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Sfnt_Table_Info( FT_Face face,
|
FT_Sfnt_Table_Info( FT_Face face,
|
||||||
FT_UInt table_index,
|
FT_UInt table_index,
|
||||||
@ -729,16 +798,16 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Get_CMap_Language_ID */
|
/* FT_Get_CMap_Language_ID */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Return TrueType/sfnt specific cmap language ID. Definitions of */
|
/* Return cmap language ID as specified in the OpenType standard. */
|
||||||
/* language ID values are in `freetype/ttnameid.h'. */
|
/* Definitions of language ID values are in file @FT_TRUETYPE_IDS_H. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* charmap :: */
|
/* charmap :: */
|
||||||
/* The target charmap. */
|
/* The target charmap. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* The language ID of `charmap'. If `charmap' doesn't belong to a */
|
/* The language ID of `charmap'. If `charmap' doesn't belong to an */
|
||||||
/* TrueType/sfnt face, just return~0 as the default value. */
|
/* SFNT face, just return~0 as the default value. */
|
||||||
/* */
|
/* */
|
||||||
/* For a format~14 cmap (to access Unicode IVS), the return value is */
|
/* For a format~14 cmap (to access Unicode IVS), the return value is */
|
||||||
/* 0xFFFFFFFF. */
|
/* 0xFFFFFFFF. */
|
||||||
@ -753,15 +822,15 @@ FT_BEGIN_HEADER
|
|||||||
/* FT_Get_CMap_Format */
|
/* FT_Get_CMap_Format */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Return TrueType/sfnt specific cmap format. */
|
/* Return the format of an SFNT `cmap' table. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* charmap :: */
|
/* charmap :: */
|
||||||
/* The target charmap. */
|
/* The target charmap. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* The format of `charmap'. If `charmap' doesn't belong to a */
|
/* The format of `charmap'. If `charmap' doesn't belong to an SFNT */
|
||||||
/* TrueType/sfnt face, return -1. */
|
/* face, return -1. */
|
||||||
/* */
|
/* */
|
||||||
FT_EXPORT( FT_Long )
|
FT_EXPORT( FT_Long )
|
||||||
FT_Get_CMap_Format( FT_CharMap charmap );
|
FT_Get_CMap_Format( FT_CharMap charmap );
|
||||||
@ -771,7 +840,7 @@ FT_BEGIN_HEADER
|
|||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __TTTABLES_H__ */
|
#endif /* TTTABLES_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* Tags for TrueType and OpenType tables (specification only). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -16,8 +16,8 @@
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __TTAGS_H__
|
#ifndef TTAGS_H_
|
||||||
#define __TTAGS_H__
|
#define TTAGS_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
@ -40,7 +40,10 @@ FT_BEGIN_HEADER
|
|||||||
#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
|
#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
|
||||||
#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
|
#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
|
||||||
#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' )
|
#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_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_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' )
|
||||||
#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
|
#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
|
||||||
#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' )
|
#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_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
|
||||||
#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
|
#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
|
||||||
#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' )
|
#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_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' )
|
||||||
#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
|
#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
|
||||||
#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' )
|
#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_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' )
|
||||||
#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' )
|
#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' )
|
||||||
#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' )
|
#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_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' )
|
||||||
#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' )
|
#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' )
|
||||||
#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' )
|
#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_post FT_MAKE_TAG( 'p', 'o', 's', 't' )
|
||||||
#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
|
#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
|
||||||
#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', '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_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' )
|
||||||
#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
|
#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
|
||||||
#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' )
|
#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_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
|
||||||
#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
|
#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
|
||||||
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
|
#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
|
FT_END_HEADER
|
||||||
|
|
||||||
#endif /* __TTAGS_H__ */
|
#endif /* TTAGS_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* 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 */
|
|
@ -2,9 +2,9 @@
|
|||||||
/* */
|
/* */
|
||||||
/* ft2build.h */
|
/* ft2build.h */
|
||||||
/* */
|
/* */
|
||||||
/* Build macros of the FreeType 2 library. */
|
/* FreeType 2 build and setup macros. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2003, 2006 by */
|
/* Copyright 1996-2018 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
@ -18,44 +18,25 @@
|
|||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* This is a Unix-specific version of <ft2build.h> that should be used */
|
/* This is the `entry point' for FreeType header file inclusions. It is */
|
||||||
/* exclusively *after* installation of the library. */
|
/* the only header file which should be included directly; all other */
|
||||||
|
/* FreeType header files should be accessed with macro names (after */
|
||||||
|
/* including `ft2build.h'). */
|
||||||
/* */
|
/* */
|
||||||
/* It assumes that `/usr/local/include/freetype2' (or whatever is */
|
/* A typical example 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 */
|
/* #include <ft2build.h> */
|
||||||
/* a future FreeType 2 release, the following installation changes will */
|
/* #include FT_FREETYPE_H */
|
||||||
/* 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__
|
#ifndef FT2BUILD_H_
|
||||||
#define __FT2_BUILD_UNIX_H__
|
#define FT2BUILD_H_
|
||||||
|
|
||||||
/* `<prefix>/include/freetype2' must be in your current inclusion path */
|
|
||||||
#include <freetype/config/ftheader.h>
|
#include <freetype/config/ftheader.h>
|
||||||
|
|
||||||
#endif /* __FT2_BUILD_UNIX_H__ */
|
#endif /* FT2BUILD_H_ */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
#define __LIBFATVERSION_H__
|
#define __LIBFATVERSION_H__
|
||||||
|
|
||||||
#define _LIBFAT_MAJOR_ 1
|
#define _LIBFAT_MAJOR_ 1
|
||||||
#define _LIBFAT_MINOR_ 0
|
#define _LIBFAT_MINOR_ 1
|
||||||
#define _LIBFAT_PATCH_ 12
|
#define _LIBFAT_PATCH_ 5
|
||||||
|
|
||||||
#define _LIBFAT_STRING "libFAT Release 1.0.12"
|
#define _LIBFAT_STRING "libFAT Release 1.1.5"
|
||||||
|
|
||||||
#endif // __LIBFATVERSION_H__
|
#endif // __LIBFATVERSION_H__
|
||||||
|
25
portlibs/include/ogg/config_types.h
Normal file
25
portlibs/include/ogg/config_types.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef __CONFIG_TYPES_H__
|
||||||
|
#define __CONFIG_TYPES_H__
|
||||||
|
|
||||||
|
/* these are filled in by configure */
|
||||||
|
#define INCLUDE_INTTYPES_H 1
|
||||||
|
#define INCLUDE_STDINT_H 1
|
||||||
|
#define INCLUDE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
#if INCLUDE_INTTYPES_H
|
||||||
|
# include <inttypes.h>
|
||||||
|
#endif
|
||||||
|
#if INCLUDE_STDINT_H
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif
|
||||||
|
#if INCLUDE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef int16_t ogg_int16_t;
|
||||||
|
typedef uint16_t ogg_uint16_t;
|
||||||
|
typedef int32_t ogg_int32_t;
|
||||||
|
typedef uint32_t ogg_uint32_t;
|
||||||
|
typedef int64_t ogg_int64_t;
|
||||||
|
|
||||||
|
#endif
|
210
portlibs/include/ogg/ogg.h
Normal file
210
portlibs/include/ogg/ogg.h
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||||
|
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: toplevel libogg include
|
||||||
|
last mod: $Id$
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
#ifndef _OGG_H
|
||||||
|
#define _OGG_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <ogg/os_types.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
void *iov_base;
|
||||||
|
size_t iov_len;
|
||||||
|
} ogg_iovec_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
long endbyte;
|
||||||
|
int endbit;
|
||||||
|
|
||||||
|
unsigned char *buffer;
|
||||||
|
unsigned char *ptr;
|
||||||
|
long storage;
|
||||||
|
} oggpack_buffer;
|
||||||
|
|
||||||
|
/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned char *header;
|
||||||
|
long header_len;
|
||||||
|
unsigned char *body;
|
||||||
|
long body_len;
|
||||||
|
} ogg_page;
|
||||||
|
|
||||||
|
/* ogg_stream_state contains the current encode/decode state of a logical
|
||||||
|
Ogg bitstream **********************************************************/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned char *body_data; /* bytes from packet bodies */
|
||||||
|
long body_storage; /* storage elements allocated */
|
||||||
|
long body_fill; /* elements stored; fill mark */
|
||||||
|
long body_returned; /* elements of fill returned */
|
||||||
|
|
||||||
|
|
||||||
|
int *lacing_vals; /* The values that will go to the segment table */
|
||||||
|
ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
|
||||||
|
this way, but it is simple coupled to the
|
||||||
|
lacing fifo */
|
||||||
|
long lacing_storage;
|
||||||
|
long lacing_fill;
|
||||||
|
long lacing_packet;
|
||||||
|
long lacing_returned;
|
||||||
|
|
||||||
|
unsigned char header[282]; /* working space for header encode */
|
||||||
|
int header_fill;
|
||||||
|
|
||||||
|
int e_o_s; /* set when we have buffered the last packet in the
|
||||||
|
logical bitstream */
|
||||||
|
int b_o_s; /* set after we've written the initial page
|
||||||
|
of a logical bitstream */
|
||||||
|
long serialno;
|
||||||
|
long pageno;
|
||||||
|
ogg_int64_t packetno; /* sequence number for decode; the framing
|
||||||
|
knows where there's a hole in the data,
|
||||||
|
but we need coupling so that the codec
|
||||||
|
(which is in a separate abstraction
|
||||||
|
layer) also knows about the gap */
|
||||||
|
ogg_int64_t granulepos;
|
||||||
|
|
||||||
|
} ogg_stream_state;
|
||||||
|
|
||||||
|
/* ogg_packet is used to encapsulate the data and metadata belonging
|
||||||
|
to a single raw Ogg/Vorbis packet *************************************/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned char *packet;
|
||||||
|
long bytes;
|
||||||
|
long b_o_s;
|
||||||
|
long e_o_s;
|
||||||
|
|
||||||
|
ogg_int64_t granulepos;
|
||||||
|
|
||||||
|
ogg_int64_t packetno; /* sequence number for decode; the framing
|
||||||
|
knows where there's a hole in the data,
|
||||||
|
but we need coupling so that the codec
|
||||||
|
(which is in a separate abstraction
|
||||||
|
layer) also knows about the gap */
|
||||||
|
} ogg_packet;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned char *data;
|
||||||
|
int storage;
|
||||||
|
int fill;
|
||||||
|
int returned;
|
||||||
|
|
||||||
|
int unsynced;
|
||||||
|
int headerbytes;
|
||||||
|
int bodybytes;
|
||||||
|
} ogg_sync_state;
|
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
|
||||||
|
|
||||||
|
extern void oggpack_writeinit(oggpack_buffer *b);
|
||||||
|
extern int oggpack_writecheck(oggpack_buffer *b);
|
||||||
|
extern void oggpack_writetrunc(oggpack_buffer *b,long bits);
|
||||||
|
extern void oggpack_writealign(oggpack_buffer *b);
|
||||||
|
extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits);
|
||||||
|
extern void oggpack_reset(oggpack_buffer *b);
|
||||||
|
extern void oggpack_writeclear(oggpack_buffer *b);
|
||||||
|
extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
|
||||||
|
extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
|
||||||
|
extern long oggpack_look(oggpack_buffer *b,int bits);
|
||||||
|
extern long oggpack_look1(oggpack_buffer *b);
|
||||||
|
extern void oggpack_adv(oggpack_buffer *b,int bits);
|
||||||
|
extern void oggpack_adv1(oggpack_buffer *b);
|
||||||
|
extern long oggpack_read(oggpack_buffer *b,int bits);
|
||||||
|
extern long oggpack_read1(oggpack_buffer *b);
|
||||||
|
extern long oggpack_bytes(oggpack_buffer *b);
|
||||||
|
extern long oggpack_bits(oggpack_buffer *b);
|
||||||
|
extern unsigned char *oggpack_get_buffer(oggpack_buffer *b);
|
||||||
|
|
||||||
|
extern void oggpackB_writeinit(oggpack_buffer *b);
|
||||||
|
extern int oggpackB_writecheck(oggpack_buffer *b);
|
||||||
|
extern void oggpackB_writetrunc(oggpack_buffer *b,long bits);
|
||||||
|
extern void oggpackB_writealign(oggpack_buffer *b);
|
||||||
|
extern void oggpackB_writecopy(oggpack_buffer *b,void *source,long bits);
|
||||||
|
extern void oggpackB_reset(oggpack_buffer *b);
|
||||||
|
extern void oggpackB_writeclear(oggpack_buffer *b);
|
||||||
|
extern void oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
|
||||||
|
extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits);
|
||||||
|
extern long oggpackB_look(oggpack_buffer *b,int bits);
|
||||||
|
extern long oggpackB_look1(oggpack_buffer *b);
|
||||||
|
extern void oggpackB_adv(oggpack_buffer *b,int bits);
|
||||||
|
extern void oggpackB_adv1(oggpack_buffer *b);
|
||||||
|
extern long oggpackB_read(oggpack_buffer *b,int bits);
|
||||||
|
extern long oggpackB_read1(oggpack_buffer *b);
|
||||||
|
extern long oggpackB_bytes(oggpack_buffer *b);
|
||||||
|
extern long oggpackB_bits(oggpack_buffer *b);
|
||||||
|
extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b);
|
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: encoding **************************/
|
||||||
|
|
||||||
|
extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
|
||||||
|
extern int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov,
|
||||||
|
int count, long e_o_s, ogg_int64_t granulepos);
|
||||||
|
extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
|
||||||
|
extern int ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill);
|
||||||
|
extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og);
|
||||||
|
extern int ogg_stream_flush_fill(ogg_stream_state *os, ogg_page *og, int nfill);
|
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
|
||||||
|
|
||||||
|
extern int ogg_sync_init(ogg_sync_state *oy);
|
||||||
|
extern int ogg_sync_clear(ogg_sync_state *oy);
|
||||||
|
extern int ogg_sync_reset(ogg_sync_state *oy);
|
||||||
|
extern int ogg_sync_destroy(ogg_sync_state *oy);
|
||||||
|
extern int ogg_sync_check(ogg_sync_state *oy);
|
||||||
|
|
||||||
|
extern char *ogg_sync_buffer(ogg_sync_state *oy, long size);
|
||||||
|
extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
|
||||||
|
extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
|
||||||
|
extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
|
||||||
|
extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
|
||||||
|
extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
|
||||||
|
extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
|
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: general ***************************/
|
||||||
|
|
||||||
|
extern int ogg_stream_init(ogg_stream_state *os,int serialno);
|
||||||
|
extern int ogg_stream_clear(ogg_stream_state *os);
|
||||||
|
extern int ogg_stream_reset(ogg_stream_state *os);
|
||||||
|
extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
|
||||||
|
extern int ogg_stream_destroy(ogg_stream_state *os);
|
||||||
|
extern int ogg_stream_check(ogg_stream_state *os);
|
||||||
|
extern int ogg_stream_eos(ogg_stream_state *os);
|
||||||
|
|
||||||
|
extern void ogg_page_checksum_set(ogg_page *og);
|
||||||
|
|
||||||
|
extern int ogg_page_version(const ogg_page *og);
|
||||||
|
extern int ogg_page_continued(const ogg_page *og);
|
||||||
|
extern int ogg_page_bos(const ogg_page *og);
|
||||||
|
extern int ogg_page_eos(const ogg_page *og);
|
||||||
|
extern ogg_int64_t ogg_page_granulepos(const ogg_page *og);
|
||||||
|
extern int ogg_page_serialno(const ogg_page *og);
|
||||||
|
extern long ogg_page_pageno(const ogg_page *og);
|
||||||
|
extern int ogg_page_packets(const ogg_page *og);
|
||||||
|
|
||||||
|
extern void ogg_packet_clear(ogg_packet *op);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _OGG_H */
|
148
portlibs/include/ogg/os_types.h
Normal file
148
portlibs/include/ogg/os_types.h
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
|
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||||
|
last mod: $Id$
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
#ifndef _OS_TYPES_H
|
||||||
|
#define _OS_TYPES_H
|
||||||
|
|
||||||
|
/* make it easy on the folks that want to compile the libs with a
|
||||||
|
different malloc than stdlib */
|
||||||
|
#define _ogg_malloc malloc
|
||||||
|
#define _ogg_calloc calloc
|
||||||
|
#define _ogg_realloc realloc
|
||||||
|
#define _ogg_free free
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
|
||||||
|
# if defined(__CYGWIN__)
|
||||||
|
# include <stdint.h>
|
||||||
|
typedef int16_t ogg_int16_t;
|
||||||
|
typedef uint16_t ogg_uint16_t;
|
||||||
|
typedef int32_t ogg_int32_t;
|
||||||
|
typedef uint32_t ogg_uint32_t;
|
||||||
|
typedef int64_t ogg_int64_t;
|
||||||
|
typedef uint64_t ogg_uint64_t;
|
||||||
|
# elif defined(__MINGW32__)
|
||||||
|
# include <sys/types.h>
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
typedef unsigned short ogg_uint16_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef long long ogg_int64_t;
|
||||||
|
typedef unsigned long long ogg_uint64_t;
|
||||||
|
# elif defined(__MWERKS__)
|
||||||
|
typedef long long ogg_int64_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
typedef unsigned short ogg_uint16_t;
|
||||||
|
# else
|
||||||
|
# if defined(_MSC_VER) && (_MSC_VER >= 1800) /* MSVC 2013 and newer */
|
||||||
|
# include <stdint.h>
|
||||||
|
typedef int16_t ogg_int16_t;
|
||||||
|
typedef uint16_t ogg_uint16_t;
|
||||||
|
typedef int32_t ogg_int32_t;
|
||||||
|
typedef uint32_t ogg_uint32_t;
|
||||||
|
typedef int64_t ogg_int64_t;
|
||||||
|
typedef uint64_t ogg_uint64_t;
|
||||||
|
# else
|
||||||
|
/* MSVC/Borland */
|
||||||
|
typedef __int64 ogg_int64_t;
|
||||||
|
typedef __int32 ogg_int32_t;
|
||||||
|
typedef unsigned __int32 ogg_uint32_t;
|
||||||
|
typedef __int16 ogg_int16_t;
|
||||||
|
typedef unsigned __int16 ogg_uint16_t;
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
|
||||||
|
|
||||||
|
# include <inttypes.h>
|
||||||
|
typedef int16_t ogg_int16_t;
|
||||||
|
typedef uint16_t ogg_uint16_t;
|
||||||
|
typedef int32_t ogg_int32_t;
|
||||||
|
typedef uint32_t ogg_uint32_t;
|
||||||
|
typedef int64_t ogg_int64_t;
|
||||||
|
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
|
||||||
|
/* Haiku */
|
||||||
|
# include <sys/types.h>
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
typedef unsigned short ogg_uint16_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef long long ogg_int64_t;
|
||||||
|
|
||||||
|
#elif defined(__BEOS__)
|
||||||
|
|
||||||
|
/* Be */
|
||||||
|
# include <inttypes.h>
|
||||||
|
typedef int16_t ogg_int16_t;
|
||||||
|
typedef uint16_t ogg_uint16_t;
|
||||||
|
typedef int32_t ogg_int32_t;
|
||||||
|
typedef uint32_t ogg_uint32_t;
|
||||||
|
typedef int64_t ogg_int64_t;
|
||||||
|
|
||||||
|
#elif defined (__EMX__)
|
||||||
|
|
||||||
|
/* OS/2 GCC */
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
typedef unsigned short ogg_uint16_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef long long ogg_int64_t;
|
||||||
|
|
||||||
|
#elif defined (DJGPP)
|
||||||
|
|
||||||
|
/* DJGPP */
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef long long ogg_int64_t;
|
||||||
|
|
||||||
|
#elif defined(R5900)
|
||||||
|
|
||||||
|
/* PS2 EE */
|
||||||
|
typedef long ogg_int64_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned ogg_uint32_t;
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
|
||||||
|
#elif defined(__SYMBIAN32__)
|
||||||
|
|
||||||
|
/* Symbian GCC */
|
||||||
|
typedef signed short ogg_int16_t;
|
||||||
|
typedef unsigned short ogg_uint16_t;
|
||||||
|
typedef signed int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef long long int ogg_int64_t;
|
||||||
|
|
||||||
|
#elif defined(__TMS320C6X__)
|
||||||
|
|
||||||
|
/* TI C64x compiler */
|
||||||
|
typedef signed short ogg_int16_t;
|
||||||
|
typedef unsigned short ogg_uint16_t;
|
||||||
|
typedef signed int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef long long int ogg_int64_t;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <ogg/config_types.h>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _OS_TYPES_H */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
219
portlibs/include/pnglibconf.h
Normal file
219
portlibs/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 */
|
@ -1,26 +1,25 @@
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
* *
|
* *
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||||
* *
|
* *
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
* *
|
* *
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
* *
|
* *
|
||||||
********************************************************************
|
********************************************************************
|
||||||
|
|
||||||
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||||
|
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
#ifndef _OS_CVTYPES_H
|
#ifndef _OS_CVTYPES_H
|
||||||
#define _OS_CVTYPES_H
|
#define _OS_CVTYPES_H
|
||||||
|
|
||||||
typedef long long ogg_int64_t;
|
typedef long long ogg_int64_t;
|
||||||
typedef int ogg_int32_t;
|
typedef int ogg_int32_t;
|
||||||
typedef unsigned int ogg_uint32_t;
|
typedef unsigned int ogg_uint32_t;
|
||||||
typedef short ogg_int16_t;
|
typedef short ogg_int16_t;
|
||||||
typedef unsigned short ogg_uint16_t;
|
|
||||||
|
#endif
|
||||||
#endif
|
|
||||||
|
@ -1,104 +1,204 @@
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
* *
|
* *
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||||
* *
|
* *
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
* *
|
* *
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
* *
|
* *
|
||||||
********************************************************************
|
********************************************************************
|
||||||
|
|
||||||
function: libvorbis codec headers
|
function: libvorbis codec headers
|
||||||
|
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
#ifndef _vorbis_codec_h_
|
#ifndef _vorbis_codec_h_
|
||||||
#define _vorbis_codec_h_
|
#define _vorbis_codec_h_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#include "ogg.h"
|
#include <ogg/ogg.h>
|
||||||
|
|
||||||
struct vorbis_dsp_state;
|
typedef struct vorbis_info{
|
||||||
typedef struct vorbis_dsp_state vorbis_dsp_state;
|
int version;
|
||||||
|
int channels;
|
||||||
typedef struct vorbis_info{
|
long rate;
|
||||||
int version;
|
|
||||||
int channels;
|
/* The below bitrate declarations are *hints*.
|
||||||
long rate;
|
Combinations of the three values carry the following implications:
|
||||||
|
|
||||||
/* The below bitrate declarations are *hints*.
|
all three set to the same value:
|
||||||
Combinations of the three values carry the following implications:
|
implies a fixed rate bitstream
|
||||||
|
only nominal set:
|
||||||
all three set to the same value:
|
implies a VBR stream that averages the nominal bitrate. No hard
|
||||||
implies a fixed rate bitstream
|
upper/lower limit
|
||||||
only nominal set:
|
upper and or lower set:
|
||||||
implies a VBR stream that averages the nominal bitrate. No hard
|
implies a VBR bitstream that obeys the bitrate limits. nominal
|
||||||
upper/lower limit
|
may also be set to give a nominal rate.
|
||||||
upper and or lower set:
|
none set:
|
||||||
implies a VBR bitstream that obeys the bitrate limits. nominal
|
the coder does not care to speculate.
|
||||||
may also be set to give a nominal rate.
|
*/
|
||||||
none set:
|
|
||||||
the coder does not care to speculate.
|
long bitrate_upper;
|
||||||
*/
|
long bitrate_nominal;
|
||||||
|
long bitrate_lower;
|
||||||
long bitrate_upper;
|
long bitrate_window;
|
||||||
long bitrate_nominal;
|
|
||||||
long bitrate_lower;
|
void *codec_setup;
|
||||||
long bitrate_window;
|
} vorbis_info;
|
||||||
|
|
||||||
void *codec_setup;
|
/* vorbis_dsp_state buffers the current vorbis audio
|
||||||
} vorbis_info;
|
analysis/synthesis state. The DSP state belongs to a specific
|
||||||
|
logical bitstream ****************************************************/
|
||||||
typedef struct vorbis_comment{
|
typedef struct vorbis_dsp_state{
|
||||||
char **user_comments;
|
int analysisp;
|
||||||
int *comment_lengths;
|
vorbis_info *vi;
|
||||||
int comments;
|
|
||||||
char *vendor;
|
ogg_int32_t **pcm;
|
||||||
|
ogg_int32_t **pcmret;
|
||||||
} vorbis_comment;
|
int pcm_storage;
|
||||||
|
int pcm_current;
|
||||||
|
int pcm_returned;
|
||||||
/* Vorbis PRIMITIVES: general ***************************************/
|
|
||||||
|
int preextrapolate;
|
||||||
extern void vorbis_info_init(vorbis_info *vi);
|
int eofflag;
|
||||||
extern void vorbis_info_clear(vorbis_info *vi);
|
|
||||||
extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
|
long lW;
|
||||||
extern void vorbis_comment_init(vorbis_comment *vc);
|
long W;
|
||||||
extern void vorbis_comment_add(vorbis_comment *vc, char *comment);
|
long nW;
|
||||||
extern void vorbis_comment_add_tag(vorbis_comment *vc,
|
long centerW;
|
||||||
char *tag, char *contents);
|
|
||||||
extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
|
ogg_int64_t granulepos;
|
||||||
extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag);
|
ogg_int64_t sequence;
|
||||||
extern void vorbis_comment_clear(vorbis_comment *vc);
|
|
||||||
|
void *backend_state;
|
||||||
/* Vorbis ERRORS and return codes ***********************************/
|
} vorbis_dsp_state;
|
||||||
|
|
||||||
#define OV_FALSE -1
|
typedef struct vorbis_block{
|
||||||
#define OV_EOF -2
|
/* necessary stream state for linking to the framing abstraction */
|
||||||
#define OV_HOLE -3
|
ogg_int32_t **pcm; /* this is a pointer into local storage */
|
||||||
|
oggpack_buffer opb;
|
||||||
#define OV_EREAD -128
|
|
||||||
#define OV_EFAULT -129
|
long lW;
|
||||||
#define OV_EIMPL -130
|
long W;
|
||||||
#define OV_EINVAL -131
|
long nW;
|
||||||
#define OV_ENOTVORBIS -132
|
int pcmend;
|
||||||
#define OV_EBADHEADER -133
|
int mode;
|
||||||
#define OV_EVERSION -134
|
|
||||||
#define OV_ENOTAUDIO -135
|
int eofflag;
|
||||||
#define OV_EBADPACKET -136
|
ogg_int64_t granulepos;
|
||||||
#define OV_EBADLINK -137
|
ogg_int64_t sequence;
|
||||||
#define OV_ENOSEEK -138
|
vorbis_dsp_state *vd; /* For read-only access of configuration */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
/* local storage to avoid remallocing; it's up to the mapping to
|
||||||
}
|
structure it */
|
||||||
#endif /* __cplusplus */
|
void *localstore;
|
||||||
|
long localtop;
|
||||||
#endif
|
long localalloc;
|
||||||
|
long totaluse;
|
||||||
|
struct alloc_chain *reap;
|
||||||
|
|
||||||
|
} vorbis_block;
|
||||||
|
|
||||||
|
/* vorbis_block is a single block of data to be processed as part of
|
||||||
|
the analysis/synthesis stream; it belongs to a specific logical
|
||||||
|
bitstream, but is independant from other vorbis_blocks belonging to
|
||||||
|
that logical bitstream. *************************************************/
|
||||||
|
|
||||||
|
struct alloc_chain{
|
||||||
|
void *ptr;
|
||||||
|
struct alloc_chain *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* vorbis_info contains all the setup information specific to the
|
||||||
|
specific compression/decompression mode in progress (eg,
|
||||||
|
psychoacoustic settings, channel setup, options, codebook
|
||||||
|
etc). vorbis_info and substructures are in backends.h.
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
/* the comments are not part of vorbis_info so that vorbis_info can be
|
||||||
|
static storage */
|
||||||
|
typedef struct vorbis_comment{
|
||||||
|
/* unlimited user comment fields. libvorbis writes 'libvorbis'
|
||||||
|
whatever vendor is set to in encode */
|
||||||
|
char **user_comments;
|
||||||
|
int *comment_lengths;
|
||||||
|
int comments;
|
||||||
|
char *vendor;
|
||||||
|
|
||||||
|
} vorbis_comment;
|
||||||
|
|
||||||
|
|
||||||
|
/* libvorbis encodes in two abstraction layers; first we perform DSP
|
||||||
|
and produce a packet (see docs/analysis.txt). The packet is then
|
||||||
|
coded into a framed OggSquish bitstream by the second layer (see
|
||||||
|
docs/framing.txt). Decode is the reverse process; we sync/frame
|
||||||
|
the bitstream and extract individual packets, then decode the
|
||||||
|
packet back into PCM audio.
|
||||||
|
|
||||||
|
The extra framing/packetizing is used in streaming formats, such as
|
||||||
|
files. Over the net (such as with UDP), the framing and
|
||||||
|
packetization aren't necessary as they're provided by the transport
|
||||||
|
and the streaming layer is not used */
|
||||||
|
|
||||||
|
/* Vorbis PRIMITIVES: general ***************************************/
|
||||||
|
|
||||||
|
extern void vorbis_info_init(vorbis_info *vi);
|
||||||
|
extern void vorbis_info_clear(vorbis_info *vi);
|
||||||
|
extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
|
||||||
|
extern void vorbis_comment_init(vorbis_comment *vc);
|
||||||
|
extern void vorbis_comment_add(vorbis_comment *vc, char *comment);
|
||||||
|
extern void vorbis_comment_add_tag(vorbis_comment *vc,
|
||||||
|
char *tag, char *contents);
|
||||||
|
extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
|
||||||
|
extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag);
|
||||||
|
extern void vorbis_comment_clear(vorbis_comment *vc);
|
||||||
|
|
||||||
|
extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
|
||||||
|
extern int vorbis_block_clear(vorbis_block *vb);
|
||||||
|
extern void vorbis_dsp_clear(vorbis_dsp_state *v);
|
||||||
|
|
||||||
|
/* Vorbis PRIMITIVES: synthesis layer *******************************/
|
||||||
|
extern int vorbis_synthesis_idheader(ogg_packet *op);
|
||||||
|
extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
|
||||||
|
ogg_packet *op);
|
||||||
|
|
||||||
|
extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
|
||||||
|
extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
|
||||||
|
extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
|
||||||
|
extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
|
||||||
|
extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
|
||||||
|
extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm);
|
||||||
|
extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
|
||||||
|
extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
|
||||||
|
|
||||||
|
/* Vorbis ERRORS and return codes ***********************************/
|
||||||
|
|
||||||
|
#define OV_FALSE -1
|
||||||
|
#define OV_EOF -2
|
||||||
|
#define OV_HOLE -3
|
||||||
|
|
||||||
|
#define OV_EREAD -128
|
||||||
|
#define OV_EFAULT -129
|
||||||
|
#define OV_EIMPL -130
|
||||||
|
#define OV_EINVAL -131
|
||||||
|
#define OV_ENOTVORBIS -132
|
||||||
|
#define OV_EBADHEADER -133
|
||||||
|
#define OV_EVERSION -134
|
||||||
|
#define OV_ENOTAUDIO -135
|
||||||
|
#define OV_EBADPACKET -136
|
||||||
|
#define OV_EBADLINK -137
|
||||||
|
#define OV_ENOSEEK -138
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@ -1,122 +1,131 @@
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
* *
|
* *
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||||
* *
|
* *
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
* *
|
* *
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
* *
|
* *
|
||||||
********************************************************************
|
********************************************************************
|
||||||
|
|
||||||
function: stdio-based convenience library for opening/seeking/decoding
|
function: stdio-based convenience library for opening/seeking/decoding
|
||||||
|
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
#ifndef _OV_FILE_H_
|
#ifndef _OV_FILE_H_
|
||||||
#define _OV_FILE_H_
|
#define _OV_FILE_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "ivorbiscodec.h"
|
#include "ivorbiscodec.h"
|
||||||
|
|
||||||
/* The function prototypes for the callbacks are basically the same as for
|
#define CHUNKSIZE 65535
|
||||||
* the stdio functions fread, fseek, fclose, ftell.
|
#define READSIZE 1024
|
||||||
* The one difference is that the FILE * arguments have been replaced with
|
/* The function prototypes for the callbacks are basically the same as for
|
||||||
* a void * - this is to be used as a pointer to whatever internal data these
|
* the stdio functions fread, fseek, fclose, ftell.
|
||||||
* functions might need. In the stdio case, it's just a FILE * cast to a void *
|
* The one difference is that the FILE * arguments have been replaced with
|
||||||
*
|
* a void * - this is to be used as a pointer to whatever internal data these
|
||||||
* If you use other functions, check the docs for these functions and return
|
* functions might need. In the stdio case, it's just a FILE * cast to a void *
|
||||||
* the right values. For seek_func(), you *MUST* return -1 if the stream is
|
*
|
||||||
* unseekable
|
* If you use other functions, check the docs for these functions and return
|
||||||
*/
|
* the right values. For seek_func(), you *MUST* return -1 if the stream is
|
||||||
typedef struct {
|
* unseekable
|
||||||
size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource);
|
*/
|
||||||
int (*seek_func) (void *datasource, ogg_int64_t offset, int whence);
|
typedef struct {
|
||||||
int (*close_func) (void *datasource);
|
size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource);
|
||||||
long (*tell_func) (void *datasource);
|
int (*seek_func) (void *datasource, ogg_int64_t offset, int whence);
|
||||||
} ov_callbacks;
|
int (*close_func) (void *datasource);
|
||||||
|
long (*tell_func) (void *datasource);
|
||||||
typedef struct OggVorbis_File {
|
} ov_callbacks;
|
||||||
void *datasource; /* Pointer to a FILE *, etc. */
|
|
||||||
int seekable;
|
#define NOTOPEN 0
|
||||||
ogg_int64_t offset;
|
#define PARTOPEN 1
|
||||||
ogg_int64_t end;
|
#define OPENED 2
|
||||||
ogg_sync_state *oy;
|
#define STREAMSET 3
|
||||||
|
#define INITSET 4
|
||||||
/* If the FILE handle isn't seekable (eg, a pipe), only the current
|
|
||||||
stream appears */
|
typedef struct OggVorbis_File {
|
||||||
int links;
|
void *datasource; /* Pointer to a FILE *, etc. */
|
||||||
ogg_int64_t *offsets;
|
int seekable;
|
||||||
ogg_int64_t *dataoffsets;
|
ogg_int64_t offset;
|
||||||
ogg_uint32_t *serialnos;
|
ogg_int64_t end;
|
||||||
ogg_int64_t *pcmlengths;
|
ogg_sync_state oy;
|
||||||
vorbis_info vi;
|
|
||||||
vorbis_comment vc;
|
/* If the FILE handle isn't seekable (eg, a pipe), only the current
|
||||||
|
stream appears */
|
||||||
/* Decoding working state local storage */
|
int links;
|
||||||
ogg_int64_t pcm_offset;
|
ogg_int64_t *offsets;
|
||||||
int ready_state;
|
ogg_int64_t *dataoffsets;
|
||||||
ogg_uint32_t current_serialno;
|
ogg_uint32_t *serialnos;
|
||||||
int current_link;
|
ogg_int64_t *pcmlengths;
|
||||||
|
vorbis_info *vi;
|
||||||
ogg_int64_t bittrack;
|
vorbis_comment *vc;
|
||||||
ogg_int64_t samptrack;
|
|
||||||
|
/* Decoding working state local storage */
|
||||||
ogg_stream_state *os; /* take physical pages, weld into a logical
|
ogg_int64_t pcm_offset;
|
||||||
stream of packets */
|
int ready_state;
|
||||||
vorbis_dsp_state *vd; /* central working state for the packet->PCM decoder */
|
ogg_uint32_t current_serialno;
|
||||||
|
int current_link;
|
||||||
ov_callbacks callbacks;
|
|
||||||
|
ogg_int64_t bittrack;
|
||||||
} OggVorbis_File;
|
ogg_int64_t samptrack;
|
||||||
|
|
||||||
extern int ov_clear(OggVorbis_File *vf);
|
ogg_stream_state os; /* take physical pages, weld into a logical
|
||||||
extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
stream of packets */
|
||||||
extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
|
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
||||||
char *initial, long ibytes, ov_callbacks callbacks);
|
vorbis_block vb; /* local working space for packet->PCM decode */
|
||||||
|
|
||||||
extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
|
ov_callbacks callbacks;
|
||||||
extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
|
|
||||||
char *initial, long ibytes, ov_callbacks callbacks);
|
} OggVorbis_File;
|
||||||
extern int ov_test_open(OggVorbis_File *vf);
|
|
||||||
|
extern int ov_clear(OggVorbis_File *vf);
|
||||||
extern long ov_bitrate(OggVorbis_File *vf,int i);
|
extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
|
||||||
extern long ov_bitrate_instant(OggVorbis_File *vf);
|
extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
|
||||||
extern long ov_streams(OggVorbis_File *vf);
|
const char *initial, long ibytes, ov_callbacks callbacks);
|
||||||
extern long ov_seekable(OggVorbis_File *vf);
|
|
||||||
extern long ov_serialnumber(OggVorbis_File *vf,int i);
|
extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
|
||||||
|
extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
|
||||||
extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
|
const char *initial, long ibytes, ov_callbacks callbacks);
|
||||||
extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
|
extern int ov_test_open(OggVorbis_File *vf);
|
||||||
extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i);
|
|
||||||
|
extern long ov_bitrate(OggVorbis_File *vf,int i);
|
||||||
extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
extern long ov_bitrate_instant(OggVorbis_File *vf);
|
||||||
extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
extern long ov_streams(OggVorbis_File *vf);
|
||||||
extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
extern long ov_seekable(OggVorbis_File *vf);
|
||||||
extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
extern long ov_serialnumber(OggVorbis_File *vf,int i);
|
||||||
extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
|
||||||
|
extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
|
||||||
extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
|
extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
|
||||||
extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
|
extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i);
|
||||||
extern ogg_int64_t ov_time_tell(OggVorbis_File *vf);
|
|
||||||
|
extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
|
extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
|
extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
|
extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
extern long ov_read(OggVorbis_File *vf,void *buffer,int length,
|
extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
int *bitstream);
|
|
||||||
|
extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
|
||||||
#ifdef __cplusplus
|
extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
|
||||||
}
|
extern ogg_int64_t ov_time_tell(OggVorbis_File *vf);
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
|
||||||
#endif
|
extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
|
||||||
|
|
||||||
|
extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
|
||||||
|
int *bitstream);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,206 +0,0 @@
|
|||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
|
||||||
* *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: subsumed libogg includes
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
#ifndef _OGG_H
|
|
||||||
#define _OGG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "os_types.h"
|
|
||||||
|
|
||||||
typedef struct ogg_buffer_state{
|
|
||||||
struct ogg_buffer *unused_buffers;
|
|
||||||
struct ogg_reference *unused_references;
|
|
||||||
int outstanding;
|
|
||||||
int shutdown;
|
|
||||||
} ogg_buffer_state;
|
|
||||||
|
|
||||||
typedef struct ogg_buffer {
|
|
||||||
unsigned char *data;
|
|
||||||
long size;
|
|
||||||
int refcount;
|
|
||||||
|
|
||||||
union {
|
|
||||||
ogg_buffer_state *owner;
|
|
||||||
struct ogg_buffer *next;
|
|
||||||
} ptr;
|
|
||||||
} ogg_buffer;
|
|
||||||
|
|
||||||
typedef struct ogg_reference {
|
|
||||||
ogg_buffer *buffer;
|
|
||||||
long begin;
|
|
||||||
long length;
|
|
||||||
|
|
||||||
struct ogg_reference *next;
|
|
||||||
} ogg_reference;
|
|
||||||
|
|
||||||
typedef struct oggpack_buffer {
|
|
||||||
int headbit;
|
|
||||||
unsigned char *headptr;
|
|
||||||
long headend;
|
|
||||||
|
|
||||||
/* memory management */
|
|
||||||
ogg_reference *head;
|
|
||||||
ogg_reference *tail;
|
|
||||||
|
|
||||||
/* render the byte/bit counter API constant time */
|
|
||||||
long count; /* doesn't count the tail */
|
|
||||||
} oggpack_buffer;
|
|
||||||
|
|
||||||
typedef struct oggbyte_buffer {
|
|
||||||
ogg_reference *baseref;
|
|
||||||
|
|
||||||
ogg_reference *ref;
|
|
||||||
unsigned char *ptr;
|
|
||||||
long pos;
|
|
||||||
long end;
|
|
||||||
} oggbyte_buffer;
|
|
||||||
|
|
||||||
typedef struct ogg_sync_state {
|
|
||||||
/* decode memory management pool */
|
|
||||||
ogg_buffer_state *bufferpool;
|
|
||||||
|
|
||||||
/* stream buffers */
|
|
||||||
ogg_reference *fifo_head;
|
|
||||||
ogg_reference *fifo_tail;
|
|
||||||
long fifo_fill;
|
|
||||||
|
|
||||||
/* stream sync management */
|
|
||||||
int unsynced;
|
|
||||||
int headerbytes;
|
|
||||||
int bodybytes;
|
|
||||||
|
|
||||||
} ogg_sync_state;
|
|
||||||
|
|
||||||
typedef struct ogg_stream_state {
|
|
||||||
ogg_reference *header_head;
|
|
||||||
ogg_reference *header_tail;
|
|
||||||
ogg_reference *body_head;
|
|
||||||
ogg_reference *body_tail;
|
|
||||||
|
|
||||||
int e_o_s; /* set when we have buffered the last
|
|
||||||
packet in the logical bitstream */
|
|
||||||
int b_o_s; /* set after we've written the initial page
|
|
||||||
of a logical bitstream */
|
|
||||||
long serialno;
|
|
||||||
long pageno;
|
|
||||||
ogg_int64_t packetno; /* sequence number for decode; the framing
|
|
||||||
knows where there's a hole in the data,
|
|
||||||
but we need coupling so that the codec
|
|
||||||
(which is in a seperate abstraction
|
|
||||||
layer) also knows about the gap */
|
|
||||||
ogg_int64_t granulepos;
|
|
||||||
|
|
||||||
int lacing_fill;
|
|
||||||
ogg_uint32_t body_fill;
|
|
||||||
|
|
||||||
/* decode-side state data */
|
|
||||||
int holeflag;
|
|
||||||
int spanflag;
|
|
||||||
int clearflag;
|
|
||||||
int laceptr;
|
|
||||||
ogg_uint32_t body_fill_next;
|
|
||||||
|
|
||||||
} ogg_stream_state;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
ogg_reference *packet;
|
|
||||||
long bytes;
|
|
||||||
long b_o_s;
|
|
||||||
long e_o_s;
|
|
||||||
ogg_int64_t granulepos;
|
|
||||||
ogg_int64_t packetno; /* sequence number for decode; the framing
|
|
||||||
knows where there's a hole in the data,
|
|
||||||
but we need coupling so that the codec
|
|
||||||
(which is in a seperate abstraction
|
|
||||||
layer) also knows about the gap */
|
|
||||||
} ogg_packet;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
ogg_reference *header;
|
|
||||||
int header_len;
|
|
||||||
ogg_reference *body;
|
|
||||||
long body_len;
|
|
||||||
} ogg_page;
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
|
|
||||||
|
|
||||||
extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r);
|
|
||||||
extern long oggpack_look(oggpack_buffer *b,int bits);
|
|
||||||
extern void oggpack_adv(oggpack_buffer *b,int bits);
|
|
||||||
extern long oggpack_read(oggpack_buffer *b,int bits);
|
|
||||||
extern long oggpack_bytes(oggpack_buffer *b);
|
|
||||||
extern long oggpack_bits(oggpack_buffer *b);
|
|
||||||
extern int oggpack_eop(oggpack_buffer *b);
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
|
|
||||||
|
|
||||||
extern ogg_sync_state *ogg_sync_create(void);
|
|
||||||
extern int ogg_sync_destroy(ogg_sync_state *oy);
|
|
||||||
extern int ogg_sync_reset(ogg_sync_state *oy);
|
|
||||||
|
|
||||||
extern unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long size);
|
|
||||||
extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
|
|
||||||
extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
|
|
||||||
extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
|
|
||||||
extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
|
|
||||||
extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
|
|
||||||
extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: general ***************************/
|
|
||||||
|
|
||||||
extern ogg_stream_state *ogg_stream_create(int serialno);
|
|
||||||
extern int ogg_stream_destroy(ogg_stream_state *os);
|
|
||||||
extern int ogg_stream_reset(ogg_stream_state *os);
|
|
||||||
extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
|
|
||||||
extern int ogg_stream_eos(ogg_stream_state *os);
|
|
||||||
|
|
||||||
extern int ogg_page_checksum_set(ogg_page *og);
|
|
||||||
|
|
||||||
extern int ogg_page_version(ogg_page *og);
|
|
||||||
extern int ogg_page_continued(ogg_page *og);
|
|
||||||
extern int ogg_page_bos(ogg_page *og);
|
|
||||||
extern int ogg_page_eos(ogg_page *og);
|
|
||||||
extern ogg_int64_t ogg_page_granulepos(ogg_page *og);
|
|
||||||
extern ogg_uint32_t ogg_page_serialno(ogg_page *og);
|
|
||||||
extern ogg_uint32_t ogg_page_pageno(ogg_page *og);
|
|
||||||
extern int ogg_page_packets(ogg_page *og);
|
|
||||||
extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer);
|
|
||||||
|
|
||||||
extern int ogg_packet_release(ogg_packet *op);
|
|
||||||
extern int ogg_page_release(ogg_page *og);
|
|
||||||
|
|
||||||
extern void ogg_page_dup(ogg_page *d, ogg_page *s);
|
|
||||||
|
|
||||||
/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/
|
|
||||||
|
|
||||||
#define OGG_SUCCESS 0
|
|
||||||
|
|
||||||
#define OGG_HOLE -10
|
|
||||||
#define OGG_SPAN -11
|
|
||||||
#define OGG_EVERSION -12
|
|
||||||
#define OGG_ESERIAL -13
|
|
||||||
#define OGG_EINVAL -14
|
|
||||||
#define OGG_EEOS -15
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _OGG_H */
|
|
@ -1,93 +0,0 @@
|
|||||||
/********************************************************************
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
|
||||||
* *
|
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
||||||
* *
|
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* *
|
|
||||||
********************************************************************
|
|
||||||
|
|
||||||
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
|
||||||
|
|
||||||
********************************************************************/
|
|
||||||
#ifndef _OS_TYPES_H
|
|
||||||
#define _OS_TYPES_H
|
|
||||||
|
|
||||||
#ifdef _LOW_ACCURACY_
|
|
||||||
# define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
|
|
||||||
# define LOOKUP_T const unsigned char
|
|
||||||
#else
|
|
||||||
# define X(n) (n)
|
|
||||||
# define LOOKUP_T const ogg_int32_t
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* make it easy on the folks that want to compile the libs with a
|
|
||||||
different malloc than stdlib */
|
|
||||||
#define _ogg_malloc malloc
|
|
||||||
#define _ogg_calloc calloc
|
|
||||||
#define _ogg_realloc realloc
|
|
||||||
#define _ogg_free free
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
# ifndef __GNUC__
|
|
||||||
/* MSVC/Borland */
|
|
||||||
typedef __int64 ogg_int64_t;
|
|
||||||
typedef __int32 ogg_int32_t;
|
|
||||||
typedef unsigned __int32 ogg_uint32_t;
|
|
||||||
typedef __int16 ogg_int16_t;
|
|
||||||
typedef unsigned __int16 ogg_uint16_t;
|
|
||||||
# else
|
|
||||||
/* Cygwin */
|
|
||||||
#include <_G_config.h>
|
|
||||||
typedef _G_int64_t ogg_int64_t;
|
|
||||||
typedef _G_int32_t ogg_int32_t;
|
|
||||||
typedef _G_uint32_t ogg_uint32_t;
|
|
||||||
typedef _G_int16_t ogg_int16_t;
|
|
||||||
typedef _G_uint16_t ogg_uint16_t;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#elif defined(__MACOS__)
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
typedef SInt16 ogg_int16_t;
|
|
||||||
typedef UInt16 ogg_uint16_t;
|
|
||||||
typedef SInt32 ogg_int32_t;
|
|
||||||
typedef UInt32 ogg_uint32_t;
|
|
||||||
typedef SInt64 ogg_int64_t;
|
|
||||||
|
|
||||||
#elif defined(__MACOSX__) /* MacOS X Framework build */
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
typedef int16_t ogg_int16_t;
|
|
||||||
typedef u_int16_t ogg_uint16_t;
|
|
||||||
typedef int32_t ogg_int32_t;
|
|
||||||
typedef u_int32_t ogg_uint32_t;
|
|
||||||
typedef int64_t ogg_int64_t;
|
|
||||||
|
|
||||||
#elif defined(__BEOS__)
|
|
||||||
|
|
||||||
/* Be */
|
|
||||||
# include <inttypes.h>
|
|
||||||
|
|
||||||
#elif defined (__EMX__)
|
|
||||||
|
|
||||||
/* OS/2 GCC */
|
|
||||||
typedef short ogg_int16_t;
|
|
||||||
typedef unsigned short ogg_uint16_t;
|
|
||||||
typedef int ogg_int32_t;
|
|
||||||
typedef unsigned int ogg_uint32_t;
|
|
||||||
typedef long long ogg_int64_t;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
# include "config_types.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _OS_TYPES_H */
|
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
/* zconf.h -- configuration of the zlib compression library
|
/* 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
|
* 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 */
|
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||||
# define Z_PREFIX_SET
|
# define Z_PREFIX_SET
|
||||||
|
|
||||||
/* all linked symbols */
|
/* all linked symbols and init macros */
|
||||||
# define _dist_code z__dist_code
|
# define _dist_code z__dist_code
|
||||||
# define _length_code z__length_code
|
# define _length_code z__length_code
|
||||||
# define _tr_align z__tr_align
|
# define _tr_align z__tr_align
|
||||||
@ -29,6 +29,7 @@
|
|||||||
# define adler32 z_adler32
|
# define adler32 z_adler32
|
||||||
# define adler32_combine z_adler32_combine
|
# define adler32_combine z_adler32_combine
|
||||||
# define adler32_combine64 z_adler32_combine64
|
# define adler32_combine64 z_adler32_combine64
|
||||||
|
# define adler32_z z_adler32_z
|
||||||
# ifndef Z_SOLO
|
# ifndef Z_SOLO
|
||||||
# define compress z_compress
|
# define compress z_compress
|
||||||
# define compress2 z_compress2
|
# define compress2 z_compress2
|
||||||
@ -37,10 +38,14 @@
|
|||||||
# define crc32 z_crc32
|
# define crc32 z_crc32
|
||||||
# define crc32_combine z_crc32_combine
|
# define crc32_combine z_crc32_combine
|
||||||
# define crc32_combine64 z_crc32_combine64
|
# define crc32_combine64 z_crc32_combine64
|
||||||
|
# define crc32_z z_crc32_z
|
||||||
# define deflate z_deflate
|
# define deflate z_deflate
|
||||||
# define deflateBound z_deflateBound
|
# define deflateBound z_deflateBound
|
||||||
# define deflateCopy z_deflateCopy
|
# define deflateCopy z_deflateCopy
|
||||||
# define deflateEnd z_deflateEnd
|
# define deflateEnd z_deflateEnd
|
||||||
|
# define deflateGetDictionary z_deflateGetDictionary
|
||||||
|
# define deflateInit z_deflateInit
|
||||||
|
# define deflateInit2 z_deflateInit2
|
||||||
# define deflateInit2_ z_deflateInit2_
|
# define deflateInit2_ z_deflateInit2_
|
||||||
# define deflateInit_ z_deflateInit_
|
# define deflateInit_ z_deflateInit_
|
||||||
# define deflateParams z_deflateParams
|
# define deflateParams z_deflateParams
|
||||||
@ -67,6 +72,8 @@
|
|||||||
# define gzeof z_gzeof
|
# define gzeof z_gzeof
|
||||||
# define gzerror z_gzerror
|
# define gzerror z_gzerror
|
||||||
# define gzflush z_gzflush
|
# define gzflush z_gzflush
|
||||||
|
# define gzfread z_gzfread
|
||||||
|
# define gzfwrite z_gzfwrite
|
||||||
# define gzgetc z_gzgetc
|
# define gzgetc z_gzgetc
|
||||||
# define gzgetc_ z_gzgetc_
|
# define gzgetc_ z_gzgetc_
|
||||||
# define gzgets z_gzgets
|
# define gzgets z_gzgets
|
||||||
@ -78,7 +85,6 @@
|
|||||||
# define gzopen_w z_gzopen_w
|
# define gzopen_w z_gzopen_w
|
||||||
# endif
|
# endif
|
||||||
# define gzprintf z_gzprintf
|
# define gzprintf z_gzprintf
|
||||||
# define gzvprintf z_gzvprintf
|
|
||||||
# define gzputc z_gzputc
|
# define gzputc z_gzputc
|
||||||
# define gzputs z_gzputs
|
# define gzputs z_gzputs
|
||||||
# define gzread z_gzread
|
# define gzread z_gzread
|
||||||
@ -89,32 +95,39 @@
|
|||||||
# define gztell z_gztell
|
# define gztell z_gztell
|
||||||
# define gztell64 z_gztell64
|
# define gztell64 z_gztell64
|
||||||
# define gzungetc z_gzungetc
|
# define gzungetc z_gzungetc
|
||||||
|
# define gzvprintf z_gzvprintf
|
||||||
# define gzwrite z_gzwrite
|
# define gzwrite z_gzwrite
|
||||||
# endif
|
# endif
|
||||||
# define inflate z_inflate
|
# define inflate z_inflate
|
||||||
# define inflateBack z_inflateBack
|
# define inflateBack z_inflateBack
|
||||||
# define inflateBackEnd z_inflateBackEnd
|
# define inflateBackEnd z_inflateBackEnd
|
||||||
|
# define inflateBackInit z_inflateBackInit
|
||||||
# define inflateBackInit_ z_inflateBackInit_
|
# define inflateBackInit_ z_inflateBackInit_
|
||||||
|
# define inflateCodesUsed z_inflateCodesUsed
|
||||||
# define inflateCopy z_inflateCopy
|
# define inflateCopy z_inflateCopy
|
||||||
# define inflateEnd z_inflateEnd
|
# define inflateEnd z_inflateEnd
|
||||||
|
# define inflateGetDictionary z_inflateGetDictionary
|
||||||
# define inflateGetHeader z_inflateGetHeader
|
# define inflateGetHeader z_inflateGetHeader
|
||||||
|
# define inflateInit z_inflateInit
|
||||||
|
# define inflateInit2 z_inflateInit2
|
||||||
# define inflateInit2_ z_inflateInit2_
|
# define inflateInit2_ z_inflateInit2_
|
||||||
# define inflateInit_ z_inflateInit_
|
# define inflateInit_ z_inflateInit_
|
||||||
# define inflateMark z_inflateMark
|
# define inflateMark z_inflateMark
|
||||||
# define inflatePrime z_inflatePrime
|
# define inflatePrime z_inflatePrime
|
||||||
# define inflateReset z_inflateReset
|
# define inflateReset z_inflateReset
|
||||||
# define inflateReset2 z_inflateReset2
|
# define inflateReset2 z_inflateReset2
|
||||||
|
# define inflateResetKeep z_inflateResetKeep
|
||||||
# define inflateSetDictionary z_inflateSetDictionary
|
# define inflateSetDictionary z_inflateSetDictionary
|
||||||
# define inflateGetDictionary z_inflateGetDictionary
|
|
||||||
# define inflateSync z_inflateSync
|
# define inflateSync z_inflateSync
|
||||||
# define inflateSyncPoint z_inflateSyncPoint
|
# define inflateSyncPoint z_inflateSyncPoint
|
||||||
# define inflateUndermine z_inflateUndermine
|
# define inflateUndermine z_inflateUndermine
|
||||||
# define inflateResetKeep z_inflateResetKeep
|
# define inflateValidate z_inflateValidate
|
||||||
# define inflate_copyright z_inflate_copyright
|
# define inflate_copyright z_inflate_copyright
|
||||||
# define inflate_fast z_inflate_fast
|
# define inflate_fast z_inflate_fast
|
||||||
# define inflate_table z_inflate_table
|
# define inflate_table z_inflate_table
|
||||||
# ifndef Z_SOLO
|
# ifndef Z_SOLO
|
||||||
# define uncompress z_uncompress
|
# define uncompress z_uncompress
|
||||||
|
# define uncompress2 z_uncompress2
|
||||||
# endif
|
# endif
|
||||||
# define zError z_zError
|
# define zError z_zError
|
||||||
# ifndef Z_SOLO
|
# ifndef Z_SOLO
|
||||||
@ -224,9 +237,19 @@
|
|||||||
# define z_const
|
# define z_const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some Mac compilers merge all .h files incorrectly: */
|
#ifdef Z_SOLO
|
||||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
typedef unsigned long z_size_t;
|
||||||
# define NO_DUMMY_DECL
|
#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
|
#endif
|
||||||
|
|
||||||
/* Maximum value for memLevel in deflateInit2 */
|
/* Maximum value for memLevel in deflateInit2 */
|
||||||
@ -256,7 +279,7 @@
|
|||||||
Of course this will generally degrade compression (there's no free lunch).
|
Of course this will generally degrade compression (there's no free lunch).
|
||||||
|
|
||||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
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.
|
for small objects.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
/* 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
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@ -37,11 +37,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ZLIB_VERSION "1.2.8"
|
#define ZLIB_VERSION "1.2.11"
|
||||||
#define ZLIB_VERNUM 0x1280
|
#define ZLIB_VERNUM 0x12b0
|
||||||
#define ZLIB_VER_MAJOR 1
|
#define ZLIB_VER_MAJOR 1
|
||||||
#define ZLIB_VER_MINOR 2
|
#define ZLIB_VER_MINOR 2
|
||||||
#define ZLIB_VER_REVISION 8
|
#define ZLIB_VER_REVISION 11
|
||||||
#define ZLIB_VER_SUBREVISION 0
|
#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
|
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.
|
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
|
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-
|
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 library does not install any signal handler. The decoder checks
|
||||||
the consistency of the compressed data, so the library should never crash
|
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));
|
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 */
|
uInt avail_in; /* number of bytes available at next_in */
|
||||||
uLong total_in; /* total number of input bytes read so far */
|
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 */
|
uInt avail_out; /* remaining free space at next_out */
|
||||||
uLong total_out; /* total number of bytes output so far */
|
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 */
|
free_func zfree; /* used to free the internal state */
|
||||||
voidpf opaque; /* private data object passed to zalloc and zfree */
|
voidpf opaque; /* private data object passed to zalloc and zfree */
|
||||||
|
|
||||||
int data_type; /* best guess about the data type: binary or text */
|
int data_type; /* best guess about the data type: binary or text
|
||||||
uLong adler; /* adler32 value of the uncompressed data */
|
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 */
|
uLong reserved; /* reserved for future use */
|
||||||
} z_stream;
|
} 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.
|
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
|
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
|
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
|
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
|
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
|
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).
|
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_TEXT 1
|
||||||
#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
|
#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
|
||||||
#define Z_UNKNOWN 2
|
#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
|
#define Z_DEFLATED 8
|
||||||
/* The deflate compression method (the only one supported in this version) */
|
/* 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
|
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().
|
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.
|
accordingly. This action is forced if the parameter flush is non zero.
|
||||||
Forcing flush frequently degrades the compression ratio, so this parameter
|
Forcing flush frequently degrades the compression ratio, so this parameter
|
||||||
should be set only when necessary (in interactive applications). Some
|
should be set only when necessary. Some output may be provided even if
|
||||||
output may be provided even if flush is not set.
|
flush is zero.
|
||||||
|
|
||||||
Before the call of deflate(), the application should ensure that at least
|
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
|
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
|
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
|
== 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
|
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
|
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
|
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.
|
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
|
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
|
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
|
in order for the decompressor to finish the block before the empty fixed
|
||||||
block.
|
codes block.
|
||||||
|
|
||||||
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
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
|
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,
|
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
|
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
|
enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
|
||||||
called again with Z_FINISH and more output space (updated avail_out) but no
|
function must be called again with Z_FINISH and more output space (updated
|
||||||
more input data, until it returns with Z_STREAM_END or an error. After
|
avail_out) but no more input data, until it returns with Z_STREAM_END or an
|
||||||
deflate has returned Z_STREAM_END, the only possible operations on the stream
|
error. After deflate has returned Z_STREAM_END, the only possible operations
|
||||||
are deflateReset or deflateEnd.
|
on the stream are deflateReset or deflateEnd.
|
||||||
|
|
||||||
Z_FINISH can be used immediately after deflateInit if all the compression
|
Z_FINISH can be used in the first deflate call after deflateInit if all the
|
||||||
is to be done in a single step. In this case, avail_out must be at least the
|
compression is to be done in a single step. In order to complete in one
|
||||||
value returned by deflateBound (see below). Then deflate is guaranteed to
|
call, avail_out must be at least the value returned by deflateBound (see
|
||||||
return Z_STREAM_END. If not enough output space is provided, deflate will
|
below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
|
||||||
not return Z_STREAM_END, and it must be called again as described above.
|
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
|
deflate() sets strm->adler to the Adler-32 checksum of all input read
|
||||||
so far (that is, total_in bytes).
|
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
|
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
|
the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
|
||||||
binary. This field is only for information purposes and does not affect the
|
considered binary. This field is only for information purposes and does not
|
||||||
compression algorithm in any manner.
|
affect the compression algorithm in any manner.
|
||||||
|
|
||||||
deflate() returns Z_OK if some progress has been made (more input
|
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
|
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
|
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
|
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
|
if next_in or next_out was Z_NULL or the state was inadvertently written over
|
||||||
(for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
|
by the application), or Z_BUF_ERROR if no progress is possible (for example
|
||||||
fatal, and deflate() can be called again with more input and more output
|
avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
|
||||||
space to continue compressing.
|
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
|
Initializes the internal stream state for decompression. The fields
|
||||||
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
|
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
|
the caller. In the current version of inflate, the provided input is not
|
||||||
exact value depends on the compression method), inflateInit determines the
|
read or consumed. The allocation of a sliding window will be deferred to
|
||||||
compression method from the zlib header and allocates all data structures
|
the first call of inflate (if the decompression does not complete on the
|
||||||
accordingly; otherwise the allocation will be deferred to the first call of
|
first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
|
||||||
inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
|
them to use default allocation functions.
|
||||||
use default allocation functions.
|
|
||||||
|
|
||||||
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
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
|
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
|
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
|
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
|
there is no error message. inflateInit does not perform any decompression.
|
||||||
apart from possibly reading the zlib header if present: actual decompression
|
Actual decompression will be done by inflate(). So next_in, and avail_in,
|
||||||
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
|
||||||
next_out and avail_out are unused and unchanged.) The current implementation
|
implementation of inflateInit() does not process any header information --
|
||||||
of inflateInit() does not process any header information -- that is deferred
|
that is deferred until inflate() is called.
|
||||||
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
|
- 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
|
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
|
enough room in the output buffer), then next_in and avail_in are updated
|
||||||
resume at this point for the next call of inflate().
|
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
|
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
|
no more input data or no more space in the output buffer (see below about
|
||||||
the flush parameter).
|
the flush parameter).
|
||||||
|
|
||||||
Before the call of inflate(), the application should ensure that at least
|
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
|
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
|
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
|
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
|
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.
|
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.
|
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
|
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
|
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
|
128 if inflate() returned immediately after decoding an end-of-block code or
|
||||||
@ -454,7 +465,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
|||||||
this case all pending input is processed and all pending output is flushed;
|
this case all pending input is processed and all pending output is flushed;
|
||||||
avail_out must be large enough to hold all of the uncompressed data for the
|
avail_out must be large enough to hold all of the uncompressed data for the
|
||||||
operation to complete. (The size of the uncompressed data may have been
|
operation to complete. (The size of the uncompressed data may have been
|
||||||
saved by the compressor for this purpose.) The use of Z_FINISH is not
|
saved by the compressor for this purpose.) The use of Z_FINISH is not
|
||||||
required to perform an inflation in one step. However it may be used to
|
required to perform an inflation in one step. However it may be used to
|
||||||
inform inflate that a faster approach can be used for the single inflate()
|
inform inflate that a faster approach can be used for the single inflate()
|
||||||
call. Z_FINISH also informs inflate to not maintain a sliding window if the
|
call. Z_FINISH also informs inflate to not maintain a sliding window if the
|
||||||
@ -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
|
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,
|
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
|
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
|
checksum is equal to that saved by the compressor and returns Z_STREAM_END
|
||||||
only if the checksum is correct.
|
only if the checksum is correct.
|
||||||
|
|
||||||
inflate() can decompress and check either zlib-wrapped or gzip-wrapped
|
inflate() can decompress and check either zlib-wrapped or gzip-wrapped
|
||||||
deflate data. The header type is detected automatically, if requested when
|
deflate data. The header type is detected automatically, if requested when
|
||||||
initializing with inflateInit2(). Any information contained in the gzip
|
initializing with inflateInit2(). Any information contained in the gzip
|
||||||
header is not retained, so applications that need that information should
|
header is not retained unless inflateGetHeader() is used. When processing
|
||||||
instead use raw inflate, see inflateInit2() below, or inflateBack() and
|
|
||||||
perform their own processing of the gzip header and trailer. When processing
|
|
||||||
gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
|
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
|
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
|
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
|
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
|
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
|
corrupted (input stream not conforming to the zlib format or incorrect check
|
||||||
value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
|
value, in which case strm->msg points to a string with a more specific
|
||||||
next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
|
error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
|
||||||
Z_BUF_ERROR if no progress is possible or if there was not enough room in the
|
next_in or next_out was Z_NULL, or the state was inadvertently written over
|
||||||
output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
|
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
|
inflate() can be called again with more input and more output space to
|
||||||
continue decompressing. If Z_DATA_ERROR is returned, the application may
|
continue decompressing. If Z_DATA_ERROR is returned, the application may
|
||||||
then call inflateSync() to look for a good compression block if a partial
|
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
|
This function discards any unprocessed input and does not flush any pending
|
||||||
output.
|
output.
|
||||||
|
|
||||||
inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
|
inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
|
||||||
was inconsistent. In the error case, msg may be set but then points to a
|
was inconsistent.
|
||||||
static string (which must not be deallocated).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -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
|
compression at the expense of memory usage. The default value is 15 if
|
||||||
deflateInit is used instead.
|
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
|
windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
|
||||||
determines the window size. deflate() will then generate raw deflate data
|
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
|
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
|
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
|
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
|
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
|
header crc, and the operating system will be set to the appropriate value,
|
||||||
gzip stream is being written, strm->adler is a crc32 instead of an adler32.
|
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
|
The memLevel parameter specifies how much memory should be allocated
|
||||||
for the internal compression state. memLevel=1 uses minimum memory but is
|
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
|
addition, the current implementation of deflate will use at most the window
|
||||||
size minus 262 bytes of the provided dictionary.
|
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
|
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
|
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
|
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
|
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
|
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().
|
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,
|
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
||||||
z_streamp source));
|
z_streamp source));
|
||||||
/*
|
/*
|
||||||
@ -648,10 +694,10 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
|||||||
|
|
||||||
ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
|
ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
|
||||||
/*
|
/*
|
||||||
This function is equivalent to deflateEnd followed by deflateInit,
|
This function is equivalent to deflateEnd followed by deflateInit, but
|
||||||
but does not free and reallocate all the internal compression state. The
|
does not free and reallocate the internal compression state. The stream
|
||||||
stream will keep the same compression level and any other attributes that
|
will leave the compression level and any other attributes that may have been
|
||||||
may have been set by deflateInit2.
|
set unchanged.
|
||||||
|
|
||||||
deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
|
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).
|
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));
|
int strategy));
|
||||||
/*
|
/*
|
||||||
Dynamically update the compression level and compression strategy. The
|
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
|
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.
|
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
|
If the compression approach (which is a function of the level) or the
|
||||||
compressed with the old level (and may be flushed); the new level will take
|
strategy is changed, and if any input has been consumed in a previous
|
||||||
effect only at the next call of deflate().
|
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
|
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
|
||||||
a call of deflate(), since the currently available input may have to be
|
not have enough output space to complete, then the parameter change will not
|
||||||
compressed and flushed. In particular, strm->avail_out must be non-zero.
|
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
|
In order to assure a change in the parameters on the first try, the
|
||||||
stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
|
deflate stream should be flushed using deflate() with Z_BLOCK or other flush
|
||||||
strm->avail_out was zero.
|
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,
|
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
|
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
|
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
|
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
|
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
|
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.
|
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
|
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
|
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
|
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
|
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
|
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
|
Initializes the decompression dictionary from the given uncompressed byte
|
||||||
sequence. This function must be called immediately after a call of inflate,
|
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
|
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
|
The compressor and decompressor must use exactly the same dictionary (see
|
||||||
deflateSetDictionary). For raw inflate, this function can be called at any
|
deflateSetDictionary). For raw inflate, this function can be called at any
|
||||||
time to set the dictionary. If the provided dictionary is smaller than the
|
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
|
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
|
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
|
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
|
perform any decompression: this will be done by subsequent calls of
|
||||||
inflate().
|
inflate().
|
||||||
*/
|
*/
|
||||||
@ -892,7 +957,7 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
|||||||
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
||||||
/*
|
/*
|
||||||
This function is equivalent to inflateEnd followed by inflateInit,
|
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.
|
stream will keep attributes that may have been set by inflateInit2.
|
||||||
|
|
||||||
inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
|
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
|
This function is the same as inflateReset, but it also permits changing
|
||||||
the wrap and window size requests. The windowBits parameter is interpreted
|
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
|
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
|
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
|
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.
|
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.
|
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
|
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
|
files and writes out uncompressed files. The utility would decode the
|
||||||
header and process the trailer on its own, hence this routine expects only
|
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
|
the raw deflate stream to decompress. This is different from the default
|
||||||
behavior of inflate(), which expects either a zlib or gzip header and
|
behavior of inflate(), which expects a zlib header and trailer around the
|
||||||
trailer around the deflate stream.
|
deflate stream.
|
||||||
|
|
||||||
inflateBack() uses two subroutines supplied by the caller that are then
|
inflateBack() uses two subroutines supplied by the caller that are then
|
||||||
called by inflateBack() for input and output. inflateBack() calls those
|
called by inflateBack() for input and output. inflateBack() calls those
|
||||||
@ -1059,12 +1126,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
|||||||
parameters and return types are defined above in the in_func and out_func
|
parameters and return types are defined above in the in_func and out_func
|
||||||
typedefs. inflateBack() will call in(in_desc, &buf) which should return the
|
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
|
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
|
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
|
case -- and inflateBack() will return a buffer error. inflateBack() will
|
||||||
out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
|
call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
|
||||||
should return zero on success, or non-zero on failure. If out() returns
|
out() should return zero on success, or non-zero on failure. If out()
|
||||||
non-zero, inflateBack() will return with an error. Neither in() nor out()
|
returns non-zero, inflateBack() will return with an error. Neither in() nor
|
||||||
are permitted to change the contents of the window provided to
|
out() are permitted to change the contents of the window provided to
|
||||||
inflateBackInit(), which is also the buffer that out() uses to write from.
|
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
|
The length written by out() will be at most the window size. Any non-zero
|
||||||
amount of input may be provided by in().
|
amount of input may be provided by in().
|
||||||
@ -1092,7 +1159,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
|||||||
using strm->next_in which will be Z_NULL only if in() returned an error. If
|
using strm->next_in which will be Z_NULL only if in() returned an error. If
|
||||||
strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
|
strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
|
||||||
non-zero. (in() will always be called before out(), so strm->next_in is
|
non-zero. (in() will always be called before out(), so strm->next_in is
|
||||||
assured to be defined if out() returns non-zero.) Note that inflateBack()
|
assured to be defined if out() returns non-zero.) Note that inflateBack()
|
||||||
cannot return Z_OK.
|
cannot return Z_OK.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1114,7 +1181,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
|||||||
7.6: size of z_off_t
|
7.6: size of z_off_t
|
||||||
|
|
||||||
Compiler, assembler, and debug options:
|
Compiler, assembler, and debug options:
|
||||||
8: DEBUG
|
8: ZLIB_DEBUG
|
||||||
9: ASMV or ASMINF -- use ASM code
|
9: ASMV or ASMINF -- use ASM code
|
||||||
10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
|
10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
|
||||||
11: 0 (reserved)
|
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
|
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
|
of the destination buffer, which must be at least the value returned by
|
||||||
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
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
|
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
|
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
|
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
|
destination buffer, which must be at least the value returned by
|
||||||
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
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
|
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,
|
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
|
uncompressed data. (The size of the uncompressed data must have been saved
|
||||||
previously by the compressor and transmitted to the decompressor by some
|
previously by the compressor and transmitted to the decompressor by some
|
||||||
mechanism outside the scope of this compression library.) Upon exit, destLen
|
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
|
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
|
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.
|
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 */
|
/* 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
|
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
|
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
|
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
|
write. Three times that size in buffer space is allocated. A larger buffer
|
||||||
writing, or one of the specified size and the other twice that size when
|
size of, for example, 64K or 128K bytes will noticeably increase the speed
|
||||||
reading. A larger buffer size of, for example, 64K or 128K bytes will
|
of decompression (reading).
|
||||||
noticeably increase the speed of decompression (reading).
|
|
||||||
|
|
||||||
The new buffer size also affects the maximum length for gzprintf().
|
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));
|
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
||||||
/*
|
/*
|
||||||
Dynamically update the compression level or strategy. See the description
|
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
|
gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
|
||||||
opened for writing.
|
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));
|
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.
|
case.
|
||||||
|
|
||||||
gzread returns the number of uncompressed bytes actually read, less than
|
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,
|
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
||||||
@ -1346,19 +1451,33 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
|||||||
error.
|
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, ...));
|
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
|
||||||
/*
|
/*
|
||||||
Converts, formats, and writes the arguments to the compressed file under
|
Converts, formats, and writes the arguments to the compressed file under
|
||||||
control of the format string, as in fprintf. gzprintf returns the number of
|
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 actually written, or a negative zlib error code in case
|
||||||
uncompressed bytes written is limited to 8191, or one less than the buffer
|
of error. The number of uncompressed bytes written is limited to 8191, or
|
||||||
size given to gzbuffer(). The caller should assure that this limit is not
|
one less than the buffer size given to gzbuffer(). The caller should assure
|
||||||
exceeded. If it is exceeded, then gzprintf() will return an error (0) with
|
that this limit is not exceeded. If it is exceeded, then gzprintf() will
|
||||||
nothing written. In this case, there may also be a buffer overflow with
|
return an error (0) with nothing written. In this case, there may also be a
|
||||||
unpredictable consequences, which is possible only if zlib was compiled with
|
buffer overflow with unpredictable consequences, which is possible only if
|
||||||
the insecure functions sprintf() or vsprintf() because the secure snprintf()
|
zlib was compiled with the insecure functions sprintf() or vsprintf()
|
||||||
or vsnprintf() functions were not available. This can be determined using
|
because the secure snprintf() or vsnprintf() functions were not available.
|
||||||
zlibCompileFlags().
|
This can be determined using zlibCompileFlags().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
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
|
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 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
|
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
|
gzflush should be called only when strictly necessary because it will
|
||||||
degrade compression if called too often.
|
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
|
return the updated checksum. If buf is Z_NULL, this function returns the
|
||||||
required initial value for the checksum.
|
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.
|
much faster.
|
||||||
|
|
||||||
Usage example:
|
Usage example:
|
||||||
@ -1585,6 +1704,12 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
|||||||
if (adler != original_adler) error();
|
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,
|
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
|
||||||
z_off_t len2));
|
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();
|
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));
|
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
|
||||||
|
|
||||||
@ -1644,19 +1775,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
|||||||
unsigned char FAR *window,
|
unsigned char FAR *window,
|
||||||
const char *version,
|
const char *version,
|
||||||
int stream_size));
|
int stream_size));
|
||||||
#define deflateInit(strm, level) \
|
#ifdef Z_PREFIX_SET
|
||||||
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
# define z_deflateInit(strm, level) \
|
||||||
#define inflateInit(strm) \
|
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||||
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
# define z_inflateInit(strm) \
|
||||||
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||||
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
||||||
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
||||||
#define inflateInit2(strm, windowBits) \
|
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||||
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
# define z_inflateInit2(strm, windowBits) \
|
||||||
(int)sizeof(z_stream))
|
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
||||||
#define inflateBackInit(strm, windowBits, window) \
|
(int)sizeof(z_stream))
|
||||||
inflateBackInit_((strm), (windowBits), (window), \
|
# define z_inflateBackInit(strm, windowBits, window) \
|
||||||
ZLIB_VERSION, (int)sizeof(z_stream))
|
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) \
|
||||||
|
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||||
|
# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
||||||
|
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
||||||
|
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||||
|
# define inflateInit2(strm, windowBits) \
|
||||||
|
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
||||||
|
(int)sizeof(z_stream))
|
||||||
|
# define inflateBackInit(strm, windowBits, window) \
|
||||||
|
inflateBackInit_((strm), (windowBits), (window), \
|
||||||
|
ZLIB_VERSION, (int)sizeof(z_stream))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef Z_SOLO
|
#ifndef Z_SOLO
|
||||||
|
|
||||||
@ -1676,10 +1823,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|||||||
#ifdef Z_PREFIX_SET
|
#ifdef Z_PREFIX_SET
|
||||||
# undef z_gzgetc
|
# undef z_gzgetc
|
||||||
# define z_gzgetc(g) \
|
# 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
|
#else
|
||||||
# define gzgetc(g) \
|
# define gzgetc(g) \
|
||||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
|
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
|
/* 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 */
|
#endif /* !Z_SOLO */
|
||||||
|
|
||||||
/* hack for buggy compilers */
|
|
||||||
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
|
|
||||||
struct internal_state {int dummy;};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* undocumented functions */
|
/* undocumented functions */
|
||||||
ZEXTERN const char * ZEXPORT zError OF((int));
|
ZEXTERN const char * ZEXPORT zError OF((int));
|
||||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
||||||
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
|
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
|
||||||
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
|
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 inflateResetKeep OF((z_streamp));
|
||||||
ZEXTERN int ZEXPORT deflateResetKeep 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,
|
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
||||||
const char *mode));
|
const char *mode));
|
||||||
#endif
|
#endif
|
||||||
|
BIN
portlibs/lib/libbz2.a
Normal file
BIN
portlibs/lib/libbz2.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
portlibs/lib/libogg.a
Normal file
BIN
portlibs/lib/libogg.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -37,7 +37,7 @@ INCLUDES :=
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
MACHDEP := -mno-eabi -mno-sdata -mcpu=750
|
MACHDEP := -mno-eabi -mno-sdata -mcpu=750
|
||||||
CFLAGS := -Wall -W -O1 -ffreestanding -std=gnu99 -Wstrict-aliasing=2 $(MACHDEP) $(INCLUDE)
|
CFLAGS := -Wall -W -O1 -ffreestanding -std=gnu99 -Wstrict-aliasing=2 $(MACHDEP) $(INCLUDE)
|
||||||
LDFLAGS := -nostartfiles -nostdlib $(MACHDEP)
|
LDFLAGS := -nostartfiles -nostdlib $(MACHDEP) -Wl,--no-warn-rwx-segments
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# move loader to another location - THANKS CREDIAR - 0x81330000 for HBC
|
# move loader to another location - THANKS CREDIAR - 0x81330000 for HBC
|
||||||
|
@ -23,7 +23,8 @@ INCLUDES := source
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
CFLAGS = -g -ggdb -O1 -Wall -Wextra -Wno-shift-negative-value $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H
|
FALSE_POSITIVES := -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread
|
||||||
|
CFLAGS = -g -ggdb -O1 -Wall -Wextra -Wno-shift-negative-value $(FALSE_POSITIVES) $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H
|
||||||
CXXFLAGS = $(CFLAGS)
|
CXXFLAGS = $(CFLAGS)
|
||||||
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80A80000
|
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80A80000
|
||||||
|
|
||||||
|
@ -41,19 +41,20 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "videopatch.h"
|
#include "videopatch.h"
|
||||||
#include "video_tinyload.h"
|
#include "video_tinyload.h"
|
||||||
|
#include "apploader.h"
|
||||||
using namespace std;
|
#include "memory.h"
|
||||||
|
|
||||||
void *dolchunkoffset[18];
|
void *dolchunkoffset[18];
|
||||||
u32 dolchunksize[18];
|
u32 dolchunksize[18];
|
||||||
u32 dolchunkcount;
|
u32 dolchunkcount;
|
||||||
u32 bootcontent;
|
u32 bootcontent;
|
||||||
|
bool isForwarder = false;
|
||||||
|
|
||||||
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
|
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
|
||||||
|
|
||||||
static u8 *GetDol(u32 bootcontent, u64 title)
|
static u8 *GetDol(u32 bootcontent, u64 title)
|
||||||
{
|
{
|
||||||
snprintf(filepath, ISFS_MAXPATH, "/title/%08lx/%08lx/content/%08lx.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent);
|
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/%08x.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent);
|
||||||
|
|
||||||
u32 contentSize = 0;
|
u32 contentSize = 0;
|
||||||
|
|
||||||
@ -79,29 +80,70 @@ static u8 *GetDol(u32 bootcontent, u64 title)
|
|||||||
|
|
||||||
static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS)
|
static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
static const u8 dolsign[6] = {0x00, 0x00, 0x01, 0x00, 0x00, 0x00};
|
||||||
|
static u8 dolhead[32] ATTRIBUTE_ALIGN(32);
|
||||||
snprintf(filepath, ISFS_MAXPATH, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
|
bool found = false;
|
||||||
|
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
|
||||||
|
|
||||||
u32 size;
|
u32 size;
|
||||||
u8 *data = ISFS_GetFile(filepath, &size, -1);
|
u8 *data = ISFS_GetFile(filepath, &size, -1);
|
||||||
if(data == NULL || size < 0x208)
|
if(data == NULL || size < 0x208)
|
||||||
return ret;
|
return found;
|
||||||
*IOS = data[0x18B];
|
*IOS = data[0x18B];
|
||||||
|
|
||||||
_tmd *tmd_file = (_tmd *)SIGNATURE_PAYLOAD((u32 *)data);
|
_tmd *tmd_file = (_tmd *)SIGNATURE_PAYLOAD((u32 *)data);
|
||||||
for(u16 i = 0; i < tmd_file->num_contents; ++i)
|
|
||||||
|
if(dol)
|
||||||
{
|
{
|
||||||
if(tmd_file->contents[i].index == (dol ? 0x01 : tmd_file->boot_index))
|
// check for dol signature - channels and vc
|
||||||
|
for(u32 i = 0; i < tmd_file->num_contents; ++i)
|
||||||
|
{
|
||||||
|
if(tmd_file->contents[i].index == tmd_file->boot_index)
|
||||||
|
continue; // Skip app loader
|
||||||
|
|
||||||
|
snprintf(filepath, ISFS_MAXPATH, "/title/%08x/%08x/content/%08x.app", TITLE_UPPER(title), TITLE_LOWER(title), tmd_file->contents[i].cid);
|
||||||
|
|
||||||
|
s32 fd = ISFS_Open(filepath, ISFS_OPEN_READ);
|
||||||
|
if(fd < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
s32 ret = ISFS_Read(fd, dolhead, 32);
|
||||||
|
ISFS_Close(fd);
|
||||||
|
|
||||||
|
if(ret != 32)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(memcmp(dolhead, dolsign, sizeof(dolsign)) == 0)
|
||||||
|
{
|
||||||
|
// Normal channels and VC use 1
|
||||||
|
if(tmd_file->contents[i].index != 1)// forwarder channel
|
||||||
|
isForwarder = true;
|
||||||
|
*bootcontent = tmd_file->contents[i].cid;
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found) // WiiWare not matching a dol signature or apploader selected
|
||||||
|
{
|
||||||
|
for(u32 i = 0; i < tmd_file->num_contents; ++i)
|
||||||
{
|
{
|
||||||
*bootcontent = tmd_file->contents[i].cid;
|
if(tmd_file->contents[i].index == (dol ? 0x01 : tmd_file->boot_index))
|
||||||
ret = true;
|
{
|
||||||
break;
|
*bootcontent = tmd_file->contents[i].cid;
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//fall back to app loader if main dol wanted but not found
|
||||||
|
if(!found && dol)
|
||||||
|
{
|
||||||
|
*bootcontent = tmd_file->contents[tmd_file->boot_index].cid;
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
free(data);
|
free(data);
|
||||||
|
return found;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 MoveDol(u8 *buffer)
|
static u32 MoveDol(u8 *buffer)
|
||||||
@ -109,10 +151,10 @@ static u32 MoveDol(u8 *buffer)
|
|||||||
dolchunkcount = 0;
|
dolchunkcount = 0;
|
||||||
dolheader *dolfile = (dolheader *)buffer;
|
dolheader *dolfile = (dolheader *)buffer;
|
||||||
|
|
||||||
if(dolfile->bss_start)
|
if(dolfile->bss_start)// if start is not zero
|
||||||
{
|
{
|
||||||
if(!(dolfile->bss_start & 0x80000000))
|
if(!(dolfile->bss_start & 0x80000000))// if start isn't >=80000000
|
||||||
dolfile->bss_start |= 0x80000000;
|
dolfile->bss_start |= 0x80000000;// set it to 80000000 or greater
|
||||||
|
|
||||||
memset((void *)dolfile->bss_start, 0, dolfile->bss_size);
|
memset((void *)dolfile->bss_start, 0, dolfile->bss_size);
|
||||||
DCFlushRange((void *)dolfile->bss_start, dolfile->bss_size);
|
DCFlushRange((void *)dolfile->bss_start, dolfile->bss_size);
|
||||||
@ -121,11 +163,11 @@ static u32 MoveDol(u8 *buffer)
|
|||||||
|
|
||||||
for(u8 i = 0; i < 18; i++)
|
for(u8 i = 0; i < 18; i++)
|
||||||
{
|
{
|
||||||
if(!dolfile->section_size[i])
|
if(!dolfile->section_size[i])// if section size is zero don't move
|
||||||
continue;
|
continue;
|
||||||
if(dolfile->section_pos[i] < sizeof(dolheader))
|
if(dolfile->section_pos[i] < sizeof(dolheader)) // if section position is within the header don't move
|
||||||
continue;
|
continue;
|
||||||
if(!(dolfile->section_start[i] & 0x80000000))
|
if(!(dolfile->section_start[i] & 0x80000000)) // maker sure section start is 80000000 or greater
|
||||||
dolfile->section_start[i] |= 0x80000000;
|
dolfile->section_start[i] |= 0x80000000;
|
||||||
|
|
||||||
dolchunkoffset[dolchunkcount] = (void *)dolfile->section_start[i];
|
dolchunkoffset[dolchunkcount] = (void *)dolfile->section_start[i];
|
||||||
@ -147,11 +189,30 @@ u32 LoadChannel(u64 title, bool dol, u32 *IOS)
|
|||||||
entry = MoveDol(data);
|
entry = MoveDol(data);
|
||||||
free(data);
|
free(data);
|
||||||
|
|
||||||
|
// Preparations
|
||||||
|
memset((void *)Disc_ID, 0, 6);
|
||||||
|
*Disc_ID = TITLE_LOWER(title); // Game ID
|
||||||
|
*Arena_H = 0; // Arena High, the apploader does this too
|
||||||
|
*BI2 = 0x817FE000; // BI2, the apploader does this too
|
||||||
|
*Bus_Speed = 0x0E7BE2C0; // bus speed
|
||||||
|
*CPU_Speed = 0x2B73A840; // cpu speed
|
||||||
|
*GameID_Address = 0x81000000; // Game id address, while there's all 0s at 0x81000000 when using the apploader...
|
||||||
|
memcpy((void *)Online_Check, (void *)Disc_ID, 4); // online check
|
||||||
|
|
||||||
|
memset((void *)0x817FE000, 0, 0x2000); // Clearing BI2
|
||||||
|
DCFlushRange((void *)0x817FE000, 0x2000);
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u8 bootType)
|
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
|
||||||
|
u32 returnTo, u8 private_server, const char *server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType)
|
||||||
{
|
{
|
||||||
|
u8 vfilter_off[7] = {0, 0, 21, 22, 21, 0, 0};
|
||||||
|
u8 vfilter_low[7] = {4, 4, 16, 16, 16, 4, 4};
|
||||||
|
u8 vfilter_medium[7] = {4, 8, 12, 16, 12, 8, 4};
|
||||||
|
u8 vfilter_high[7] = {8, 8, 10, 12, 10, 8, 8};
|
||||||
|
|
||||||
bool hookpatched = false;
|
bool hookpatched = false;
|
||||||
for(u8 i = 0; i < dolchunkcount; i++)
|
for(u8 i = 0; i < dolchunkcount; i++)
|
||||||
{
|
{
|
||||||
@ -164,12 +225,50 @@ void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
|
|||||||
PatchCountryStrings(dolchunkoffset[i], dolchunksize[i]);
|
PatchCountryStrings(dolchunkoffset[i], dolchunksize[i]);
|
||||||
if(aspectRatio != -1)
|
if(aspectRatio != -1)
|
||||||
PatchAspectRatio(dolchunkoffset[i], dolchunksize[i], aspectRatio);
|
PatchAspectRatio(dolchunkoffset[i], dolchunksize[i], aspectRatio);
|
||||||
|
if(returnTo)
|
||||||
|
PatchReturnTo(dolchunkoffset[i], dolchunksize[i], returnTo);
|
||||||
|
if(private_server)
|
||||||
|
PrivateServerPatcher(dolchunkoffset[i], dolchunksize[i], private_server, server_addr);
|
||||||
if(hooktype != 0 && hookpatched == false)
|
if(hooktype != 0 && hookpatched == false)
|
||||||
hookpatched = dogamehooks(dolchunkoffset[i], dolchunksize[i], true);
|
hookpatched = dogamehooks(dolchunkoffset[i], dolchunksize[i], true);
|
||||||
|
|
||||||
|
if (videoWidth == WIDTH_FRAMEBUFFER)
|
||||||
|
patch_width(dolchunkoffset[i], dolchunksize[i]);
|
||||||
|
|
||||||
|
if (deflicker == DEFLICKER_ON_LOW)
|
||||||
|
{
|
||||||
|
patch_vfilters(dolchunkoffset[i], dolchunksize[i], vfilter_low);
|
||||||
|
patch_vfilters_rogue(dolchunkoffset[i], dolchunksize[i], vfilter_low);
|
||||||
|
}
|
||||||
|
else if (deflicker == DEFLICKER_ON_MEDIUM)
|
||||||
|
{
|
||||||
|
patch_vfilters(dolchunkoffset[i], dolchunksize[i], vfilter_medium);
|
||||||
|
patch_vfilters_rogue(dolchunkoffset[i], dolchunksize[i], vfilter_medium);
|
||||||
|
}
|
||||||
|
else if (deflicker == DEFLICKER_ON_HIGH)
|
||||||
|
{
|
||||||
|
patch_vfilters(dolchunkoffset[i], dolchunksize[i], vfilter_high);
|
||||||
|
patch_vfilters_rogue(dolchunkoffset[i], dolchunksize[i], vfilter_high);
|
||||||
|
}
|
||||||
|
else if (deflicker != DEFLICKER_NORMAL) // Either safe or extended
|
||||||
|
{
|
||||||
|
patch_vfilters(dolchunkoffset[i], dolchunksize[i], vfilter_off);
|
||||||
|
patch_vfilters_rogue(dolchunkoffset[i], dolchunksize[i], vfilter_off);
|
||||||
|
// This might break fade and brightness effects
|
||||||
|
if (deflicker == DEFLICKER_OFF_EXTENDED)
|
||||||
|
deflicker_patch(dolchunkoffset[i], dolchunksize[i]);
|
||||||
|
}
|
||||||
|
|
||||||
DCFlushRange(dolchunkoffset[i], dolchunksize[i]);
|
DCFlushRange(dolchunkoffset[i], dolchunksize[i]);
|
||||||
ICInvalidateRange(dolchunkoffset[i], dolchunksize[i]);
|
ICInvalidateRange(dolchunkoffset[i], dolchunksize[i]);
|
||||||
prog10();
|
prog10();
|
||||||
}
|
}
|
||||||
if(hookpatched)
|
if(hookpatched)
|
||||||
ocarina_do_code();
|
ocarina_do_code();
|
||||||
|
|
||||||
|
if(patchFix480p)
|
||||||
|
PatchFix480p();
|
||||||
|
|
||||||
|
if(private_server == PRIVSERV_WIIMMFI)
|
||||||
|
do_new_wiimmfi_nonMKWii();
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,10 @@ typedef struct _dolheader
|
|||||||
u32 padding[7];
|
u32 padding[7];
|
||||||
} ATTRIBUTE_PACKED dolheader;
|
} ATTRIBUTE_PACKED dolheader;
|
||||||
|
|
||||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString,
|
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
|
||||||
u8 patchVidModes, int aspectRatio, u8 bootType);
|
u32 returnTo, u8 private_server, const char *server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType);
|
||||||
u32 LoadChannel(u64 title, bool dol, u32 *IOS);
|
u32 LoadChannel(u64 title, bool dol, u32 *IOS);
|
||||||
|
|
||||||
|
extern bool isForwarder;
|
||||||
|
|
||||||
#endif /* __CHANHANDLE_HPP_ */
|
#endif /* __CHANHANDLE_HPP_ */
|
||||||
|
@ -30,31 +30,34 @@ struct the_CFG {
|
|||||||
u8 GameBootType;
|
u8 GameBootType;
|
||||||
WIP_Code *wip_list;
|
WIP_Code *wip_list;
|
||||||
u32 wip_count;
|
u32 wip_count;
|
||||||
bool use_led;
|
u32 *gameconf;
|
||||||
|
u32 gameconfsize;
|
||||||
|
void *codelist;
|
||||||
|
u8 *codelistend;
|
||||||
bool patchregion;
|
bool patchregion;
|
||||||
bool private_server;
|
|
||||||
bool patchFix480p;
|
|
||||||
/* needed for channels */
|
/* needed for channels */
|
||||||
u64 title;
|
u64 title;
|
||||||
bool use_dol;
|
bool use_dol;
|
||||||
/* General Stuff */
|
/* needed for both channels and wii games */
|
||||||
IOS_Info IOS;
|
IOS_Info IOS;
|
||||||
u8 BootType;
|
u8 BootType;
|
||||||
|
u8 configbytes[2];// [0] used for language. [1] not used
|
||||||
|
u8 countryString;
|
||||||
u8 vidMode;
|
u8 vidMode;
|
||||||
u8 patchVidMode;
|
u8 patchVidMode;
|
||||||
u8 configbytes[2];
|
|
||||||
u8 debugger;
|
|
||||||
u8 vipatch;
|
u8 vipatch;
|
||||||
u8 countryString;
|
s8 aspectRatio;
|
||||||
int aspectRatio;
|
bool patchFix480p;
|
||||||
void *codelist;
|
u8 deflicker;
|
||||||
u8 *codelistend;
|
u8 videoWidth;
|
||||||
|
u8 private_server;
|
||||||
|
char server_addr[24];
|
||||||
u8 *cheats;
|
u8 *cheats;
|
||||||
u32 cheatSize;
|
u32 cheatSize;
|
||||||
|
u8 debugger;
|
||||||
u32 hooktype;
|
u32 hooktype;
|
||||||
u32 *gameconf;
|
|
||||||
u32 gameconfsize;
|
|
||||||
u32 returnTo;
|
u32 returnTo;
|
||||||
|
bool use_led;
|
||||||
} ATTRIBUTE_PACKED;
|
} ATTRIBUTE_PACKED;
|
||||||
|
|
||||||
#endif /* _CFG_HPP_ */
|
#endif /* _CFG_HPP_ */
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "gecko.h"
|
#include "gecko.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "video_tinyload.h"
|
#include "video_tinyload.h"
|
||||||
|
#include "kirbypatch.h"
|
||||||
|
|
||||||
/* Apploader function pointers */
|
/* Apploader function pointers */
|
||||||
typedef int (*app_main)(void **dst, int *size, int *offset);
|
typedef int (*app_main)(void **dst, int *size, int *offset);
|
||||||
@ -25,32 +26,42 @@ static u8 *appldr = (u8*)0x81200000;
|
|||||||
static const char *GameID = (const char*)0x80000000;
|
static const char *GameID = (const char*)0x80000000;
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
#define APPLDR_OFFSET 0x910
|
#define APPLDR_OFFSET 0x910// usblgx uses 0x2440 -huh?
|
||||||
#define APPLDR_CODE 0x918
|
#define APPLDR_CODE 0x918// usblgx uses APPLDR_OFFSET + 0x20 - huh?
|
||||||
|
|
||||||
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch,
|
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
|
||||||
bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion, bool private_server, u8 bootType);
|
u32 returnTo, bool patchregion, u8 private_server, const char *server_addr, u8 deflicker, u8 bootType);
|
||||||
static void patch_NoDiscinDrive(void *buffer, u32 len);
|
static void patch_NoDiscinDrive(void *buffer, u32 len);
|
||||||
static void Anti_002_fix(void *Address, int Size);
|
static void Anti_002_fix(void *Address, int Size);
|
||||||
static bool Remove_001_Protection(void *Address, int Size);
|
static bool Remove_001_Protection(void *Address, int Size);
|
||||||
static void PrinceOfPersiaPatch();
|
static void PrinceOfPersiaPatch();
|
||||||
static void NewSuperMarioBrosPatch();
|
static void NewSuperMarioBrosPatch();
|
||||||
static void MarioKartWiiWiimmfiPatch( bool server);
|
static void Patch_23400_and_MKWii_vulnerability();
|
||||||
bool hookpatched = false;
|
bool hookpatched = false;
|
||||||
|
|
||||||
|
// wiiflow uses a struct to hold the appldr hdr and usblgx uses a u32 buffer[32] array to hold it.
|
||||||
/* Thanks Tinyload */
|
/* Thanks Tinyload */
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
char revision[16];
|
char revision[16];//[0-3] 16 divided by 4 bytes = 4
|
||||||
void *entry;
|
void *entry;// [4] 4 bytes
|
||||||
s32 size;
|
s32 size;//[5] 4 bytes
|
||||||
s32 trailersize;
|
s32 trailersize;// [6] 4 bytes
|
||||||
s32 padding;
|
s32 padding;// [7] 4 bytes
|
||||||
} apploader_hdr ATTRIBUTE_ALIGN(32);
|
} apploader_hdr ATTRIBUTE_ALIGN(32);// 16+4+4+4+4=32 bytes
|
||||||
|
|
||||||
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo,
|
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo,
|
||||||
bool patchregion , bool private_server, bool patchFix480p, u8 bootType)
|
bool patchregion , u8 private_server, const char *server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType)
|
||||||
{
|
{
|
||||||
|
//! Disable private server for games that still have official servers.
|
||||||
|
if(memcmp(GameID, "SC7", 3) == 0 || memcmp(GameID, "RJA", 3) == 0 ||
|
||||||
|
memcmp(GameID, "SM8", 3) == 0 || memcmp(GameID, "SZB", 3) == 0 || memcmp(GameID, "R9J", 3) == 0)
|
||||||
|
{
|
||||||
|
private_server = PRIVSERV_OFF; // Private server patching causes error 20100
|
||||||
|
}
|
||||||
|
|
||||||
|
// if either of these 2 games - adds internal wip codes before do_wip_code() is called in maindolpatches()
|
||||||
|
// note: using external .wip codes for these games will prevent their internal codes.
|
||||||
PrinceOfPersiaPatch();
|
PrinceOfPersiaPatch();
|
||||||
NewSuperMarioBrosPatch();
|
NewSuperMarioBrosPatch();
|
||||||
|
|
||||||
@ -95,55 +106,111 @@ u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
|
|||||||
{
|
{
|
||||||
/* Read data from DVD */
|
/* Read data from DVD */
|
||||||
WDVD_Read(dst, len, offset);
|
WDVD_Read(dst, len, offset);
|
||||||
maindolpatches(dst, len, vidMode, vmode, vipatch, countryString,
|
// if server is wiimmfi and game is mario kart wii don't patch private server here, do_new_wiimfi() patches it below.
|
||||||
patchVidModes, aspectRatio, returnTo, patchregion, private_server, bootType);
|
if(private_server == PRIVSERV_WIIMMFI && memcmp("RMC", GameID, 3) == 0)
|
||||||
|
maindolpatches(dst, len, vidMode, vmode, vipatch, countryString, patchVidModes, aspectRatio, returnTo, patchregion,
|
||||||
|
0, NULL, deflicker, bootType);
|
||||||
|
else
|
||||||
|
maindolpatches(dst, len, vidMode, vmode, vipatch, countryString, patchVidModes, aspectRatio, returnTo, patchregion,
|
||||||
|
private_server, server_addr, deflicker, bootType);
|
||||||
|
|
||||||
DCFlushRange(dst, len);
|
DCFlushRange(dst, len);
|
||||||
ICInvalidateRange(dst, len);
|
ICInvalidateRange(dst, len);
|
||||||
prog(20);
|
prog(20);
|
||||||
}
|
}
|
||||||
free_wip();
|
free_wip();
|
||||||
|
|
||||||
|
patch_kirby((u8 *)0x80000000);// can't be done during maindolpatches.
|
||||||
|
|
||||||
|
if(videoWidth == WIDTH_FRAMEBUFFER)
|
||||||
|
patch_width((void*)0x80000000, 0x900000);
|
||||||
|
|
||||||
if(hooktype != 0 && hookpatched)
|
if(hooktype != 0 && hookpatched)
|
||||||
ocarina_do_code();
|
ocarina_do_code();
|
||||||
|
|
||||||
|
//! Apply the 480p fix.
|
||||||
|
//! This needs to be done after the call to maindolpatches(), after loading any code handler.
|
||||||
|
//! Can (and should) be done before Wiimmfi patching, can't be done in maindolpatches() itself.
|
||||||
if(patchFix480p)
|
if(patchFix480p)
|
||||||
PatchFix480p();
|
PatchFix480p();
|
||||||
|
|
||||||
MarioKartWiiWiimmfiPatch(private_server);
|
//! If we're NOT on Wiimmfi, patch the known Remote Code Execution (RCE) vulnerability in MKWii.
|
||||||
|
//! Wiimmfi will handle that on its own through the update payload.
|
||||||
|
//! This will also patch error 23400 for a couple games that still have official servers.
|
||||||
|
if(private_server != PRIVSERV_WIIMMFI)
|
||||||
|
Patch_23400_and_MKWii_vulnerability();
|
||||||
|
|
||||||
|
else //PRIVSERV_WIIMMFI
|
||||||
|
{
|
||||||
|
if(memcmp("RMC", GameID, 3) != 0)// This isn't MKWii, perform the patch for other games.
|
||||||
|
do_new_wiimmfi_nonMKWii();// does not patch the server address - done in maindolpatches()
|
||||||
|
else // This is MKWii, perform the known patch from 2018.
|
||||||
|
do_new_wiimmfi();// includes patching the server address
|
||||||
|
}
|
||||||
|
|
||||||
/* Set entry point from apploader */
|
/* Set entry point from apploader */
|
||||||
return (u32)appldr_final();
|
return (u32)appldr_final();
|
||||||
}
|
}
|
||||||
|
|
||||||
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion , bool private_server, u8 bootType)
|
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
|
||||||
|
u32 returnTo, bool patchregion , u8 private_server, const char *serverAddr, u8 deflicker, u8 bootType)
|
||||||
{
|
{
|
||||||
do_wip_code((u8 *)dst, len);
|
u8 vfilter_off[7] = {0, 0, 21, 22, 21, 0, 0};
|
||||||
Remove_001_Protection(dst, len);
|
u8 vfilter_low[7] = {4, 4, 16, 16, 16, 4, 4};
|
||||||
if(CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13)
|
u8 vfilter_medium[7] = {4, 8, 12, 16, 12, 8, 4};
|
||||||
Anti_002_fix(dst, len);
|
u8 vfilter_high[7] = {8, 8, 10, 12, 10, 8, 8};
|
||||||
if((CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13) || CurrentIOS.Type == IOS_TYPE_HERMES)
|
|
||||||
patch_NoDiscinDrive(dst, len);
|
|
||||||
patchVideoModes(dst, len, vidMode, vmode, patchVidModes, bootType);
|
patchVideoModes(dst, len, vidMode, vmode, patchVidModes, bootType);
|
||||||
|
|
||||||
if(debuggerselect == 2)
|
if(debuggerselect == 2)
|
||||||
Patch_fwrite(dst, len);
|
Patch_fwrite(dst, len);
|
||||||
if(hooktype != 0 && hookpatched == false)
|
if(hooktype != 0 && hookpatched == false)
|
||||||
hookpatched = dogamehooks(dst, len, false);
|
hookpatched = dogamehooks(dst, len, false);
|
||||||
if(patchVidModes > 0)
|
|
||||||
PatchVideoSneek(dst, len);
|
|
||||||
if(vipatch)
|
if(vipatch)
|
||||||
vidolpatcher(dst, len);
|
vidolpatcher(dst, len);
|
||||||
|
if(patchVidModes > 0)
|
||||||
|
PatchVideoSneek(dst, len);
|
||||||
if(configbytes[0] != 0xCD)
|
if(configbytes[0] != 0xCD)
|
||||||
langpatcher(dst, len);
|
langpatcher(dst, len);
|
||||||
if(countryString)
|
if(countryString)
|
||||||
PatchCountryStrings(dst, len); // Country Patch by WiiPower
|
PatchCountryStrings(dst, len); // Country Patch by WiiPower
|
||||||
if(aspectRatio != -1)
|
do_wip_code((u8 *)dst, len);
|
||||||
PatchAspectRatio(dst, len, aspectRatio);
|
Remove_001_Protection(dst, len);
|
||||||
if(returnTo)
|
if(CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13)
|
||||||
PatchReturnTo(dst, len, returnTo);
|
Anti_002_fix(dst, len);
|
||||||
|
if((CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13) || CurrentIOS.Type == IOS_TYPE_HERMES)
|
||||||
|
patch_NoDiscinDrive(dst, len);
|
||||||
if(patchregion)
|
if(patchregion)
|
||||||
PatchRegion(dst, len);
|
PatchRegion(dst, len);
|
||||||
|
if(deflicker == DEFLICKER_ON_LOW)
|
||||||
|
{
|
||||||
|
patch_vfilters(dst, len, vfilter_low);
|
||||||
|
patch_vfilters_rogue(dst, len, vfilter_low);
|
||||||
|
}
|
||||||
|
else if(deflicker == DEFLICKER_ON_MEDIUM)
|
||||||
|
{
|
||||||
|
patch_vfilters(dst, len, vfilter_medium);
|
||||||
|
patch_vfilters_rogue(dst, len, vfilter_medium);
|
||||||
|
}
|
||||||
|
else if(deflicker == DEFLICKER_ON_HIGH)
|
||||||
|
{
|
||||||
|
patch_vfilters(dst, len, vfilter_high);
|
||||||
|
patch_vfilters_rogue(dst, len, vfilter_high);
|
||||||
|
}
|
||||||
|
else if(deflicker != DEFLICKER_NORMAL) // Either safe or extended
|
||||||
|
{
|
||||||
|
patch_vfilters(dst, len, vfilter_off);
|
||||||
|
patch_vfilters_rogue(dst, len, vfilter_off);
|
||||||
|
// This might break fade and brightness effects
|
||||||
|
if (deflicker == DEFLICKER_OFF_EXTENDED)
|
||||||
|
deflicker_patch(dst, len);
|
||||||
|
}
|
||||||
|
if(returnTo)
|
||||||
|
PatchReturnTo(dst, len, returnTo);
|
||||||
|
if(aspectRatio != -1)
|
||||||
|
PatchAspectRatio(dst, len, aspectRatio);
|
||||||
if(private_server)
|
if(private_server)
|
||||||
PrivateServerPatcher(dst,len);
|
PrivateServerPatcher(dst, len, private_server, serverAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void patch_NoDiscinDrive(void *buffer, u32 len)
|
static void patch_NoDiscinDrive(void *buffer, u32 len)
|
||||||
@ -175,14 +242,7 @@ static void Anti_002_fix(void *Address, int Size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MarioKartWiiWiimmfiPatch( bool server) {
|
static void PrinceOfPersiaPatch()// Prince of Persia: The Forgotten Sands
|
||||||
if(memcmp("RMC", GameID, 3) != 0) return; // This isn't MKWii
|
|
||||||
if(server == 0) return; // no Wiimmfi patch wanted
|
|
||||||
|
|
||||||
do_new_wiimmfi();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void PrinceOfPersiaPatch()
|
|
||||||
{
|
{
|
||||||
if(memcmp("SPX", GameID, 3) != 0 && memcmp("RPW", GameID, 3) != 0)
|
if(memcmp("SPX", GameID, 3) != 0 && memcmp("RPW", GameID, 3) != 0)
|
||||||
return;
|
return;
|
||||||
@ -267,3 +327,88 @@ static bool Remove_001_Protection(void *Address, int Size)
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Patch_23400_and_MKWii_vulnerability()
|
||||||
|
{
|
||||||
|
// Thanks to Seeky for the MKWii gecko codes
|
||||||
|
// Thanks to InvoxiPlayGames for the gecko codes for the 23400 fix.
|
||||||
|
// Reimplemented by Leseratte without the need for a code handler.
|
||||||
|
|
||||||
|
u32 * patch_addr = 0;
|
||||||
|
char * patched = 0;
|
||||||
|
|
||||||
|
// Patch error 23400 for CoD (Black Ops, Reflex, MW3) and Rock Band 3 / The Beatles
|
||||||
|
|
||||||
|
if (memcmp(GameID, "SC7", 3) == 0)
|
||||||
|
{
|
||||||
|
gprintf("Patching error 23400 for game %s\n", GameID);
|
||||||
|
*(u32 *)0x8023c954 = 0x41414141;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (memcmp(GameID, "RJA", 3) == 0)
|
||||||
|
{
|
||||||
|
gprintf("Patching error 23400 for game %s\n", GameID);
|
||||||
|
*(u32 *)0x801b838c = 0x41414141;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (memcmp(GameID, "SM8", 3) == 0)
|
||||||
|
{
|
||||||
|
gprintf("Patching error 23400 for game %s\n", GameID);
|
||||||
|
*(u32 *)0x80238c74 = 0x41414141;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (memcmp(GameID, "SZB", 3) == 0)
|
||||||
|
{
|
||||||
|
gprintf("Patching error 23400 for game %s\n", GameID);
|
||||||
|
*(u32 *)0x808e3b20 = 0x41414141;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (memcmp(GameID, "R9J", 3) == 0)
|
||||||
|
{
|
||||||
|
gprintf("Patching error 23400 for game %s\n", GameID);
|
||||||
|
*(u32 *)0x808d6934 = 0x41414141;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch RCE vulnerability in MKWii.
|
||||||
|
else if (memcmp(GameID, "RMC", 3) == 0)
|
||||||
|
{
|
||||||
|
switch (GameID[3]) {
|
||||||
|
|
||||||
|
case 'P':
|
||||||
|
patched = (char *)0x80276054;
|
||||||
|
patch_addr = (u32 *)0x8089a194;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'E':
|
||||||
|
patched = (char *)0x80271d14;
|
||||||
|
patch_addr = (u32 *)0x80895ac4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'J':
|
||||||
|
patched = (char *)0x802759f4;
|
||||||
|
patch_addr = (u32 *)0x808992f4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'K':
|
||||||
|
patched = (char *)0x80263E34;
|
||||||
|
patch_addr = (u32 *)0x808885cc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
gprintf("NOT patching RCE vulnerability due to invalid game ID: %s\n", GameID);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*patched != '*')
|
||||||
|
{
|
||||||
|
gprintf("Game is already Wiimmfi-patched, don't apply the RCE fix\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gprintf("Patching RCE vulnerability for game ID %s\n", GameID);
|
||||||
|
|
||||||
|
for (int i = 0; i < 7; i++)
|
||||||
|
*patch_addr++ = 0xff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -7,7 +7,33 @@ extern "C" {
|
|||||||
|
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo,
|
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo,
|
||||||
bool patchregion, bool private_server, bool patchFix480p, u8 bootType);
|
bool patchregion, u8 private_server, const char * server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType);
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PRIVSERV_OFF,
|
||||||
|
PRIVSERV_NOSSL,
|
||||||
|
PRIVSERV_WIIMMFI,
|
||||||
|
PRIVSERV_MAX_CHOICE
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DEFLICKER_NORMAL,
|
||||||
|
DEFLICKER_OFF,
|
||||||
|
DEFLICKER_OFF_EXTENDED,
|
||||||
|
DEFLICKER_ON_LOW,
|
||||||
|
DEFLICKER_ON_MEDIUM,
|
||||||
|
DEFLICKER_ON_HIGH
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
WIDTH_AUTO,
|
||||||
|
WIDTH_FRAMEBUFFER,
|
||||||
|
WIDTH_MAX
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
s32 Disc_Open(u8 type)
|
s32 Disc_Open(u8 type)
|
||||||
{
|
{
|
||||||
if(type > 0)
|
if(type > 0)// if not a wii disc (wbfs ext or wbfs drive)
|
||||||
{ /* Reset drive */
|
{ /* Reset drive */
|
||||||
s32 ret = WDVD_Reset();
|
s32 ret = WDVD_Reset();
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
@ -29,64 +29,26 @@ s32 Disc_Open(u8 type)
|
|||||||
return WDVD_ReadDiskId((u8*)Disc_ID);
|
return WDVD_ReadDiskId((u8*)Disc_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Disc_SetLowMemPre()
|
void Disc_SetLowMem(void)
|
||||||
{
|
|
||||||
/* Setup low memory before Apploader */
|
|
||||||
*BI2 = 0x817E5480; // BI2
|
|
||||||
*(vu32*)0xCD00643C = 0x00000000; // 32Mhz on Bus
|
|
||||||
|
|
||||||
/* Clear Disc ID */
|
|
||||||
memset((u8*)Disc_ID, 0, 32);
|
|
||||||
|
|
||||||
/* For WiiRD */
|
|
||||||
memset((void*)0x80001800, 0, 0x1800);
|
|
||||||
|
|
||||||
/* Flush everything */
|
|
||||||
DCFlushRange((void*)0x80000000, 0x3f00);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Disc_SetLowMem(u32 IOS)
|
|
||||||
{
|
{
|
||||||
/* Setup low memory */
|
/* Setup low memory */
|
||||||
*Sys_Magic = 0x0D15EA5E; // Standard Boot Code
|
*Sys_Magic = 0x0D15EA5E; // Standard Boot Code
|
||||||
*Sys_Version = 0x00000001; // Version
|
*Sys_Version = 0x00000001; // Version
|
||||||
*Arena_L = 0x00000000; // Arena Low
|
*Arena_L = 0x00000000; // Arena Low
|
||||||
|
*BI2 = 0x817E5480; // BI2
|
||||||
*Bus_Speed = 0x0E7BE2C0; // Console Bus Speed
|
*Bus_Speed = 0x0E7BE2C0; // Console Bus Speed
|
||||||
*CPU_Speed = 0x2B73A840; // Console CPU Speed
|
*CPU_Speed = 0x2B73A840; // Console CPU Speed
|
||||||
*Assembler = 0x38A00040; // Assembler
|
*Assembler = 0x38A00040; // Assembler
|
||||||
*OS_Thread = 0x80431A80; // Thread Init
|
*OS_Thread = 0x80431A80; // Thread Init
|
||||||
*Dev_Debugger = 0x81800000; // Dev Debugger Monitor Address
|
*Dev_Debugger = 0x81800000; // Dev Debugger Monitor Address
|
||||||
*Simulated_Mem = 0x01800000; // Simulated Memory Size
|
*Simulated_Mem = 0x01800000; // Simulated Memory Size
|
||||||
*GameID_Address = 0x80000000; // Fix for Sam & Max (WiiPower)
|
*(vu32 *) 0xCD00643C = 0x00000000; // 32Mhz on Bus
|
||||||
|
|
||||||
|
//if(CurrentIOS.Type != IOS_TYPE_HERMES && CurrentIOS.Revision >= 18)
|
||||||
|
*GameID_Address = 0x80000000; // Fix for Sam & Max (WiiPower) and Back to the Future.
|
||||||
|
|
||||||
/* Copy Disc ID */
|
/* Copy Disc ID */
|
||||||
memcpy((void*)Online_Check, (void*)Disc_ID, 4);
|
memcpy((void*)Online_Check, (void*)Disc_ID, 4);
|
||||||
|
|
||||||
/* For WiiRD */
|
|
||||||
memcpy((void*)0x80001800, (void*)Disc_ID, 8);
|
|
||||||
|
|
||||||
/* Error 002 Fix (thanks WiiPower and uLoader) */
|
|
||||||
*Current_IOS = (IOS << 16) | 0xffff;
|
|
||||||
*Apploader_IOS = (IOS << 16) | 0xffff;
|
|
||||||
|
|
||||||
/* Flush everything */
|
|
||||||
DCFlushRange((void*)0x80000000, 0x3f00);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Thanks to triiforce for that code */
|
|
||||||
void Disc_SetLowMemChan()
|
|
||||||
{
|
|
||||||
/* Setup low mem */
|
|
||||||
*Arena_H = 0x00000000; // Arena High, the appldr does this too
|
|
||||||
*BI2 = 0x817FE000; // BI2, the appldr does this too
|
|
||||||
*GameID_Address = 0x81000000; // Game id address, 0s at 0x81000000 with appldr
|
|
||||||
|
|
||||||
/* Flush low mem */
|
|
||||||
DCFlushRange((void*)0x80000000, 0x3f00);
|
|
||||||
|
|
||||||
/* Clear BI2 */
|
|
||||||
memset((void *)0x817FE000, 0, 0x2000);
|
|
||||||
DCFlushRange((void*)0x817FE000, 0x2000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Thanks Tinyload */
|
/* Thanks Tinyload */
|
||||||
@ -280,13 +242,14 @@ s32 Disc_SetUSB(const u8 *id, bool frag)
|
|||||||
/* ENABLE USB in cIOS */
|
/* ENABLE USB in cIOS */
|
||||||
if(id)
|
if(id)
|
||||||
{
|
{
|
||||||
if(frag)
|
if(frag)// true for wii games in wbfs folder
|
||||||
return set_frag_list();
|
return set_frag_list();
|
||||||
|
/* for WBFS partitioned drives */
|
||||||
s32 part = -1;
|
s32 part = -1;
|
||||||
if(CurrentIOS.Type == IOS_TYPE_HERMES)
|
if(CurrentIOS.Type == IOS_TYPE_HERMES)
|
||||||
part = wbfs_part_idx ? wbfs_part_idx - 1 : 0;
|
part = wbfs_part_idx ? wbfs_part_idx - 1 : 0;
|
||||||
return WDVD_SetUSBMode(wbfsDev, (u8*)id, part);
|
return WDVD_SetUSBMode(wbfsDev, (u8*)id, part);
|
||||||
}
|
}
|
||||||
/* DISABLE USB in cIOS */
|
/* DISABLE USB in cIOS for actual disc */
|
||||||
return WDVD_SetUSBMode(0, NULL, -1);
|
return WDVD_SetUSBMode(0, NULL, -1);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user