Compare commits

..

No commits in common. "master" and "v.5.4.0" have entirely different histories.

488 changed files with 29652 additions and 48243 deletions

View File

@ -1,31 +0,0 @@
---
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.

View File

@ -1,62 +0,0 @@
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

5
.gitignore vendored
View File

@ -1,8 +1,3 @@
*.d
*.o
*.elf
*.map
/source/loader/alt_ios_gen.h
/wiiflow.pnproj /wiiflow.pnproj
/wiiflow.pnps /wiiflow.pnps
/build /build

View File

@ -8,6 +8,12 @@ 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
@ -22,6 +28,10 @@ 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

View File

@ -22,6 +22,7 @@ SOURCES := source \
source/channel \ source/channel \
source/cheats \ source/cheats \
source/config \ source/config \
source/data \
source/devicemounter \ source/devicemounter \
source/fileOps \ source/fileOps \
source/gc \ source/gc \
@ -39,6 +40,7 @@ SOURCES := source \
source/plugin \ source/plugin \
source/sicksaxis-wrapper \ source/sicksaxis-wrapper \
source/unzip \ source/unzip \
source/xml \
source/wstringEx source/wstringEx
DATA := data \ DATA := data \
data/images \ data/images \
@ -53,17 +55,10 @@ ios := 249
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# options for code generation # options for code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
FALSE_POSITIVES := -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread CFLAGS = -g -ggdb -Os -Wall -Wextra $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE -DHAVE_CONFIG_H
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)
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
@ -72,14 +67,13 @@ 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 -lbte -lwupc -lwiidrc -lsicksaxis -lasnd -lmad -lvorbisidec -logg -lfreetype -lbz2 -logc LIBS := -lwolfssl -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lwupc -lwiidrc -lbte -lasnd -logc -lfreetype -lvorbisidec -lmad -lsicksaxis
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# 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
@ -129,13 +123,15 @@ 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/libs/libfat/ \
-L$(CURDIR)/source/libwolfssl -L$(LIBOGC_LIB) -L$(CURDIR)/source/libs/libntfs/ -L$(CURDIR)/source/libs/libext2fs/ \
-L$(CURDIR)/source/libwolfssl/ -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib
export OUTPUT := $(CURDIR)/out/$(TARGET) export OUTPUT := $(CURDIR)/out/$(TARGET)
.PHONY: $(BUILD) all clean .PHONY: $(BUILD) all clean
@ -154,9 +150,8 @@ 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)/source/loader/alt_ios_gen.h $(CURDIR)/out/bins/ext_loader.bin \
$(CURDIR)/out/bins/ext_booter.bin \ $(CURDIR)/out/bins/ext_booter.bin $(CURDIR)/out/bins/app_booter.bin
$(CURDIR)/out/bins/app_booter.bin
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
else else

View File

@ -4,6 +4,9 @@ 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.
@ -13,7 +16,9 @@ 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 Rhapsodii and Rhapsodii Shima themes are compatible with WiiFlow Lite. Other older wiiflow themes need to be updated to work properly with WFL. 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.
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/)
@ -22,10 +27,6 @@ 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://web.archive.org/web/20220414124727/https://sites.google.com/site/wiiflowiki4/) [WiiFlow Wiki](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/)

BIN
data/images/wait_01.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

BIN
data/images/wait_02.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

BIN
data/images/wait_03.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
data/images/wait_04.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

BIN
data/images/wait_05.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

BIN
data/images/wait_06.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

BIN
data/images/wait_07.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
data/images/wait_08.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/images/wflsplash.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
data/images/wfsplash.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
data/stub.bin Normal file

Binary file not shown.

172
docs/Content.txt Normal file
View File

@ -0,0 +1,172 @@
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 | | | |
--------------------------------------------------------------------------------------------------------

6
docs/Requirements.txt Normal file
View File

@ -0,0 +1,6 @@
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.

49
docs/versions.txt Normal file
View File

@ -0,0 +1,49 @@
[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)

View File

@ -1 +1 @@
copy the boot.dol and folders into apps/wiiflow copy the boot.dol and folders into apps/wiiflow_lite

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

BIN
out/imgs/background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
out/imgs/dvdskin.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

BIN
out/imgs/dvdskin_black.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
out/imgs/dvdskin_red.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

BIN
out/imgs/dvdskin_yellow.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

BIN
out/imgs/esrb_ao.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
out/imgs/esrb_e.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
out/imgs/esrb_ec.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
out/imgs/esrb_eten.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
out/imgs/esrb_m.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
out/imgs/esrb_t.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
out/imgs/flatloading.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 B

After

Width:  |  Height:  |  Size: 970 B

BIN
out/imgs/loading.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
out/imgs/norating.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,282 +0,0 @@
/*-------------------------------------------------------------*/
/*--- 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 ---*/
/*-------------------------------------------------------------*/

View File

@ -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, uint8_t attr ); int FAT_setAttr(const char *file, int attr );
#define LIBFAT_FEOS_MULTICWD #define LIBFAT_FEOS_MULTICWD

View File

