===== freetype2-VER-2-10-4/builds/mac/ftlib.prj.xml =====
]>
FreeTypeLib
UserSourceTrees
AlwaysSearchUserPathstrue
InterpretDOSAndUnixPathstrue
RequireFrameworkStyleIncludesfalse
SourceRelativeIncludesfalse
UserSearchPaths
SearchPath
Path:
PathFormatMacOS
PathRootProject
Recursivetrue
FrameworkPathfalse
HostFlagsAll
SearchPath
Path:::include:
PathFormatMacOS
PathRootProject
Recursivetrue
FrameworkPathfalse
HostFlagsAll
SearchPath
Path:::src:
PathFormatMacOS
PathRootProject
Recursivetrue
FrameworkPathfalse
HostFlagsAll
SearchPath
Path::
PathFormatMacOS
PathRootProject
Recursivetrue
FrameworkPathfalse
HostFlagsAll
SystemSearchPaths
SearchPath
Path:
PathFormatMacOS
PathRootCodeWarrior
Recursivetrue
FrameworkPathfalse
HostFlagsAll
MWRuntimeSettings_WorkingDirectory
MWRuntimeSettings_CommandLine
MWRuntimeSettings_HostApplication
Path
PathFormatGeneric
PathRootAbsolute
MWRuntimeSettings_EnvVars
LinkerMacOS PPC Linker
PreLinker
PostLinker
TargetnameFreeTypeLib
OutputDirectory
Path:::objs:
PathFormatMacOS
PathRootProject
SaveEntriesUsingRelativePathsfalse
FileMappings
FileTypeAPPL
FileExtension
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileTypeAppl
FileExtension
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileTypeMMLB
FileExtension
CompilerLib Import PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeMPLF
FileExtension
CompilerLib Import PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeMWCD
FileExtension
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileTypeRSRC
FileExtension
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileTypeTEXT
FileExtension.bh
CompilerBalloon Help
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.c
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.c++
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.cc
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.cp
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.cpp
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.exp
Compiler
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.h
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMaketrue
FileTypeTEXT
FileExtension.p
CompilerMW Pascal PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.pas
CompilerMW Pascal PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.pch
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompiletrue
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.pch++
CompilerMW C/C++ PPC
EditLanguageC/C++
Precompiletrue
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.ppu
CompilerMW Pascal PPC
EditLanguage
Precompiletrue
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.r
CompilerRez
EditLanguageRez
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeTEXT
FileExtension.s
CompilerPPCAsm
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypeXCOF
FileExtension
CompilerXCOFF Import PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypedocu
FileExtension
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileTypersrc
FileExtension
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileTypeshlb
FileExtension
CompilerPEF Import PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileTypestub
FileExtension
CompilerPEF Import PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileExtension.doc
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFilefalse
IgnoredByMaketrue
FileExtension.o
CompilerXCOFF Import PPC
EditLanguage
Precompilefalse
Launchablefalse
ResourceFilefalse
IgnoredByMakefalse
FileExtension.ppob
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
FileExtension.rsrc
Compiler
EditLanguage
Precompilefalse
Launchabletrue
ResourceFiletrue
IgnoredByMakefalse
CacheModDatestrue
DumpBrowserInfofalse
CacheSubprojectstrue
UseThirdPartyDebuggerfalse
BrowserGenerator1
DebuggerAppPath
Path
PathFormatGeneric
PathRootAbsolute
DebuggerCmdLineArgs
DebuggerWorkingDir
Path
PathFormatGeneric
PathRootAbsolute
CodeCompletionPrefixFileNameMacHeaders.c
CodeCompletionMacroFileNameMacOS_Carbon_C++_Macros.h
ConsoleEncoding0
LogSystemMessagestrue
AutoTargetDLLsfalse
StopAtWatchpointstrue
PauseWhileRunningfalse
PauseInterval5
PauseUIFlags0
AltExePath
Path
PathFormatGeneric
PathRootAbsolute
StopAtTempBPOnLaunchtrue
CacheSymbolicstrue
TempBPFunctionNamemain
TempBPType0
Enabledfalse
ConnectionName
DownloadPath
LaunchRemoteAppfalse
RemoteAppPath
CoreID0
JTAGClockSpeed8000
IsMultiCorefalse
OSDownloadfalse
UseGlobalOSDownloadfalse
OSDownloadConnectionName
OSDownloadPath
AltDownloadfalse
AltDownloadConnectionName
OtherExecutables
AnalyzerConnectionName
CustomColor1
Red0
Green32767
Blue0
CustomColor2
Red0
Green32767
Blue0
CustomColor3
Red0
Green32767
Blue0
CustomColor4
Red0
Green32767
Blue0
MWFrontEnd_C_cplusplus0
MWFrontEnd_C_checkprotos1
MWFrontEnd_C_arm0
MWFrontEnd_C_trigraphs0
MWFrontEnd_C_onlystdkeywords0
MWFrontEnd_C_enumsalwaysint0
MWFrontEnd_C_ansistrict1
MWFrontEnd_C_wchar_type1
MWFrontEnd_C_enableexceptions1
MWFrontEnd_C_dontreusestrings0
MWFrontEnd_C_poolstrings0
MWFrontEnd_C_dontinline0
MWFrontEnd_C_useRTTI1
MWFrontEnd_C_unsignedchars0
MWFrontEnd_C_autoinline0
MWFrontEnd_C_booltruefalse1
MWFrontEnd_C_inlinelevel0
MWFrontEnd_C_ecplusplus0
MWFrontEnd_C_defer_codegen0
MWFrontEnd_C_templateparser0
MWFrontEnd_C_c990
MWFrontEnd_C_bottomupinline1
MWFrontEnd_C_gcc_extensions0
MWFrontEnd_C_instance_manager0
C_CPP_Preprocessor_EmitFiletrue
C_CPP_Preprocessor_EmitLinefalse
C_CPP_Preprocessor_EmitFullPathfalse
C_CPP_Preprocessor_KeepCommentsfalse
C_CPP_Preprocessor_PCHUsesPrefixTextfalse
C_CPP_Preprocessor_EmitPragmastrue
C_CPP_Preprocessor_KeepWhiteSpacefalse
C_CPP_Preprocessor_MultiByteEncodingencASCII_Unicode
C_CPP_Preprocessor_PrefixText/* settings imported from old "C/C++ Language" panel */
#if !__option(precompile)
#include "ftoption.h" /* was "Prefix file" */
#endif
MWWarning_C_warn_illpragma0
MWWarning_C_warn_emptydecl0
MWWarning_C_warn_possunwant0
MWWarning_C_warn_unusedvar1
MWWarning_C_warn_unusedarg1
MWWarning_C_warn_extracomma0
MWWarning_C_pedantic0
MWWarning_C_warningerrors0
MWWarning_C_warn_hidevirtual0
MWWarning_C_warn_implicitconv0
MWWarning_C_warn_notinlined0
MWWarning_C_warn_structclass0
MWWarning_C_warn_missingreturn0
MWWarning_C_warn_no_side_effect0
MWWarning_C_warn_resultnotused0
MWWarning_C_warn_padding0
MWWarning_C_warn_impl_i2f_conv0
MWWarning_C_warn_impl_f2i_conv0
MWWarning_C_warn_impl_s2u_conv0
MWWarning_C_warn_illtokenpasting0
MWWarning_C_warn_filenamecaps0
MWWarning_C_warn_filenamecapssystem0
MWWarning_C_warn_undefmacro0
MWWarning_C_warn_ptrintconv0
MWMerge_MacOS_projectTypeApplication
MWMerge_MacOS_outputNameMerge Out
MWMerge_MacOS_outputCreator????
MWMerge_MacOS_outputTypeAPPL
MWMerge_MacOS_suppressWarning0
MWMerge_MacOS_copyFragments1
MWMerge_MacOS_copyResources1
MWMerge_MacOS_flattenResource0
MWMerge_MacOS_flatFileNamea.rsrc
MWMerge_MacOS_flatFileOutputPath
Path:
PathFormatMacOS
PathRootProject
MWMerge_MacOS_skipResources
DLGX
ckid
Proj
WSPC
FileLockedfalse
ResourcesMapIsReadOnlyfalse
PrinterDriverIsMultiFinderCompatiblefalse
Invisiblefalse
HasBundlefalse
NameLockedfalse
Stationeryfalse
HasCustomIconfalse
Sharedfalse
HasBeenInitedfalse
Label0
Comments
HasCustomBadgefalse
HasRoutingInfofalse
MWCodeGen_PPC_structalignmentPPC_mw
MWCodeGen_PPC_tracebacktablesNone
MWCodeGen_PPC_processorGeneric
MWCodeGen_PPC_function_align4
MWCodeGen_PPC_tocdata1
MWCodeGen_PPC_largetoc0
MWCodeGen_PPC_profiler0
MWCodeGen_PPC_vectortocdata0
MWCodeGen_PPC_poolconst0
MWCodeGen_PPC_peephole0
MWCodeGen_PPC_readonlystrings0
MWCodeGen_PPC_linkerpoolsstrings0
MWCodeGen_PPC_volatileasm0
MWCodeGen_PPC_schedule0
MWCodeGen_PPC_altivec0
MWCodeGen_PPC_altivec_move_block0
MWCodeGen_PPC_strictIEEEfp0
MWCodeGen_PPC_fpcontract1
MWCodeGen_PPC_genfsel0
MWCodeGen_PPC_orderedfpcmp0
MWCodeGen_MachO_structalignmentPPC_mw
MWCodeGen_MachO_profiler_enumOff
MWCodeGen_MachO_processorGeneric
MWCodeGen_MachO_function_align4
MWCodeGen_MachO_common0
MWCodeGen_MachO_boolisint0
MWCodeGen_MachO_peephole1
MWCodeGen_MachO_readonlystrings0
MWCodeGen_MachO_linkerpoolsstrings1
MWCodeGen_MachO_volatileasm0
MWCodeGen_MachO_schedule0
MWCodeGen_MachO_altivec0
MWCodeGen_MachO_vecmove0
MWCodeGen_MachO_fp_ieee_strict0
MWCodeGen_MachO_fpcontract1
MWCodeGen_MachO_genfsel0
MWCodeGen_MachO_fp_cmps_ordered0
MWDisassembler_PPC_showcode1
MWDisassembler_PPC_extended1
MWDisassembler_PPC_mix0
MWDisassembler_PPC_nohex0
MWDisassembler_PPC_showdata1
MWDisassembler_PPC_showexceptions1
MWDisassembler_PPC_showsym0
MWDisassembler_PPC_shownames1
GlobalOptimizer_PPC_optimizationlevelLevel0
GlobalOptimizer_PPC_optforSpeed
MWLinker_PPC_linksym1
MWLinker_PPC_symfullpath1
MWLinker_PPC_linkmap0
MWLinker_PPC_nolinkwarnings0
MWLinker_PPC_dontdeadstripinitcode0
MWLinker_PPC_permitmultdefs0
MWLinker_PPC_linkmodeFast
MWLinker_PPC_code_foldingNone
MWLinker_PPC_initname
MWLinker_PPC_mainname
MWLinker_PPC_termname
MWLinker_MacOSX_linksym1
MWLinker_MacOSX_symfullpath0
MWLinker_MacOSX_nolinkwarnings0
MWLinker_MacOSX_linkmap0
MWLinker_MacOSX_dontdeadstripinitcode0
MWLinker_MacOSX_permitmultdefs0
MWLinker_MacOSX_use_objectivec_semantics0
MWLinker_MacOSX_strip_debug_symbols0
MWLinker_MacOSX_split_segs0
MWLinker_MacOSX_report_msl_overloads0
MWLinker_MacOSX_objects_follow_linkorder0
MWLinker_MacOSX_linkmodeNormal
MWLinker_MacOSX_exportsReferencedGlobals
MWLinker_MacOSX_sortcodeNone
MWLinker_MacOSX_mainname
MWLinker_MacOSX_initname
MWLinker_MacOSX_code_foldingNone
MWLinker_MacOSX_stabsgenNone
MWProject_MacOSX_typeExecutable
MWProject_MacOSX_outfile
MWProject_MacOSX_filecreator????
MWProject_MacOSX_filetypeMEXE
MWProject_MacOSX_vmaddress4096
MWProject_MacOSX_usedefaultvmaddr1
MWProject_MacOSX_flatrsrc0
MWProject_MacOSX_flatrsrcfilename
MWProject_MacOSX_flatrsrcoutputdir
Path:
PathFormatMacOS
PathRootProject
MWProject_MacOSX_installpath./
MWProject_MacOSX_dont_prebind0
MWProject_MacOSX_flat_namespace0
MWProject_MacOSX_frameworkversionA
MWProject_MacOSX_currentversion0
MWProject_MacOSX_flat_oldimpversion0
MWProject_MacOSX_AddrMode1
MWPEF_exportsNone
MWPEF_libfolder0
MWPEF_sortcodeNone
MWPEF_expandbss0
MWPEF_sharedata0
MWPEF_olddefversion0
MWPEF_oldimpversion0
MWPEF_currentversion0
MWPEF_fragmentname
MWPEF_collapsereloads0
MWProject_PPC_typeLibrary
MWProject_PPC_outfileFreeTypeLib
MWProject_PPC_filecreator????
MWProject_PPC_filetype????
MWProject_PPC_size0
MWProject_PPC_minsize0
MWProject_PPC_stacksize0
MWProject_PPC_flags0
MWProject_PPC_symfilename
MWProject_PPC_rsrcname
MWProject_PPC_rsrcheaderNative
MWProject_PPC_rsrctype????
MWProject_PPC_rsrcid0
MWProject_PPC_rsrcflags0
MWProject_PPC_rsrcstore0
MWProject_PPC_rsrcmerge0
MWProject_PPC_flatrsrc0
MWProject_PPC_flatrsrcoutputdir
Path:
PathFormatMacOS
PathRootProject
MWProject_PPC_flatrsrcfilename
MWAssembler_PPC_auxheader0
MWAssembler_PPC_symmodeMac
MWAssembler_PPC_dialectPPC
MWAssembler_PPC_prefixfile
MWAssembler_PPC_typecheck0
MWAssembler_PPC_warnings0
MWAssembler_PPC_casesensitive0
PList_OutputTypeFile
PList_OutputEncodingUTF-8
PList_PListVersion1.0
PList_Prefix
PList_FileFilenameInfo.plist
PList_FileDirectory
Path:
PathFormatMacOS
PathRootProject
PList_ResourceTypeplst
PList_ResourceID0
PList_ResourceName
MWRez_Language_maxwidth80
MWRez_Language_scriptRoman
MWRez_Language_alignmentAlign1
MWRez_Language_filtermodeFilterSkip
MWRez_Language_suppresswarnings0
MWRez_Language_escapecontrolchars1
MWRez_Language_prefixname
MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT'
Name
ftsystem.c
MacOS
Text
Debug
Name
ftbase.c
MacOS
Text
Debug
Name
ftinit.c
MacOS
Text
Debug
Name
sfnt.c
MacOS
Text
Debug
Name
psnames.c
MacOS
Text
Debug
Name
ftdebug.c
MacOS
Text
Debug
Name
type1cid.c
MacOS
Text
Debug
Name
cff.c
MacOS
Text
Debug
Name
smooth.c
MacOS
Text
Debug
Name
winfnt.c
MacOS
Text
Debug
Name
truetype.c
MacOS
Text
Debug
Name
ftmac.c
MacOS
Text
Debug
Name
psaux.c
MacOS
Text
Name
ftcache.c
MacOS
Text
Name
ftglyph.c
MacOS
Text
Name
type1.c
MacOS
Text
Debug
Name
pshinter.c
MacOS
Text
Debug
Name
pcf.c
MacOS
Text
Debug
Name
ftraster.c
MacOS
Text
Debug
Name
ftrend1.c
MacOS
Text
Debug
Name
ftsystem.c
MacOS
Name
ftbase.c
MacOS
Name
ftinit.c
MacOS
Name
sfnt.c
MacOS
Name
psnames.c
MacOS
Name
ftdebug.c
MacOS
Name
type1cid.c
MacOS
Name
cff.c
MacOS
Name
smooth.c
MacOS
Name
winfnt.c
MacOS
Name
truetype.c
MacOS
Name
ftmac.c
MacOS
Name
psaux.c
MacOS
Name
ftcache.c
MacOS
Name
ftglyph.c
MacOS
Name
type1.c
MacOS
Name
pshinter.c
MacOS
Name
pcf.c
MacOS
Name
ftraster.c
MacOS
Name
ftrend1.c
MacOS
FreeTypeLib
base
FreeTypeLib
Name
ftbase.c
MacOS
FreeTypeLib
Name
ftdebug.c
MacOS
FreeTypeLib
Name
ftglyph.c
MacOS
FreeTypeLib
Name
ftinit.c
MacOS
FreeTypeLib
Name
ftsystem.c
MacOS
FreeTypeLib
Name
ftmac.c
MacOS
ftmodules
FreeTypeLib
Name
cff.c
MacOS
FreeTypeLib
Name
ftcache.c
MacOS
FreeTypeLib
Name
psaux.c
MacOS
FreeTypeLib
Name
psnames.c
MacOS
FreeTypeLib
Name
sfnt.c
MacOS
FreeTypeLib
Name
smooth.c
MacOS
FreeTypeLib
Name
truetype.c
MacOS
FreeTypeLib
Name
type1cid.c
MacOS
FreeTypeLib
Name
winfnt.c
MacOS
FreeTypeLib
Name
type1.c
MacOS
FreeTypeLib
Name
pshinter.c
MacOS
FreeTypeLib
Name
pcf.c
MacOS
FreeTypeLib
Name
ftraster.c
MacOS
FreeTypeLib
Name
ftrend1.c
MacOS
===== freetype2-VER-2-10-4/docs/FTL.TXT =====
The FreeType Project LICENSE
----------------------------
2006-Jan-27
Copyright 1996-2002, 2006 by
David Turner, Robert Wilhelm, and Werner Lemberg
Introduction
============
The FreeType Project is distributed in several archive packages;
some of them may contain, in addition to the FreeType font engine,
various tools and contributions which rely on, or relate to, the
FreeType Project.
This license applies to all files found in such packages, and
which do not fall under their own explicit license. The license
affects thus the FreeType font engine, the test programs,
documentation and makefiles, at the very least.
This license was inspired by the BSD, Artistic, and IJG
(Independent JPEG Group) licenses, which all encourage inclusion
and use of free software in commercial and freeware products
alike. As a consequence, its main points are that:
o We don't promise that this software works. However, we will be
interested in any kind of bug reports. (`as is' distribution)
o You can use this software for whatever you want, in parts or
full form, without having to pay us. (`royalty-free' usage)
o You may not pretend that you wrote this software. If you use
it, or only parts of it, in a program, you must acknowledge
somewhere in your documentation that you have used the
FreeType code. (`credits')
We specifically permit and encourage the inclusion of this
software, with or without modifications, in commercial products.
We disclaim all warranties covering The FreeType Project and
assume no liability related to The FreeType Project.
Finally, many people asked us for a preferred form for a
credit/disclaimer to use in compliance with this license. We thus
encourage you to use the following text:
"""
Portions of this software are copyright © The FreeType
Project (www.freetype.org). All rights reserved.
"""
Please replace with the value from the FreeType version you
actually use.
Legal Terms
===========
0. Definitions
--------------
Throughout this license, the terms `package', `FreeType Project',
and `FreeType archive' refer to the set of files originally
distributed by the authors (David Turner, Robert Wilhelm, and
Werner Lemberg) as the `FreeType Project', be they named as alpha,
beta or final release.
`You' refers to the licensee, or person using the project, where
`using' is a generic term including compiling the project's source
code as well as linking it to form a `program' or `executable'.
This program is referred to as `a program using the FreeType
engine'.
This license applies to all files distributed in the original
FreeType Project, including all source code, binaries and
documentation, unless otherwise stated in the file in its
original, unmodified form as distributed in the original archive.
If you are unsure whether or not a particular file is covered by
this license, you must contact us to verify this.
The FreeType Project is copyright (C) 1996-2000 by David Turner,
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
specified below.
1. No Warranty
--------------
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
USE, OF THE FREETYPE PROJECT.
2. Redistribution
-----------------
This license grants a worldwide, royalty-free, perpetual and
irrevocable right and license to use, execute, perform, compile,
display, copy, create derivative works of, distribute and
sublicense the FreeType Project (in both source and object code
forms) and derivative works thereof for any purpose; and to
authorize others to exercise some or all of the rights granted
herein, subject to the following conditions:
o Redistribution of source code must retain this license file
(`FTL.TXT') unaltered; any additions, deletions or changes to
the original files must be clearly indicated in accompanying
documentation. The copyright notices of the unaltered,
original files must be preserved in all copies of source
files.
o Redistribution in binary form must provide a disclaimer that
states that the software is based in part of the work of the
FreeType Team, in the distribution documentation. We also
encourage you to put an URL to the FreeType web page in your
documentation, though this isn't mandatory.
These conditions apply to any software derived from or based on
the FreeType Project, not just the unmodified files. If you use
our work, you must acknowledge us. However, no fee need be paid
to us.
3. Advertising
--------------
Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.
We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
`FreeType library', or `FreeType Distribution'.
As you have not signed this license, you are not required to
accept it. However, as the FreeType Project is copyrighted
material, only this license, or another one contracted with the
authors, grants you the right to use, distribute, and modify it.
Therefore, by using, distributing, or modifying the FreeType
Project, you indicate that you understand and accept all the terms
of this license.
4. Contacts
-----------
There are two mailing lists related to FreeType:
o freetype@nongnu.org
Discusses general use and applications of FreeType, as well as
future and wanted additions to the library and distribution.
If you are looking for support, start in this list if you
haven't found anything to help you in the documentation.
o freetype-devel@nongnu.org
Discusses bugs, as well as engine internals, design issues,
specific licenses, porting, etc.
Our home page can be found at
https://www.freetype.org
--- end of FTL.TXT ---
===== freetype2-VER-2-10-4/docs/LICENSE.TXT =====
The FreeType 2 font engine is copyrighted work and cannot be used
legally without a software license. In order to make this project
usable to a vast majority of developers, we distribute it under two
mutually exclusive open-source licenses.
This means that *you* must choose *one* of the two licenses described
below, then obey all its terms and conditions when using FreeType 2 in
any of your projects or products.
- The FreeType License, found in the file `FTL.TXT', which is similar
to the original BSD license *with* an advertising clause that forces
you to explicitly cite the FreeType project in your product's
documentation. All details are in the license file. This license
is suited to products which don't use the GNU General Public
License.
Note that this license is compatible to the GNU General Public
License version 3, but not version 2.
- The GNU General Public License version 2, found in `GPLv2.TXT' (any
later version can be used also), for programs which already use the
GPL. Note that the FTL is incompatible with GPLv2 due to its
advertisement clause.
The contributed BDF and PCF drivers come with a license similar to that
of the X Window System. It is compatible to the above two licenses (see
file src/bdf/README and src/pcf/README). The same holds for the files
`fthash.c' and `fthash.h'; their code was part of the BDF driver in
earlier FreeType versions.
The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
compatible to the above two licenses.
The MD5 checksum support (only used for debugging in development builds)
is in the public domain.
--- end of LICENSE.TXT ---
===== freetype2-VER-2-10-4/include/freetype/ftlcdfil.h =====
/****************************************************************************
*
* ftlcdfil.h
*
* FreeType API for color filtering of subpixel bitmap glyphs
* (specification).
*
* Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
#ifndef FTLCDFIL_H_
#define FTLCDFIL_H_
#include
#include
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* lcd_rendering
*
* @title:
* Subpixel Rendering
*
* @abstract:
* API to control subpixel rendering.
*
* @description:
* FreeType provides two alternative subpixel rendering technologies.
* Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your
* `ftoption.h` file, this enables ClearType-style rendering.
* Otherwise, Harmony LCD rendering is enabled. These technologies are
* controlled differently and API described below, although always
* available, performs its function when appropriate method is enabled
* and does nothing otherwise.
*
* ClearType-style LCD rendering exploits the color-striped structure of
* LCD pixels, increasing the available resolution in the direction of
* the stripe (usually horizontal RGB) by a factor of~3. Using the
* subpixels coverages unfiltered can create severe color fringes
* especially when rendering thin features. Indeed, to produce
* black-on-white text, the nearby color subpixels must be dimmed
* equally.
*
* A good 5-tap FIR filter should be applied to subpixel coverages
* regardless of pixel boundaries and should have these properties:
*
* 1. It should be symmetrical, like {~a, b, c, b, a~}, to avoid
* any shifts in appearance.
*
* 2. It should be color-balanced, meaning a~+ b~=~c, to reduce color
* fringes by distributing the computed coverage for one subpixel to
* all subpixels equally.
*
* 3. It should be normalized, meaning 2a~+ 2b~+ c~=~1.0 to maintain
* overall brightness.
*
* Boxy 3-tap filter {0, 1/3, 1/3, 1/3, 0} is sharper but is less
* forgiving of non-ideal gamma curves of a screen (and viewing angles),
* beveled filters are fuzzier but more tolerant.
*
* Use the @FT_Library_SetLcdFilter or @FT_Library_SetLcdFilterWeights
* API to specify a low-pass filter, which is then applied to
* subpixel-rendered bitmaps generated through @FT_Render_Glyph.
*
* Harmony LCD rendering is suitable to panels with any regular subpixel
* structure, not just monitors with 3 color striped subpixels, as long
* as the color subpixels have fixed positions relative to the pixel
* center. In this case, each color channel is then rendered separately
* after shifting the outline opposite to the subpixel shift so that the
* coverage maps are aligned. This method is immune to color fringes
* because the shifts do not change integral coverage.
*
* The subpixel geometry must be specified by xy-coordinates for each
* subpixel. By convention they may come in the RGB order: {{-1/3, 0},
* {0, 0}, {1/3, 0}} for standard RGB striped panel or {{-1/6, 1/4},
* {-1/6, -1/4}, {1/3, 0}} for a certain PenTile panel.
*
* Use the @FT_Library_SetLcdGeometry API to specify subpixel positions.
* If one follows the RGB order convention, the same order applies to the
* resulting @FT_PIXEL_MODE_LCD and @FT_PIXEL_MODE_LCD_V bitmaps. Note,
* however, that the coordinate frame for the latter must be rotated
* clockwise. Harmony with default LCD geometry is equivalent to
* ClearType with light filter.
*
* As a result of ClearType filtering or Harmony rendering, the
* dimensions of LCD bitmaps can be either wider or taller than the
* dimensions of the corresponding outline with regard to the pixel grid.
* For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to
* the left, and 2~subpixels to the right. The bitmap offset values are
* adjusted accordingly, so clients shouldn't need to modify their layout
* and glyph positioning code when enabling the filter.
*
* The ClearType and Harmony rendering is applicable to glyph bitmaps
* rendered through @FT_Render_Glyph, @FT_Load_Glyph, @FT_Load_Char, and
* @FT_Glyph_To_Bitmap, when @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V
* is specified. This API does not control @FT_Outline_Render and
* @FT_Outline_Get_Bitmap.
*
* The described algorithms can completely remove color artefacts when
* combined with gamma-corrected alpha blending in linear space. Each of
* the 3~alpha values (subpixels) must by independently used to blend one
* color channel. That is, red alpha blends the red channel of the text
* color with the red channel of the background pixel.
*/
/**************************************************************************
*
* @enum:
* FT_LcdFilter
*
* @description:
* A list of values to identify various types of LCD filters.
*
* @values:
* FT_LCD_FILTER_NONE ::
* Do not perform filtering. When used with subpixel rendering, this
* results in sometimes severe color fringes.
*
* FT_LCD_FILTER_DEFAULT ::
* This is a beveled, normalized, and color-balanced five-tap filter
* with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.
*
* FT_LCD_FILTER_LIGHT ::
* this is a boxy, normalized, and color-balanced three-tap filter with
* weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.
*
* FT_LCD_FILTER_LEGACY ::
* FT_LCD_FILTER_LEGACY1 ::
* This filter corresponds to the original libXft color filter. It
* provides high contrast output but can exhibit really bad color
* fringes if glyphs are not extremely well hinted to the pixel grid.
* This filter is only provided for comparison purposes, and might be
* disabled or stay unsupported in the future. The second value is
* provided for compatibility with FontConfig, which historically used
* different enumeration, sometimes incorrectly forwarded to FreeType.
*
* @since:
* 2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2)
*/
typedef enum FT_LcdFilter_
{
FT_LCD_FILTER_NONE = 0,
FT_LCD_FILTER_DEFAULT = 1,
FT_LCD_FILTER_LIGHT = 2,
FT_LCD_FILTER_LEGACY1 = 3,
FT_LCD_FILTER_LEGACY = 16,
FT_LCD_FILTER_MAX /* do not remove */
} FT_LcdFilter;
/**************************************************************************
*
* @function:
* FT_Library_SetLcdFilter
*
* @description:
* This function is used to change filter applied to LCD decimated
* bitmaps, like the ones used when calling @FT_Render_Glyph with
* @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
*
* @input:
* library ::
* A handle to the target library instance.
*
* filter ::
* The filter type.
*
* You can use @FT_LCD_FILTER_NONE here to disable this feature, or
* @FT_LCD_FILTER_DEFAULT to use a default filter that should work well
* on most LCD screens.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* Since 2.10.3 the LCD filtering is enabled with @FT_LCD_FILTER_DEFAULT.
* It is no longer necessary to call this function explicitly except
* to choose a different filter or disable filtering altogether with
* @FT_LCD_FILTER_NONE.
*
* This function does nothing but returns `FT_Err_Unimplemented_Feature`
* if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is
* not defined in your build of the library.
*
* @since:
* 2.3.0
*/
FT_EXPORT( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter );
/**************************************************************************
*
* @function:
* FT_Library_SetLcdFilterWeights
*
* @description:
* This function can be used to enable LCD filter with custom weights,
* instead of using presets in @FT_Library_SetLcdFilter.
*
* @input:
* library ::
* A handle to the target library instance.
*
* weights ::
* A pointer to an array; the function copies the first five bytes and
* uses them to specify the filter weights in 1/256th units.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* This function does nothing but returns `FT_Err_Unimplemented_Feature`
* if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is
* not defined in your build of the library.
*
* LCD filter weights can also be set per face using @FT_Face_Properties
* with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
*
* @since:
* 2.4.0
*/
FT_EXPORT( FT_Error )
FT_Library_SetLcdFilterWeights( FT_Library library,
unsigned char *weights );
/**************************************************************************
*
* @type:
* FT_LcdFiveTapFilter
*
* @description:
* A typedef for passing the five LCD filter weights to
* @FT_Face_Properties within an @FT_Parameter structure.
*
* @since:
* 2.8
*
*/
#define FT_LCD_FILTER_FIVE_TAPS 5
typedef FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
/**************************************************************************
*
* @function:
* FT_Library_SetLcdGeometry
*
* @description:
* This function can be used to modify default positions of color
* subpixels, which controls Harmony LCD rendering.
*
* @input:
* library ::
* A handle to the target library instance.
*
* sub ::
* A pointer to an array of 3 vectors in 26.6 fractional pixel format;
* the function modifies the default values, see the note below.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* Subpixel geometry examples:
*
* - {{-21, 0}, {0, 0}, {21, 0}} is the default, corresponding to 3 color
* stripes shifted by a third of a pixel. This could be an RGB panel.
*
* - {{21, 0}, {0, 0}, {-21, 0}} looks the same as the default but can
* specify a BGR panel instead, while keeping the bitmap in the same
* RGB888 format.
*
* - {{0, 21}, {0, 0}, {0, -21}} is the vertical RGB, but the bitmap
* stays RGB888 as a result.
*
* - {{-11, 16}, {-11, -16}, {22, 0}} is a certain PenTile arrangement.
*
* This function does nothing and returns `FT_Err_Unimplemented_Feature`
* in the context of ClearType-style subpixel rendering when
* `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is defined in your build of the
* library.
*
* @since:
* 2.10.0
*/
FT_EXPORT( FT_Error )
FT_Library_SetLcdGeometry( FT_Library library,
FT_Vector sub[3] );
/* */
FT_END_HEADER
#endif /* FTLCDFIL_H_ */
/* END */
===== freetype2-VER-2-10-4/include/freetype/ftlist.h =====
/****************************************************************************
*
* ftlist.h
*
* Generic list support for FreeType (specification).
*
* Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
/**************************************************************************
*
* This file implements functions relative to list processing. Its data
* structures are defined in `freetype.h`.
*
*/
#ifndef FTLIST_H_
#define FTLIST_H_
#include
#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:
* list_processing
*
* @title:
* List Processing
*
* @abstract:
* Simple management of lists.
*
* @description:
* This section contains various definitions related to list processing
* using doubly-linked nodes.
*
* @order:
* FT_List
* FT_ListNode
* FT_ListRec
* FT_ListNodeRec
*
* FT_List_Add
* FT_List_Insert
* FT_List_Find
* FT_List_Remove
* FT_List_Up
* FT_List_Iterate
* FT_List_Iterator
* FT_List_Finalize
* FT_List_Destructor
*
*/
/**************************************************************************
*
* @function:
* FT_List_Find
*
* @description:
* Find the list node for a given listed object.
*
* @input:
* list ::
* A pointer to the parent list.
* data ::
* The address of the listed object.
*
* @return:
* List node. `NULL` if it wasn't found.
*/
FT_EXPORT( FT_ListNode )
FT_List_Find( FT_List list,
void* data );
/**************************************************************************
*
* @function:
* FT_List_Add
*
* @description:
* Append an element to the end of a list.
*
* @inout:
* list ::
* A pointer to the parent list.
* node ::
* The node to append.
*/
FT_EXPORT( void )
FT_List_Add( FT_List list,
FT_ListNode node );
/**************************************************************************
*
* @function:
* FT_List_Insert
*
* @description:
* Insert an element at the head of a list.
*
* @inout:
* list ::
* A pointer to parent list.
* node ::
* The node to insert.
*/
FT_EXPORT( void )
FT_List_Insert( FT_List list,
FT_ListNode node );
/**************************************************************************
*
* @function:
* FT_List_Remove
*
* @description:
* Remove a node from a list. This function doesn't check whether the
* node is in the list!
*
* @input:
* node ::
* The node to remove.
*
* @inout:
* list ::
* A pointer to the parent list.
*/
FT_EXPORT( void )
FT_List_Remove( FT_List list,
FT_ListNode node );
/**************************************************************************
*
* @function:
* FT_List_Up
*
* @description:
* Move a node to the head/top of a list. Used to maintain LRU lists.
*
* @inout:
* list ::
* A pointer to the parent list.
* node ::
* The node to move.
*/
FT_EXPORT( void )
FT_List_Up( FT_List list,
FT_ListNode node );
/**************************************************************************
*
* @functype:
* FT_List_Iterator
*
* @description:
* An FT_List iterator function that is called during a list parse by
* @FT_List_Iterate.
*
* @input:
* node ::
* The current iteration list node.
*
* user ::
* A typeless pointer passed to @FT_List_Iterate. Can be used to point
* to the iteration's state.
*/
typedef FT_Error
(*FT_List_Iterator)( FT_ListNode node,
void* user );
/**************************************************************************
*
* @function:
* FT_List_Iterate
*
* @description:
* Parse a list and calls a given iterator function on each element.
* Note that parsing is stopped as soon as one of the iterator calls
* returns a non-zero value.
*
* @input:
* list ::
* A handle to the list.
* iterator ::
* An iterator function, called on each node of the list.
* user ::
* A user-supplied field that is passed as the second argument to the
* iterator.
*
* @return:
* The result (a FreeType error code) of the last iterator call.
*/
FT_EXPORT( FT_Error )
FT_List_Iterate( FT_List list,
FT_List_Iterator iterator,
void* user );
/**************************************************************************
*
* @functype:
* FT_List_Destructor
*
* @description:
* An @FT_List iterator function that is called during a list
* finalization by @FT_List_Finalize to destroy all elements in a given
* list.
*
* @input:
* system ::
* The current system object.
*
* data ::
* The current object to destroy.
*
* user ::
* A typeless pointer passed to @FT_List_Iterate. It can be used to
* point to the iteration's state.
*/
typedef void
(*FT_List_Destructor)( FT_Memory memory,
void* data,
void* user );
/**************************************************************************
*
* @function:
* FT_List_Finalize
*
* @description:
* Destroy all elements in the list as well as the list itself.
*
* @input:
* list ::
* A handle to the list.
*
* destroy ::
* A list destructor that will be applied to each element of the list.
* Set this to `NULL` if not needed.
*
* memory ::
* The current memory object that handles deallocation.
*
* user ::
* A user-supplied field that is passed as the last argument to the
* destructor.
*
* @note:
* This function expects that all nodes added by @FT_List_Add or
* @FT_List_Insert have been dynamically allocated.
*/
FT_EXPORT( void )
FT_List_Finalize( FT_List list,
FT_List_Destructor destroy,
FT_Memory memory,
void* user );
/* */
FT_END_HEADER
#endif /* FTLIST_H_ */
/* END */
===== freetype2-VER-2-10-4/include/freetype/ftlzw.h =====
/****************************************************************************
*
* ftlzw.h
*
* LZW-compressed stream support.
*
* Copyright (C) 2004-2020 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 FTLZW_H_
#define FTLZW_H_
#include
#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:
* lzw
*
* @title:
* LZW Streams
*
* @abstract:
* Using LZW-compressed font files.
*
* @description:
* In certain builds of the library, LZW compression recognition is
* automatically handled when calling @FT_New_Face or @FT_Open_Face.
* This means that if no font driver is capable of handling the raw
* compressed file, the library will try to open a LZW stream from it and
* re-open the face with it.
*
* The stream implementation is very basic and resets the decompression
* process each time seeking backwards is needed within the stream,
* which significantly undermines the performance.
*
* This section contains the declaration of LZW-specific functions.
*
*/
/**************************************************************************
*
* @function:
* FT_Stream_OpenLZW
*
* @description:
* Open a new stream to parse LZW-compressed font files. This is mainly
* used to support the compressed `*.pcf.Z` fonts that come with XFree86.
*
* @input:
* stream ::
* The target embedding stream.
*
* source ::
* The source stream.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* The source stream must be opened _before_ calling this function.
*
* Calling the internal function `FT_Stream_Close` on the new stream will
* **not** call `FT_Stream_Close` on the source stream. None of the
* stream objects will be released to the heap.
*
* This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with LZW support.
*/
FT_EXPORT( FT_Error )
FT_Stream_OpenLZW( FT_Stream stream,
FT_Stream source );
/* */
FT_END_HEADER
#endif /* FTLZW_H_ */
/* END */
===== freetype2-VER-2-10-4/src/base/ftlcdfil.c =====
/****************************************************************************
*
* ftlcdfil.c
*
* FreeType API for color filtering of subpixel bitmap glyphs (body).
*
* Copyright (C) 2006-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
#include
#include
#include
#include
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/* define USE_LEGACY to implement the legacy filter */
#define USE_LEGACY
#define FT_SHIFTCLAMP( x ) ( x >>= 8, (FT_Byte)( x > 255 ? 255 : x ) )
/* add padding according to filter weights */
FT_BASE_DEF (void)
ft_lcd_padding( FT_BBox* cbox,
FT_GlyphSlot slot,
FT_Render_Mode mode )
{
FT_Byte* lcd_weights;
FT_Bitmap_LcdFilterFunc lcd_filter_func;
/* Per-face LCD filtering takes priority if set up. */
if ( slot->face && slot->face->internal->lcd_filter_func )
{
lcd_weights = slot->face->internal->lcd_weights;
lcd_filter_func = slot->face->internal->lcd_filter_func;
}
else
{
lcd_weights = slot->library->lcd_weights;
lcd_filter_func = slot->library->lcd_filter_func;
}
if ( lcd_filter_func == ft_lcd_filter_fir )
{
if ( mode == FT_RENDER_MODE_LCD )
{
cbox->xMin -= lcd_weights[0] ? 43 :
lcd_weights[1] ? 22 : 0;
cbox->xMax += lcd_weights[4] ? 43 :
lcd_weights[3] ? 22 : 0;
}
else if ( mode == FT_RENDER_MODE_LCD_V )
{
cbox->yMin -= lcd_weights[0] ? 43 :
lcd_weights[1] ? 22 : 0;
cbox->yMax += lcd_weights[4] ? 43 :
lcd_weights[3] ? 22 : 0;
}
}
}
/* FIR filter used by the default and light filters */
FT_BASE_DEF( void )
ft_lcd_filter_fir( FT_Bitmap* bitmap,
FT_LcdFiveTapFilter weights )
{
FT_UInt width = (FT_UInt)bitmap->width;
FT_UInt height = (FT_UInt)bitmap->rows;
FT_Int pitch = bitmap->pitch;
FT_Byte* origin = bitmap->buffer;
FT_Byte mode = bitmap->pixel_mode;
/* take care of bitmap flow */
if ( pitch > 0 && height > 0 )
origin += pitch * (FT_Int)( height - 1 );
/* horizontal in-place FIR filter */
if ( mode == FT_PIXEL_MODE_LCD && width >= 2 )
{
FT_Byte* line = origin;
/* `fir' must be at least 32 bit wide, since the sum of */
/* the values in `weights' can exceed 0xFF */
for ( ; height > 0; height--, line -= pitch )
{
FT_UInt fir[5];
FT_UInt val, xx;
val = line[0];
fir[2] = weights[2] * val;
fir[3] = weights[3] * val;
fir[4] = weights[4] * val;
val = line[1];
fir[1] = fir[2] + weights[1] * val;
fir[2] = fir[3] + weights[2] * val;
fir[3] = fir[4] + weights[3] * val;
fir[4] = weights[4] * val;
for ( xx = 2; xx < width; xx++ )
{
val = line[xx];
fir[0] = fir[1] + weights[0] * val;
fir[1] = fir[2] + weights[1] * val;
fir[2] = fir[3] + weights[2] * val;
fir[3] = fir[4] + weights[3] * val;
fir[4] = weights[4] * val;
line[xx - 2] = FT_SHIFTCLAMP( fir[0] );
}
line[xx - 2] = FT_SHIFTCLAMP( fir[1] );
line[xx - 1] = FT_SHIFTCLAMP( fir[2] );
}
}
/* vertical in-place FIR filter */
else if ( mode == FT_PIXEL_MODE_LCD_V && height >= 2 )
{
FT_Byte* column = origin;
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column;
FT_UInt fir[5];
FT_UInt val, yy;
val = col[0];
fir[2] = weights[2] * val;
fir[3] = weights[3] * val;
fir[4] = weights[4] * val;
col -= pitch;
val = col[0];
fir[1] = fir[2] + weights[1] * val;
fir[2] = fir[3] + weights[2] * val;
fir[3] = fir[4] + weights[3] * val;
fir[4] = weights[4] * val;
col -= pitch;
for ( yy = 2; yy < height; yy++, col -= pitch )
{
val = col[0];
fir[0] = fir[1] + weights[0] * val;
fir[1] = fir[2] + weights[1] * val;
fir[2] = fir[3] + weights[2] * val;
fir[3] = fir[4] + weights[3] * val;
fir[4] = weights[4] * val;
col[pitch * 2] = FT_SHIFTCLAMP( fir[0] );
}
col[pitch * 2] = FT_SHIFTCLAMP( fir[1] );
col[pitch] = FT_SHIFTCLAMP( fir[2] );
}
}
}
#ifdef USE_LEGACY
/* intra-pixel filter used by the legacy filter */
static void
_ft_lcd_filter_legacy( FT_Bitmap* bitmap,
FT_Byte* weights )
{
FT_UInt width = (FT_UInt)bitmap->width;
FT_UInt height = (FT_UInt)bitmap->rows;
FT_Int pitch = bitmap->pitch;
FT_Byte* origin = bitmap->buffer;
FT_Byte mode = bitmap->pixel_mode;
static const unsigned int filters[3][3] =
{
{ 65538 * 9/13, 65538 * 1/6, 65538 * 1/13 },
{ 65538 * 3/13, 65538 * 4/6, 65538 * 3/13 },
{ 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 }
};
FT_UNUSED( weights );
/* take care of bitmap flow */
if ( pitch > 0 && height > 0 )
origin += pitch * (FT_Int)( height - 1 );
/* horizontal in-place intra-pixel filter */
if ( mode == FT_PIXEL_MODE_LCD && width >= 3 )
{
FT_Byte* line = origin;
for ( ; height > 0; height--, line -= pitch )
{
FT_UInt xx;
for ( xx = 0; xx < width; xx += 3 )
{
FT_UInt r, g, b;
FT_UInt p;
p = line[xx];
r = filters[0][0] * p;
g = filters[0][1] * p;
b = filters[0][2] * p;
p = line[xx + 1];
r += filters[1][0] * p;
g += filters[1][1] * p;
b += filters[1][2] * p;
p = line[xx + 2];
r += filters[2][0] * p;
g += filters[2][1] * p;
b += filters[2][2] * p;
line[xx] = (FT_Byte)( r / 65536 );
line[xx + 1] = (FT_Byte)( g / 65536 );
line[xx + 2] = (FT_Byte)( b / 65536 );
}
}
}
else if ( mode == FT_PIXEL_MODE_LCD_V && height >= 3 )
{
FT_Byte* column = origin;
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column - 2 * pitch;
for ( ; height > 0; height -= 3, col -= 3 * pitch )
{
FT_UInt r, g, b;
FT_UInt p;
p = col[0];
r = filters[0][0] * p;
g = filters[0][1] * p;
b = filters[0][2] * p;
p = col[pitch];
r += filters[1][0] * p;
g += filters[1][1] * p;
b += filters[1][2] * p;
p = col[pitch * 2];
r += filters[2][0] * p;
g += filters[2][1] * p;
b += filters[2][2] * p;
col[0] = (FT_Byte)( r / 65536 );
col[pitch] = (FT_Byte)( g / 65536 );
col[pitch * 2] = (FT_Byte)( b / 65536 );
}
}
}
}
#endif /* USE_LEGACY */
/* documentation in ftlcdfil.h */
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilterWeights( FT_Library library,
unsigned char *weights )
{
if ( !library )
return FT_THROW( Invalid_Library_Handle );
if ( !weights )
return FT_THROW( Invalid_Argument );
ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS );
library->lcd_filter_func = ft_lcd_filter_fir;
return FT_Err_Ok;
}
/* documentation in ftlcdfil.h */
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
{
static const FT_LcdFiveTapFilter default_weights =
{ 0x08, 0x4d, 0x56, 0x4d, 0x08 };
static const FT_LcdFiveTapFilter light_weights =
{ 0x00, 0x55, 0x56, 0x55, 0x00 };
if ( !library )
return FT_THROW( Invalid_Library_Handle );
switch ( filter )
{
case FT_LCD_FILTER_NONE:
library->lcd_filter_func = NULL;
break;
case FT_LCD_FILTER_DEFAULT:
ft_memcpy( library->lcd_weights,
default_weights,
FT_LCD_FILTER_FIVE_TAPS );
library->lcd_filter_func = ft_lcd_filter_fir;
break;
case FT_LCD_FILTER_LIGHT:
ft_memcpy( library->lcd_weights,
light_weights,
FT_LCD_FILTER_FIVE_TAPS );
library->lcd_filter_func = ft_lcd_filter_fir;
break;
#ifdef USE_LEGACY
case FT_LCD_FILTER_LEGACY:
case FT_LCD_FILTER_LEGACY1:
library->lcd_filter_func = _ft_lcd_filter_legacy;
break;
#endif
default:
return FT_THROW( Invalid_Argument );
}
return FT_Err_Ok;
}
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdGeometry( FT_Library library,
FT_Vector* sub )
{
FT_UNUSED( library );
FT_UNUSED( sub );
return FT_THROW( Unimplemented_Feature );
}
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
/* add padding to accommodate outline shifts */
FT_BASE_DEF (void)
ft_lcd_padding( FT_BBox* cbox,
FT_GlyphSlot slot,
FT_Render_Mode mode )
{
FT_Vector* sub = slot->library->lcd_geometry;
if ( mode == FT_RENDER_MODE_LCD )
{
cbox->xMin -= FT_MAX( FT_MAX( sub[0].x, sub[1].x ), sub[2].x );
cbox->xMax -= FT_MIN( FT_MIN( sub[0].x, sub[1].x ), sub[2].x );
cbox->yMin -= FT_MAX( FT_MAX( sub[0].y, sub[1].y ), sub[2].y );
cbox->yMax -= FT_MIN( FT_MIN( sub[0].y, sub[1].y ), sub[2].y );
}
else if ( mode == FT_RENDER_MODE_LCD_V )
{
cbox->xMin -= FT_MAX( FT_MAX( sub[0].y, sub[1].y ), sub[2].y );
cbox->xMax -= FT_MIN( FT_MIN( sub[0].y, sub[1].y ), sub[2].y );
cbox->yMin += FT_MIN( FT_MIN( sub[0].x, sub[1].x ), sub[2].x );
cbox->yMax += FT_MAX( FT_MAX( sub[0].x, sub[1].x ), sub[2].x );
}
}
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilterWeights( FT_Library library,
unsigned char *weights )
{
FT_UNUSED( library );
FT_UNUSED( weights );
return FT_THROW( Unimplemented_Feature );
}
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
{
FT_UNUSED( library );
FT_UNUSED( filter );
return FT_THROW( Unimplemented_Feature );
}
/* documentation in ftlcdfil.h */
FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdGeometry( FT_Library library,
FT_Vector sub[3] )
{
if ( !library )
return FT_THROW( Invalid_Library_Handle );
if ( !sub )
return FT_THROW( Invalid_Argument );
ft_memcpy( library->lcd_geometry, sub, 3 * sizeof( FT_Vector ) );
return FT_THROW( Unimplemented_Feature );
}
#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
/* END */
===== freetype2-VER-2-10-4/src/lzw/ftlzw.c =====
/****************************************************************************
*
* ftlzw.c
*
* FreeType support for .Z compressed files.
*
* This optional component relies on NetBSD's zopen(). It should mainly
* be used to parse compressed PCF fonts, as found with many X11 server
* distributions.
*
* Copyright (C) 2004-2020 by
* Albert Chin-A-Young.
*
* based on code in `src/gzip/ftgzip.c'
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
#include
#include
#include
#include
#include FT_CONFIG_STANDARD_LIBRARY_H
#include
#undef FTERRORS_H_
#undef FT_ERR_PREFIX
#define FT_ERR_PREFIX LZW_Err_
#define FT_ERR_BASE FT_Mod_Err_LZW
#include
#ifdef FT_CONFIG_OPTION_USE_LZW
#include "ftzopen.h"
/***************************************************************************/
/***************************************************************************/
/***** *****/
/***** M E M O R Y M A N A G E M E N T *****/
/***** *****/
/***************************************************************************/
/***************************************************************************/
/***************************************************************************/
/***************************************************************************/
/***** *****/
/***** F I L E D E S C R I P T O R *****/
/***** *****/
/***************************************************************************/
/***************************************************************************/
#define FT_LZW_BUFFER_SIZE 4096
typedef struct FT_LZWFileRec_
{
FT_Stream source; /* parent/source stream */
FT_Stream stream; /* embedding stream */
FT_Memory memory; /* memory allocator */
FT_LzwStateRec lzw; /* lzw decompressor state */
FT_Byte buffer[FT_LZW_BUFFER_SIZE]; /* output buffer */
FT_ULong pos; /* position in output */
FT_Byte* cursor;
FT_Byte* limit;
} FT_LZWFileRec, *FT_LZWFile;
/* check and skip .Z header */
static FT_Error
ft_lzw_check_header( FT_Stream stream )
{
FT_Error error;
FT_Byte head[2];
if ( FT_STREAM_SEEK( 0 ) ||
FT_STREAM_READ( head, 2 ) )
goto Exit;
/* head[0] && head[1] are the magic numbers */
if ( head[0] != 0x1F ||
head[1] != 0x9D )
error = FT_THROW( Invalid_File_Format );
Exit:
return error;
}
static FT_Error
ft_lzw_file_init( FT_LZWFile zip,
FT_Stream stream,
FT_Stream source )
{
FT_LzwState lzw = &zip->lzw;
FT_Error error;
zip->stream = stream;
zip->source = source;
zip->memory = stream->memory;
zip->limit = zip->buffer + FT_LZW_BUFFER_SIZE;
zip->cursor = zip->limit;
zip->pos = 0;
/* check and skip .Z header */
error = ft_lzw_check_header( source );
if ( error )
goto Exit;
/* initialize internal lzw variable */
ft_lzwstate_init( lzw, source );
Exit:
return error;
}
static void
ft_lzw_file_done( FT_LZWFile zip )
{
/* clear the rest */
ft_lzwstate_done( &zip->lzw );
zip->memory = NULL;
zip->source = NULL;
zip->stream = NULL;
}
static FT_Error
ft_lzw_file_reset( FT_LZWFile zip )
{
FT_Stream stream = zip->source;
FT_Error error;
if ( !FT_STREAM_SEEK( 0 ) )
{
ft_lzwstate_reset( &zip->lzw );
zip->limit = zip->buffer + FT_LZW_BUFFER_SIZE;
zip->cursor = zip->limit;
zip->pos = 0;
}
return error;
}
static FT_Error
ft_lzw_file_fill_output( FT_LZWFile zip )
{
FT_LzwState lzw = &zip->lzw;
FT_ULong count;
FT_Error error = FT_Err_Ok;
zip->cursor = zip->buffer;
count = ft_lzwstate_io( lzw, zip->buffer, FT_LZW_BUFFER_SIZE );
zip->limit = zip->cursor + count;
if ( count == 0 )
error = FT_THROW( Invalid_Stream_Operation );
return error;
}
/* fill output buffer; `count' must be <= FT_LZW_BUFFER_SIZE */
static FT_Error
ft_lzw_file_skip_output( FT_LZWFile zip,
FT_ULong count )
{
FT_Error error = FT_Err_Ok;
/* first, we skip what we can from the output buffer */
{
FT_ULong delta = (FT_ULong)( zip->limit - zip->cursor );
if ( delta >= count )
delta = count;
zip->cursor += delta;
zip->pos += delta;
count -= delta;
}
/* next, we skip as many bytes remaining as possible */
while ( count > 0 )
{
FT_ULong delta = FT_LZW_BUFFER_SIZE;
FT_ULong numread;
if ( delta > count )
delta = count;
numread = ft_lzwstate_io( &zip->lzw, NULL, delta );
if ( numread < delta )
{
/* not enough bytes */
error = FT_THROW( Invalid_Stream_Operation );
break;
}
zip->pos += delta;
count -= delta;
}
return error;
}
static FT_ULong
ft_lzw_file_io( FT_LZWFile zip,
FT_ULong pos,
FT_Byte* buffer,
FT_ULong count )
{
FT_ULong result = 0;
FT_Error error;
/* seeking backwards. */
if ( pos < zip->pos )
{
/* If the new position is within the output buffer, simply */
/* decrement pointers, otherwise we reset the stream completely! */
if ( ( zip->pos - pos ) <= (FT_ULong)( zip->cursor - zip->buffer ) )
{
zip->cursor -= zip->pos - pos;
zip->pos = pos;
}
else
{
error = ft_lzw_file_reset( zip );
if ( error )
goto Exit;
}
}
/* skip unwanted bytes */
if ( pos > zip->pos )
{
error = ft_lzw_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );
if ( error )
goto Exit;
}
if ( count == 0 )
goto Exit;
/* now read the data */
for (;;)
{
FT_ULong delta;
delta = (FT_ULong)( zip->limit - zip->cursor );
if ( delta >= count )
delta = count;
FT_MEM_COPY( buffer + result, zip->cursor, delta );
result += delta;
zip->cursor += delta;
zip->pos += delta;
count -= delta;
if ( count == 0 )
break;
error = ft_lzw_file_fill_output( zip );
if ( error )
break;
}
Exit:
return result;
}
/***************************************************************************/
/***************************************************************************/
/***** *****/
/***** L Z W E M B E D D I N G S T R E A M *****/
/***** *****/
/***************************************************************************/
/***************************************************************************/
static void
ft_lzw_stream_close( FT_Stream stream )
{
FT_LZWFile zip = (FT_LZWFile)stream->descriptor.pointer;
FT_Memory memory = stream->memory;
if ( zip )
{
/* finalize lzw file descriptor */
ft_lzw_file_done( zip );
FT_FREE( zip );
stream->descriptor.pointer = NULL;
}
}
static unsigned long
ft_lzw_stream_io( FT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count )
{
FT_LZWFile zip = (FT_LZWFile)stream->descriptor.pointer;
return ft_lzw_file_io( zip, offset, buffer, count );
}
FT_EXPORT_DEF( FT_Error )
FT_Stream_OpenLZW( FT_Stream stream,
FT_Stream source )
{
FT_Error error;
FT_Memory memory;
FT_LZWFile zip = NULL;
if ( !stream || !source )
{
error = FT_THROW( Invalid_Stream_Handle );
goto Exit;
}
memory = source->memory;
/*
* Check the header right now; this prevents allocation of a huge
* LZWFile object (400 KByte of heap memory) if not necessary.
*
* Did I mention that you should never use .Z compressed font
* files?
*/
error = ft_lzw_check_header( source );
if ( error )
goto Exit;
FT_ZERO( stream );
stream->memory = memory;
if ( !FT_NEW( zip ) )
{
error = ft_lzw_file_init( zip, stream, source );
if ( error )
{
FT_FREE( zip );
goto Exit;
}
stream->descriptor.pointer = zip;
}
stream->size = 0x7FFFFFFFL; /* don't know the real size! */
stream->pos = 0;
stream->base = 0;
stream->read = ft_lzw_stream_io;
stream->close = ft_lzw_stream_close;
Exit:
return error;
}
#include "ftzopen.c"
#else /* !FT_CONFIG_OPTION_USE_LZW */
FT_EXPORT_DEF( FT_Error )
FT_Stream_OpenLZW( FT_Stream stream,
FT_Stream source )
{
FT_UNUSED( stream );
FT_UNUSED( source );
return FT_THROW( Unimplemented_Feature );
}
#endif /* !FT_CONFIG_OPTION_USE_LZW */
/* END */