@ -5,7 +5,7 @@
/* */ /* */
/* UNIX-specific configuration file (specification only). */ /* UNIX-specific configuration file (specification only). */
/* */ /* */
/* Copyright 1996-2018 by */ /* Copyright 1996-2004, 2006-2009, 2011, 2013 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 `builds/<system>', and contains */ /* The build directory is usually `freetype/builds/<system>', and */
/* system-specific files that are always included first when building */ /* contains system-specific files that are always included first when */
/* the library. */ /* building 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 */
/* `builds/<system>' directory, and edit it to port the engine. */ /* `freetype/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 */
/* do not use configure script. */ /* does 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,18 +243,6 @@ 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
@ -288,46 +276,19 @@ FT_BEGIN_HEADER
#endif #endif
/* determine whether we have a 64-bit int type */ /* determine whether we have a 64-bit int type for platforms without */
/* (mostly for environments without `autoconf') */ /* 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++ */
@ -336,8 +297,7 @@ 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++ */
@ -346,66 +306,191 @@ 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 */
/*************************************************************************/
/* */
/* A 64-bit data type will create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */
/* is defined. You can however ignore this rule by defining the */
/* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#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 #ifdef FT_LONG64
typedef FT_INT64 FT_Int64; typedef FT_INT64 FT_Int64;
typedef FT_UINT64 FT_UInt64;
#endif #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
/*************************************************************************/
/* */
/* miscellaneous */
/* */
/*************************************************************************/
#define FT_BEGIN_STMNT do { #define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 ) #define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
/* typeof condition taken from gnulib's `intprops.h' header file */ #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \ /* Provide assembler fragments for performance-critical functions. */
( defined( __IBMC__ ) && __IBMC__ >= 1210 && \ /* These must be defined `static __inline__' with GCC. */
defined( __IBM__TYPEOF__ ) ) || \
( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) ) #if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
#define FT_TYPEOF( type ) ( __typeof__ ( type ) ) #define FT_MULFIX_ASSEMBLER FT_MulFix_arm
#else
#define FT_TYPEOF( type ) /* empty */ /* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
__asm
{
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
mov a, t, asr #31 /* a = (hi >> 31) */
add a, a, #0x8000 /* a += 0x8000 */
adds t2, t2, a /* t2 += a */
adc t, t, #0 /* t += carry */
mov a, t2, lsr #16 /* a = t2 >> 16 */
orr a, a, t, lsl #16 /* a |= t << 16 */
}
return a;
}
#endif /* __CC_ARM || __ARMCC__ */
#ifdef __GNUC__
#if defined( __arm__ ) && !defined( __thumb__ ) && \
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline__ FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
__asm__ __volatile__ (
"smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
"mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
"adds %1, %1, %0\n\t" /* %1 += %0 */
"adc %2, %2, #0\n\t" /* %2 += carry */
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
"orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b)
: "cc" );
return a;
}
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline__ FT_Int32
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 result;
__asm__ __volatile__ (
"imul %%edx\n"
"movl %%edx, %%ecx\n"
"sarl $31, %%ecx\n"
"addl $0x8000, %%ecx\n"
"addl %%ecx, %%eax\n"
"adcl $0, %%edx\n"
"shrl $16, %%eax\n"
"shll $16, %%edx\n"
"addl %%edx, %%eax\n"
: "=a"(result), "=d"(b)
: "a"(a), "d"(b)
: "%ecx", "cc" );
return result;
}
#endif /* i386 */
#endif /* __GNUC__ */
#ifdef _MSC_VER /* Visual C++ */
#ifdef _M_IX86
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 result;
__asm
{
mov eax, a
mov edx, b
imul edx
mov ecx, edx
sar ecx, 31
add ecx, 8000h
add eax, ecx
adc edx, 0
shr eax, 16
shl edx, 16
add eax, edx
mov result, eax
}
return result;
}
#endif /* _M_IX86 */
#endif /* _MSC_VER */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
#ifdef FT_MULFIX_ASSEMBLER
#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
#endif
#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
@ -423,16 +508,7 @@ 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
@ -455,63 +531,14 @@ 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 FT2_BUILD_LIBRARY #ifdef __cplusplus
#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 */
@ -547,13 +574,7 @@ 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. */
@ -573,16 +594,6 @@ 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"
@ -597,7 +608,7 @@ FT_BEGIN_HEADER
FT_END_HEADER FT_END_HEADER
#endif /* FTCONFIG_H_ */ #endif /* __FTCONFIG_H__ */
/* END */ /* END */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* Build macros of the FreeType 2 library. */ /* Build macros of the FreeType 2 library. */
/* */ /* */
/* Copyright 1996-2018 by */ /* Copyright 1996-2008, 2010, 2012, 2013 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 FTHEADER_H_ #ifndef __FT_HEADER_H__
#define FTHEADER_H_ #define __FT_HEADER_H__
/*@***********************************************************************/ /*@***********************************************************************/
@ -315,19 +315,6 @@
#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:
@ -337,10 +324,8 @@
* 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 FT_DRIVER_H #define FT_AUTOHINTER_H <freetype/ftautoh.h>
/************************************************************************* /*************************************************************************
@ -352,40 +337,8 @@
* 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 FT_DRIVER_H #define FT_CFF_DRIVER_H <freetype/ftcffdrv.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
/************************************************************************* /*************************************************************************
@ -575,6 +528,63 @@
#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:
@ -687,16 +697,14 @@
/************************************************************************* /*************************************************************************
* *
* @macro: * @macro:
* FT_FONT_FORMATS_H * FT_XFREE86_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 font formats. * FreeType~2 API which provides functions specific to the XFree86 and
* X.Org X11 servers.
*/ */
#define FT_FONT_FORMATS_H <freetype/ftfntfmt.h> #define FT_XFREE86_H <freetype/ftxf86.h>
/* deprecated */
#define FT_XFREE86_H FT_FONT_FORMATS_H
/************************************************************************* /*************************************************************************
@ -724,6 +732,18 @@
#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:
@ -731,7 +751,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 incremental glyph loading. * FreeType~2 API which performs color filtering for subpixel rendering.
*/ */
#define FT_INCREMENTAL_H <freetype/ftincrem.h> #define FT_INCREMENTAL_H <freetype/ftincrem.h>
@ -762,34 +782,29 @@
/* */ /* */
/* 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 FT_CACHE_H #define FT_CACHE_MANAGER_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H #define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H #define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H #define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H #define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H #define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H #define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
/* /*
* Include internal headers definitions from <internal/...> * Include internal headers definitions from <freetype/internal/...>
* only when building the library. * only when building the library.
*/ */
#ifdef FT2_BUILD_LIBRARY #ifdef FT2_BUILD_LIBRARY
@ -798,7 +813,7 @@
#endif /* FT2_BUILD_LIBRARY */ #endif /* FT2_BUILD_LIBRARY */
#endif /* FTHEADER_H_ */ #endif /* __FT2_BUILD_H__ */
/* END */ /* END */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* User-selectable configuration macros (specification only). */ /* User-selectable configuration macros (specification only). */
/* */ /* */
/* Copyright 1996-2018 by */ /* Copyright 1996-2013 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,52 +75,22 @@ 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 LCD rendering */ /* Uncomment the line below if you want to activate sub-pixel rendering */
/* technology similar to ClearType in this build of the library. This */ /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
/* 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 */ /* */
/* rendering technology that produces excellent output without LCD */ /* This macro has no impact on the FreeType API, only on its */
/* filtering. */ /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
/* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
/* the original size in case this macro isn't defined; however, each */
/* triplet of subpixels has R=G=B. */
/* */
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */ /* */
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
@ -214,11 +184,7 @@ 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. */
/* */ /* */
/* If you use a build system like cmake or the `configure' script, */ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
/* options set by those programs have precendence, overwriting the */
/* value here with the configured one. */
/* */
#define FT_CONFIG_OPTION_SYSTEM_ZLIB
/*************************************************************************/ /*************************************************************************/
@ -234,11 +200,7 @@ FT_BEGIN_HEADER
/* */ /* */
/* Define this macro if you want to enable this `feature'. */ /* Define this macro if you want to enable this `feature'. */
/* */ /* */
/* If you use a build system like cmake or the `configure' script, */ /* #define FT_CONFIG_OPTION_USE_BZIP2 */
/* options set by those programs have precendence, overwriting the */
/* value here with the configured one. */
/* */
#define FT_CONFIG_OPTION_USE_BZIP2
/*************************************************************************/ /*************************************************************************/
@ -254,37 +216,44 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* PNG bitmap support. */ /* DLL export compilation */
/* */ /* */
/* FreeType now handles loading color bitmap glyphs in the PNG format. */ /* When compiling FreeType as a DLL, some systems/compilers need a */
/* This requires help from the external libpng library. Uncompressed */ /* special keyword in front OR after the return type of function */
/* color bitmaps do not need any external libraries and will be */ /* declarations. */
/* supported regardless of this configuration. */
/* */ /* */
/* Define this macro if you want to enable this `feature'. */ /* Two macros are used within the FreeType source code to define */
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
/* */ /* */
/* If you use a build system like cmake or the `configure' script, */ /* FT_EXPORT( return_type ) */
/* options set by those programs have precendence, overwriting the */
/* value here with the configured one. */
/* */ /* */
#define FT_CONFIG_OPTION_USE_PNG /* is used in a function declaration, as in */
/*************************************************************************/
/* */ /* */
/* HarfBuzz support. */ /* FT_EXPORT( FT_Error ) */
/* 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. */
/* */ /* */
/* Define this macro if you want to enable this `feature'. */ /* FT_EXPORT_DEF( return_type ) */
/* */ /* */
/* If you use a build system like cmake or the `configure' script, */ /* is used in a function definition, as in */
/* options set by those programs have precendence, overwriting the */
/* value here with the configured one. */
/* */ /* */
/* #undef FT_CONFIG_OPTION_USE_HARFBUZZ */ /* FT_EXPORT_DEF( FT_Error ) */
/* FT_Init_FreeType( FT_Library* alibrary ) */
/* { */
/* ... some code ... */
/* return FT_Err_Ok; */
/* } */
/* */
/* You can provide your own implementation of FT_EXPORT and */
/* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
/* will be later automatically defined as `extern return_type' to */
/* allow normal compilation. */
/* */
/* Do not #undef these macros here since the build system might define */
/* them for certain configurations only. */
/* */
/* #define FT_EXPORT(x) extern x */
/* #define FT_EXPORT_DEF(x) x */
/*************************************************************************/ /*************************************************************************/
@ -301,7 +270,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, but will not synthesize a missing Unicode charmap. */ /* `post' table. */
/* */ /* */
/* - 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. */
@ -382,6 +351,10 @@ 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
@ -435,8 +408,6 @@ 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: */
/* */ /* */
@ -496,21 +467,7 @@ 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. [Note that standard compilers like gcc or */ /* fixups, such as BREW. */
/* 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 */
@ -557,7 +514,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 */
/* `ftsnames.h'. */ /* `freetype/ftsnames.h'. */
/* */ /* */
#define TT_CONFIG_OPTION_SFNT_NAMES #define TT_CONFIG_OPTION_SFNT_NAMES
@ -598,68 +555,92 @@ 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 */
/* subpixel hinting support into the TrueType driver. This modifies the */ /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */
/* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is */ /* replaces the native TrueType hinting mechanism when anything but */
/* requested. */ /* FT_RENDER_MODE_MONO is requested. */
/* */ /* */
/* In particular, it modifies the bytecode interpreter to interpret (or */ /* Enabling this causes the TrueType driver to ignore instructions under */
/* not) instructions in a certain way so that all TrueType fonts look */ /* certain conditions. This is done in accordance with the guide here, */
/* like they do in a Windows ClearType (DirectWrite) environment. See */ /* with some minor differences: */
/* [1] for a technical overview on what this means. See `ttinterp.h' */
/* for more details on the LEAN option. */
/* */ /* */
/* There are three possible values. */ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
/* */ /* */
/* Value 1: */ /* By undefining this, you only compile the code necessary to hint */
/* This value is associated with the `Infinality' moniker, */ /* TrueType glyphs with native TT hinting. */
/* contributed by an individual nicknamed Infinality with the goal of */
/* making TrueType fonts render better than on Windows. A high */
/* amount of configurability and flexibility, down to rules for */
/* single glyphs in fonts, but also very slow. Its experimental and */
/* slow nature and the original developer losing interest meant that */
/* this option was never enabled in default builds. */
/* */ /* */
/* The corresponding interpreter version is v38. */ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */ /* */
/* Value 2: */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
/* The new default mode for the TrueType driver. The Infinality code */
/* base was stripped to the bare minimum and all configurability */
/* removed in the name of speed and simplicity. The configurability */ /*************************************************************************/
/* was mainly aimed at legacy fonts like Arial, Times New Roman, or */
/* Courier. Legacy fonts are fonts that modify vertical stems to */
/* achieve clean black-and-white bitmaps. The new mode focuses on */
/* applying a minimal set of rules to all fonts indiscriminately so */
/* that modern and web fonts render well while legacy fonts render */
/* okay. */
/* */ /* */
/* The corresponding interpreter version is v40. */ /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
/* any of the patented opcodes and algorithms. The patents related to */
/* TrueType hinting have expired worldwide since May 2010; this option */
/* is now deprecated. */
/* */ /* */
/* Value 3: */ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
/* Compile both, making both v38 and v40 available (the latter is the */ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
/* default). */ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */ /* */
/* By undefining these, you get rendering behavior like on Windows */ /* This macro is only useful for a small number of font files (mostly */
/* without ClearType, i.e., Windows XP without ClearType enabled and */ /* for Asian scripts) that require bytecode interpretation to properly */
/* Win9x (interpreter version v35). Or not, depending on how much */ /* load glyphs. For all other fonts, this produces unpleasant results, */
/* hinting blood and testing tears the font designer put into a given */ /* thus the unpatented interpreter is never used to load glyphs from */
/* font. If you define one or both subpixel hinting options, you can */ /* TrueType fonts unless one of the following two options is used. */
/* switch between between v35 and the ones you define (using */
/* `FT_Property_Set'). */
/* */ /* */
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* - The unpatented interpreter is explicitly activated by the user */
/* defined. */ /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
/* when opening the FT_Face. */
/* */ /* */
/* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ /* - FreeType detects that the FT_Face corresponds to one of the */
/* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */
/* contains a hard-coded list of font names and other matching */
/* parameters (see function `tt_face_init' in file */
/* `src/truetype/ttobjs.c'). */
/* */ /* */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
#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 = &parameter; */
/* */
/* 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
/*************************************************************************/ /*************************************************************************/
@ -675,8 +656,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. */
/* */ /* */
/* https://www.microsoft.com/typography/otspec/glyf.htm */ /* http://www.microsoft.com/typography/otspec/glyf.htm */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
/* */ /* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@ -699,24 +680,6 @@ 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
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/**** ****/ /**** ****/
@ -772,86 +735,6 @@ 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 */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/**** ****/ /**** ****/
@ -870,9 +753,7 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Compile autofit module with fallback Indic script support, covering */ /* Compile autofit module with Indic script support. */
/* some scripts that the `latin' submodule of the autofit module doesn't */
/* (yet) handle. */
/* */ /* */
#define AF_CONFIG_OPTION_INDIC #define AF_CONFIG_OPTION_INDIC
@ -884,94 +765,63 @@ 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 active only if the rendering mode is */ /* This experimental option is only active if the render mode is */
/* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */ /* FT_RENDER_MODE_LIGHT. */
/* `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 */
/* */ /* */
/* /*
* This macro is obsolete. Support has been removed in FreeType * Define this variable if you want to keep the layout of internal
* version 2.5. * structures that was used prior to FreeType 2.2. This also compiles in
* a few obsolete functions to avoid linking problems on typical Unix
* distributions.
*
* For embedded systems or building a new distribution from scratch, it
* is recommended to disable the macro since it reduces the library's code
* size and activates a few memory-saving optimizations as well.
*/ */
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ /* #define FT_CONFIG_OPTION_OLD_INTERNALS */
/* /*
* This macro is defined if native TrueType hinting is requested by the * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
* definitions above. * we restrict the number of charmaps in a font. The current API of
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
* takes charcode only. To determine the passed value is for cmap_index
* or charcode, the possible cmap_index is restricted not to exceed
* the minimum possible charcode by a rogue client. It is also very
* unlikely that a rogue client is interested in Unicode values 0 to 15.
*
* NOTE: The original threshold was 4 deduced from popular number of
* cmap subtables in UCS-4 TrueType fonts, but now it is not
* irregular for OpenType fonts to have more than 4 subtables,
* because variation selector subtables are available for Apple
* and Microsoft platforms.
*/ */
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#define TT_USE_BYTECODE_INTERPRETER
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 #define FT_MAX_CHARMAP_CACHEABLE 15
#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
#endif
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
#endif
#endif
#endif #endif
/* /*
* Check CFF darkening parameters. The checks are the same as in function * This macro is defined if either unpatented or native TrueType
* `cff_property_set' in file `cffdrivr.c'. * hinting is requested by the definitions above.
*/ */
#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ #define TT_USE_BYTECODE_INTERPRETER
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ #undef TT_CONFIG_OPTION_UNPATENTED_HINTING
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
\ #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 */

View File

@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */ /* ANSI-specific library and header configuration file (specification */
/* only). */ /* only). */
/* */ /* */
/* Copyright 2002-2018 by */ /* Copyright 2002-2007, 2009, 2011-2012 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,13 +23,14 @@
/* 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 it. */ /* Load a file which defines __FTSTDLIB_H__ before this one to override */
/* it. */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
#ifndef FTSTDLIB_H_ #ifndef __FTSTDLIB_H__
#define FTSTDLIB_H_ #define __FTSTDLIB_H__
#include <stddef.h> #include <stddef.h>
@ -63,8 +64,6 @@
#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
@ -142,8 +141,8 @@
/**********************************************************************/ /**********************************************************************/
#define ft_strtol strtol #define ft_atol atol
#define ft_getenv getenv #define ft_labs labs
/**********************************************************************/ /**********************************************************************/
@ -169,7 +168,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

View File

@ -4,7 +4,7 @@
/* */ /* */
/* Quick computation of advance widths (specification only). */ /* Quick computation of advance widths (specification only). */
/* */ /* */
/* Copyright 2008-2018 by */ /* Copyright 2008 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,11 +48,6 @@ 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
*
*/ */
@ -69,15 +64,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 that are either unscaled, unhinted, bitmapped, */ /* Typically, glyphs which 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 that require loading, scaling, */ /* Normal and bytecode hinted modes, which 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 0x20000000L #define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL
/*************************************************************************/ /*************************************************************************/
@ -87,7 +82,8 @@ 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. */ /* @FT_Face. By default, the unhinted advance is returned in font */
/* units. */
/* */ /* */
/* <Input> */ /* <Input> */
/* face :: The source @FT_Face handle. */ /* face :: The source @FT_Face handle. */
@ -98,9 +94,8 @@ 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. If scaling is performed (based on */ /* padvance :: The advance value, in either font units or 16.16 */
/* the value of `load_flags'), the advance value is in */ /* format. */
/* 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. */
@ -132,7 +127,8 @@ 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. */ /* @FT_Face. By default, the unhinted advances are returned in font */
/* units. */
/* */ /* */
/* <Input> */ /* <Input> */
/* face :: The source @FT_Face handle. */ /* face :: The source @FT_Face handle. */
@ -145,12 +141,8 @@ FT_BEGIN_HEADER
/* calling @FT_Load_Glyph. */ /* calling @FT_Load_Glyph. */
/* */ /* */
/* <Output> */ /* <Output> */
/* padvance :: The advance values. This array, to be provided by the */ /* padvance :: The advances, in either font units or 16.16 format. */
/* caller, must contain at least `count' elements. */ /* This array 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. */
@ -176,12 +168,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 */

View File

@ -0,0 +1,349 @@
/***************************************************************************/
/* */
/* ftautoh.h */
/* */
/* FreeType API for controlling the auto-hinter (specification only). */
/* */
/* Copyright 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef __FTAUTOH_H__
#define __FTAUTOH_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* auto_hinter
*
* @title:
* The auto-hinter
*
* @abstract:
* Controlling the auto-hinting module.
*
* @description:
* While FreeType's auto-hinter doesn't expose API functions by itself,
* it is possible to control its behaviour with @FT_Property_Set and
* @FT_Property_Get. The following lists the available properties
* together with the necessary macros and structures.
*
* Note that the auto-hinter's module name is `autofitter' for
* historical reasons.
*
*/
/**************************************************************************
*
* @property:
* glyph-to-script-map
*
* @description:
* The auto-hinter provides various script modules to hint glyphs.
* Examples of supported scripts are Latin or CJK. Before a glyph is
* auto-hinted, the Unicode character map of the font gets examined, and
* the script is then determined based on Unicode character ranges, see
* below.
*
* OpenType fonts, however, often provide much more glyphs than
* character codes (small caps, superscripts, ligatures, swashes, etc.),
* to be controlled by so-called `features'. Handling OpenType features
* can be quite complicated and thus needs a separate library on top of
* FreeType.
*
* The mapping between glyph indices and scripts (in the auto-hinter
* sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
* array with `num_glyphs' elements, as found in the font's @FT_Face
* structure. The `glyph-to-script-map' property returns a pointer to
* this array which can be modified as needed. Note that the
* modification should happen before the first glyph gets processed by
* the auto-hinter so that the global analysis of the font shapes
* actually uses the modified mapping.
*
* The following example code demonstrates how to access it (omitting
* the error handling).
*
* {
* FT_Library library;
* FT_Face face;
* FT_Prop_GlyphToScriptMap prop;
*
*
* FT_Init_FreeType( &library );
* FT_New_Face( library, "foo.ttf", 0, &face );
*
* prop.face = face;
*
* FT_Property_Get( library, "autofitter",
* "glyph-to-script-map", &prop );
*
* // adjust `prop.map' as needed right here
*
* FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
* }
*
*/
/**************************************************************************
*
* @enum:
* FT_AUTOHINTER_SCRIPT_XXX
*
* @description:
* A list of constants used for the @glyph-to-script-map property to
* specify the script submodule the auto-hinter should use for hinting a
* particular glyph.
*
* @values:
* FT_AUTOHINTER_SCRIPT_NONE ::
* Don't auto-hint this glyph.
*
* FT_AUTOHINTER_SCRIPT_LATIN ::
* Apply the latin auto-hinter. For the auto-hinter, `latin' is a
* very broad term, including Cyrillic and Greek also since characters
* from those scripts share the same design constraints.
*
* By default, characters from the following Unicode ranges are
* assigned to this submodule.
*
* {
* U+0020 - U+007F // Basic Latin (no control characters)
* U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
* U+0100 - U+017F // Latin Extended-A
* U+0180 - U+024F // Latin Extended-B
* U+0250 - U+02AF // IPA Extensions
* U+02B0 - U+02FF // Spacing Modifier Letters
* U+0300 - U+036F // Combining Diacritical Marks
* U+0370 - U+03FF // Greek and Coptic
* U+0400 - U+04FF // Cyrillic
* U+0500 - U+052F // Cyrillic Supplement
* U+1D00 - U+1D7F // Phonetic Extensions
* U+1D80 - U+1DBF // Phonetic Extensions Supplement
* U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
* U+1E00 - U+1EFF // Latin Extended Additional
* U+1F00 - U+1FFF // Greek Extended
* U+2000 - U+206F // General Punctuation
* U+2070 - U+209F // Superscripts and Subscripts
* U+20A0 - U+20CF // Currency Symbols
* U+2150 - U+218F // Number Forms
* U+2460 - U+24FF // Enclosed Alphanumerics
* U+2C60 - U+2C7F // Latin Extended-C
* U+2DE0 - U+2DFF // Cyrillic Extended-A
* U+2E00 - U+2E7F // Supplemental Punctuation
* U+A640 - U+A69F // Cyrillic Extended-B
* U+A720 - U+A7FF // Latin Extended-D
* U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
* U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
* U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
* }
*
* FT_AUTOHINTER_SCRIPT_CJK ::
* Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
* Vietnamese, and some other scripts.
*
* By default, characters from the following Unicode ranges are
* assigned to this submodule.
*
* {
* U+1100 - U+11FF // Hangul Jamo
* U+2E80 - U+2EFF // CJK Radicals Supplement
* U+2F00 - U+2FDF // Kangxi Radicals
* U+2FF0 - U+2FFF // Ideographic Description Characters
* U+3000 - U+303F // CJK Symbols and Punctuation
* U+3040 - U+309F // Hiragana
* U+30A0 - U+30FF // Katakana
* U+3100 - U+312F // Bopomofo
* U+3130 - U+318F // Hangul Compatibility Jamo
* U+3190 - U+319F // Kanbun
* U+31A0 - U+31BF // Bopomofo Extended
* U+31C0 - U+31EF // CJK Strokes
* U+31F0 - U+31FF // Katakana Phonetic Extensions
* U+3200 - U+32FF // Enclosed CJK Letters and Months
* U+3300 - U+33FF // CJK Compatibility
* U+3400 - U+4DBF // CJK Unified Ideographs Extension A
* U+4DC0 - U+4DFF // Yijing Hexagram Symbols
* U+4E00 - U+9FFF // CJK Unified Ideographs
* U+A960 - U+A97F // Hangul Jamo Extended-A
* U+AC00 - U+D7AF // Hangul Syllables
* U+D7B0 - U+D7FF // Hangul Jamo Extended-B
* U+F900 - U+FAFF // CJK Compatibility Ideographs
* U+FE10 - U+FE1F // Vertical forms
* U+FE30 - U+FE4F // CJK Compatibility Forms
* U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
* U+1B000 - U+1B0FF // Kana Supplement
* U+1D300 - U+1D35F // Tai Xuan Hing Symbols
* U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
* U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
* U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
* U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
* U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
* }
*
* FT_AUTOHINTER_SCRIPT_INDIC ::
* Apply the indic auto-hinter, covering all major scripts from the
* Indian sub-continent and some other related scripts like Thai, Lao,
* or Tibetan.
*
* By default, characters from the following Unicode ranges are
* assigned to this submodule.
*
* {
* U+0900 - U+0DFF // Indic Range
* U+0F00 - U+0FFF // Tibetan
* U+1900 - U+194F // Limbu
* U+1B80 - U+1BBF // Sundanese
* U+1C80 - U+1CDF // Meetei Mayak
* U+A800 - U+A82F // Syloti Nagri
* U+11800 - U+118DF // Sharada
* }
*
* Note that currently Indic support is rudimentary only, missing blue
* zone support.
*
*/
#define FT_AUTOHINTER_SCRIPT_NONE 0
#define FT_AUTOHINTER_SCRIPT_LATIN 1
#define FT_AUTOHINTER_SCRIPT_CJK 2
#define FT_AUTOHINTER_SCRIPT_INDIC 3
/**************************************************************************
*
* @struct:
* FT_Prop_GlyphToScriptMap
*
* @description:
* The data exchange structure for the @glyph-to-script-map property.
*
*/
typedef struct FT_Prop_GlyphToScriptMap_
{
FT_Face face;
FT_Byte* map;
} FT_Prop_GlyphToScriptMap;
/**************************************************************************
*
* @property:
* fallback-script
*
* @description:
* If no auto-hinter script module can be assigned to a glyph, a
* fallback script gets assigned to it (see also the
* @glyph-to-script-map property). By default, this is
* @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
* this fallback value can be changed.
*
* {
* FT_Library library;
* FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "autofitter",
* "fallback-script", &fallback_script );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* It's important to use the right timing for changing this value: The
* creation of the glyph-to-script map which eventually uses the
* fallback script value gets triggered either by setting or reading a
* face-specific property like @glyph-to-script-map, or by auto-hinting
* any glyph from that face. In particular, if you have already created
* an @FT_Face structure but not loaded any glyph (using the
* auto-hinter), a change of the fallback glyph will affect this face.
*
*/
/**************************************************************************
*
* @property:
* increase-x-height
*
* @description:
* For ppem values in the range 6~<= ppem <= `increase-x-height', round
* up the font's x~height much more often than normally. If the value
* is set to~0, which is the default, this feature is switched off. Use
* this property to improve the legibility of small font sizes if
* necessary.
*
* {
* FT_Library library;
* FT_Face face;
* FT_Prop_IncreaseXHeight prop;
*
*
* FT_Init_FreeType( &library );
* FT_New_Face( library, "foo.ttf", 0, &face );
* FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
*
* prop.face = face;
* prop.limit = 14;
*
* FT_Property_Set( library, "autofitter",
* "increase-x-height", &prop );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* Set this value right after calling @FT_Set_Char_Size, but before
* loading any glyph (using the auto-hinter).
*
*/
/**************************************************************************
*
* @struct:
* FT_Prop_IncreaseXHeight
*
* @description:
* The data exchange structure for the @increase-x-height property.
*
*/
typedef struct FT_Prop_IncreaseXHeight_
{
FT_Face face;
FT_UInt limit;
} FT_Prop_IncreaseXHeight;
/* */
FT_END_HEADER
#endif /* __FTAUTOH_H__ */
/* END */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* FreeType exact bbox computation (specification). */ /* FreeType exact bbox computation (specification). */
/* */ /* */
/* Copyright 1996-2018 by */ /* Copyright 1996-2001, 2003, 2007, 2011 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 that returns _very_ quickly when the two boxes */ /* algorithm which returns _very_ quickly when the two boxes */
/* coincide. Otherwise, the outline Bezier arcs are traversed to */ /* coincide. Otherwise, the outline Bézier arcs are traversed to */
/* extract their extrema. */ /* extract their extrema. */
/* */ /* */
/* <Input> */ /* <Input> */
@ -78,19 +78,20 @@ 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 */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* FreeType API for accessing BDF-specific strings (specification). */ /* FreeType API for accessing BDF-specific strings (specification). */
/* */ /* */
/* Copyright 2002-2018 by */ /* Copyright 2002, 2003, 2004, 2006, 2009 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:
* BDF_PropertyType * FT_PropertyType
* *
* @description: * @description:
* A list of BDF property types. * A list of BDF property types.
@ -106,8 +106,7 @@ FT_BEGIN_HEADER
* The property type. * The property type.
* *
* u.atom :: * u.atom ::
* The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
* 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.
@ -200,11 +199,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 */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* FreeType utility functions for bitmaps (specification). */ /* FreeType utility functions for bitmaps (specification). */
/* */ /* */
/* Copyright 2004-2018 by */ /* Copyright 2004, 2005, 2006, 2008 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,9 +45,7 @@ FT_BEGIN_HEADER
/* Handling FT_Bitmap objects. */ /* Handling FT_Bitmap objects. */
/* */ /* */
/* <Description> */ /* <Description> */
/* This section contains functions for handling @FT_Bitmap objects. */ /* This section contains functions for converting 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'). */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
@ -55,7 +53,7 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
/* FT_Bitmap_Init */ /* FT_Bitmap_New */
/* */ /* */
/* <Description> */ /* <Description> */
/* Initialize a pointer to an @FT_Bitmap structure. */ /* Initialize a pointer to an @FT_Bitmap structure. */
@ -63,14 +61,6 @@ 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 );
@ -97,7 +87,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);
/*************************************************************************/ /*************************************************************************/
@ -132,9 +122,6 @@ 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,
@ -148,9 +135,9 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Convert */ /* FT_Bitmap_Convert */
/* */ /* */
/* <Description> */ /* <Description> */
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */ /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */
/* to a bitmap object with depth 8bpp, making the number of used */ /* bitmap object with depth 8bpp, making the number of used bytes per */
/* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */ /* 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. */
@ -210,7 +197,7 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Done */ /* FT_Bitmap_Done */
/* */ /* */
/* <Description> */ /* <Description> */
/* Destroy a bitmap object initialized with @FT_Bitmap_Init. */ /* Destroy a bitmap object created with @FT_Bitmap_New. */
/* */ /* */
/* <Input> */ /* <Input> */
/* library :: A handle to a library object. */ /* library :: A handle to a library object. */
@ -234,7 +221,7 @@ FT_BEGIN_HEADER
FT_END_HEADER FT_END_HEADER
#endif /* FTBITMAP_H_ */ #endif /* __FTBITMAP_H__ */
/* END */ /* END */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* Bzip2-compressed stream support. */ /* Bzip2-compressed stream support. */
/* */ /* */
/* Copyright 2010-2018 by */ /* Copyright 2010 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 */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* FreeType Cache subsystem (specification). */ /* FreeType Cache subsystem (specification). */
/* */ /* */
/* Copyright 1996-2018 by */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 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, */
@ -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 that calls, * Face IDs are passed by the client to the cache manager, which 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,11 +209,22 @@ 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 req_data, FT_Pointer request_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 */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -370,7 +381,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 */
@ -540,6 +551,13 @@ FT_BEGIN_HEADER
FTC_FaceID face_id ); FTC_FaceID face_id );
/*************************************************************************/
/* */
/* <Section> */
/* cache_subsystem */
/* */
/*************************************************************************/
/************************************************************************* /*************************************************************************
* *
* @type: * @type:
@ -616,6 +634,14 @@ FT_BEGIN_HEADER
FT_UInt32 char_code ); FT_UInt32 char_code );
/*************************************************************************/
/* */
/* <Section> */
/* cache_subsystem */
/* */
/*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -652,8 +678,8 @@ FT_BEGIN_HEADER
typedef struct FTC_ImageTypeRec_ typedef struct FTC_ImageTypeRec_
{ {
FTC_FaceID face_id; FTC_FaceID face_id;
FT_UInt width; FT_Int width;
FT_UInt height; FT_Int height;
FT_Int32 flags; FT_Int32 flags;
} FTC_ImageTypeRec; } FTC_ImageTypeRec;
@ -679,6 +705,17 @@ 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 */
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -686,7 +723,7 @@ FT_BEGIN_HEADER
/* FTC_ImageCache */ /* FTC_ImageCache */
/* */ /* */
/* <Description> */ /* <Description> */
/* A handle to a glyph image cache object. They are designed to */ /* A handle to an 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. */
/* */ /* */
@ -734,7 +771,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 the corresponding cache */ /* anode :: Used to return the address of of the corresponding cache */
/* node after incrementing its reference count (see note */ /* node after incrementing its reference count (see note */
/* below). */ /* below). */
/* */ /* */
@ -787,7 +824,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 the corresponding */ /* anode :: Used to return the address of of the corresponding */
/* cache node after incrementing its reference count */ /* cache node after incrementing its reference count */
/* (see note below). */ /* (see note below). */
/* */ /* */
@ -942,7 +979,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 the corresponding cache */ /* anode :: Used to return the address of of the corresponding cache */
/* node after incrementing its reference count (see note */ /* node after incrementing its reference count (see note */
/* below). */ /* below). */
/* */ /* */
@ -997,7 +1034,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 the corresponding */ /* anode :: Used to return the address of of the corresponding */
/* cache node after incrementing its reference count */ /* cache node after incrementing its reference count */
/* (see note below). */ /* (see note below). */
/* */ /* */
@ -1031,12 +1068,73 @@ 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 */

View File

@ -0,0 +1,150 @@
/***************************************************************************/
/* */
/* ftcffdrv.h */
/* */
/* FreeType API for controlling the CFF driver (specification only). */
/* */
/* Copyright 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef __FTCFFDRV_H__
#define __FTCFFDRV_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* cff_driver
*
* @title:
* The CFF driver
*
* @abstract:
* Controlling the CFF driver module.
*
* @description:
* While FreeType's CFF driver doesn't expose API functions by itself,
* it is possible to control its behaviour with @FT_Property_Set and
* @FT_Property_Get. The following lists the available properties
* together with the necessary macros and structures.
*
* The CFF driver's module name is `cff'.
*
*/
/**************************************************************************
*
* @property:
* hinting-engine
*
* @description:
* Thanks to Adobe, which contributed a new hinting (and parsing)
* engine, an application can select between `freetype' and `adobe'.
*
* Right now, the default engine is `freetype'. However, this will
* change: After a certain time of intensive testing it is planned to
* make `adobe' the default due to its superior rendering results.
*
* The following example code demonstrates how to select Adobe's hinting
* engine (omitting the error handling).
*
* {
* FT_Library library;
* FT_Face face;
* FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "cff",
* "hinting-engine", &hinting_engine );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
*/
/**************************************************************************
*
* @enum:
* FT_CFF_HINTING_XXX
*
* @description:
* A list of constants used for the @hinting-engine property to select
* the hinting engine for CFF fonts.
*
* @values:
* FT_CFF_HINTING_FREETYPE ::
* Use the old FreeType hinting engine.
*
* FT_CFF_HINTING_ADOBE ::
* Use the hinting engine contributed by Adobe.
*
*/
#define FT_CFF_HINTING_FREETYPE 0
#define FT_CFF_HINTING_ADOBE 1
/**************************************************************************
*
* @property:
* no-stem-darkening
*
* @description:
* By default, the Adobe CFF engine darkens stems at smaller sizes,
* regardless of hinting, to enhance contrast. Setting this property,
* stem darkening gets switched off.
*
* Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
*
* {
* FT_Library library;
* FT_Face face;
* FT_Bool no_stem_darkening = TRUE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "cff",
* "no-stem-darkening", &no_stem_darkening );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
*/
/* */
FT_END_HEADER
#endif /* __FTCFFDRV_H__ */
/* END */

Some files were not shown because too many files have changed in this diff Show More