FreeType 1.31.1
This commit is contained in:
7
.cvsignore
Normal file
7
.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
config.cache
|
||||
MakeSub
|
||||
Makefile
|
||||
config.status
|
||||
libtool
|
||||
ft_conf.h
|
||||
config.log
|
||||
6
CMakeLists.txt
Normal file
6
CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(freetype VERSION 1.3.1)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Generate compile_commands.json for ccls
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Group CMake targets inside a folder
|
||||
|
||||
|
||||
76
FILES
Normal file
76
FILES
Normal file
@@ -0,0 +1,76 @@
|
||||
This text file contains an overview of this package's directory and
|
||||
file hierarchy.
|
||||
|
||||
|
||||
docs/ Documentation.
|
||||
docs/image GIF images for documentation.
|
||||
|
||||
lib/ The C engine source directory.
|
||||
lib/extend Some standard engine extensions.
|
||||
lib/arch/<system> System-specific configuration header files.
|
||||
|
||||
howto/ Various system-specific HOWTOs, explaining how
|
||||
to compile the library on different platforms.
|
||||
|
||||
test/ The C test programs.
|
||||
test/arch/<system> System-specific graphics drivers for test
|
||||
programs.
|
||||
|
||||
contrib/ Contributions directory.
|
||||
contrib/mac An HQX archive containing a port to the Mac.
|
||||
contrib/ttf2pk The ttf2pk TrueType to PK converter source
|
||||
code.
|
||||
contrib/ttf2pfb The ttf2pfb TrueType to PS font converter
|
||||
source code.
|
||||
contrib/ttf2bdf The ttf2bdf TrueType to BDF converter source
|
||||
code.
|
||||
contrib/ftos2 The FreeType/2 font server source code for
|
||||
OS/2.
|
||||
contrib/ttfbanner An ASCII poster program source code.
|
||||
|
||||
po/ Contributions to the internationalized error
|
||||
message strings extension.
|
||||
|
||||
pascal/lib Pascal engine source directory.
|
||||
pascal/test Pascal test programs.
|
||||
|
||||
|
||||
The following files might be helpful:
|
||||
|
||||
FILES This file.
|
||||
|
||||
README A short and general introduction to FreeType.
|
||||
|
||||
INSTALL The FreeType installation How-To. Everything you need
|
||||
to know to build the library and the test programs.
|
||||
This file contains only generic explanations. See the
|
||||
`freetype/howto' directory for system-specific hints.
|
||||
|
||||
license.txt The FreeType license.
|
||||
|
||||
announce The FreeType UseNet announce post. This file is sent
|
||||
to some newsgroups when a new release is made.
|
||||
|
||||
|
||||
The following files are Unix-specific and can be ignored on other
|
||||
platforms:
|
||||
|
||||
ft_conf.h.in Generic library configuration header file for
|
||||
autoconf.
|
||||
configure.in Generic configure script for autoconf.
|
||||
configure Configure script generated from `configure.in' by
|
||||
autoconf.
|
||||
config.sub Script needed by configure.
|
||||
config.guess Script needed by configure.
|
||||
Makefile.in Generic makefile for configure.
|
||||
MakeSub.in Generic makefile for libtool.
|
||||
ltconfig Libtool configuration script.
|
||||
ltmain.sh Libtool script.
|
||||
mkinstalldirs Tool for generating subdirectories.
|
||||
a4local.m4,
|
||||
net.m4 Auxiliary data files for autoconf.
|
||||
install-sh Script used to install the library in a portable way
|
||||
freetype.spec This file can be used as a specification to build RPMs
|
||||
from the FreeType package.
|
||||
|
||||
--- end of FILES ---
|
||||
879
INSTALL
Normal file
879
INSTALL
Normal file
@@ -0,0 +1,879 @@
|
||||
|
||||
The FreeType compilation guide
|
||||
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
|
||||
I. Introduction
|
||||
|
||||
II. Compiling and installing the C library
|
||||
|
||||
1. Choosing a configuration file
|
||||
2. Compiling the library
|
||||
3. System-specific builds
|
||||
4. Compiling the extensions
|
||||
5. Using a Makefile
|
||||
6. Building a dynamic library (`DLL' or `so')
|
||||
7. Internationalization and the `ftxerr18' extension
|
||||
8. TrueType patents
|
||||
|
||||
|
||||
III. Compiling the test programs
|
||||
|
||||
1. Compiling the graphics sub-system
|
||||
2. Internationalization on Unix
|
||||
3. Compiling the test programs
|
||||
4. The `fdebug' program
|
||||
|
||||
|
||||
IV. Compiling the Pascal source
|
||||
|
||||
1. Compiling the library
|
||||
2. Compiling the test programs
|
||||
3. Porting the library to a different Pascal compiler
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
I. Introduction
|
||||
===============
|
||||
|
||||
This file gives detailed information on how to compile and install
|
||||
this release of FreeType on your system.
|
||||
|
||||
|
||||
********************************************************************
|
||||
* *
|
||||
* FOR A QUICK INSTALLATION GUIDE, WE STRONGLY RECOMMEND TO READ *
|
||||
* THE SYSTEM-SPECIFIC DOCUMENTS LOCATED IN THE `howto' DIRECTORY *
|
||||
* INSTEAD OF THIS GENERIC DOCUMENTATION. *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
||||
This package, known as the FreeType 1.3.1 Public Release, contains
|
||||
several things which are best described by the directories
|
||||
containing them:
|
||||
|
||||
- `lib'
|
||||
|
||||
Contains the 1.3.1 release of the FreeType library. It is written
|
||||
in portable ANSI C and should compile fine with any type of
|
||||
ANSI C compiler.
|
||||
|
||||
Note however that some system-specific files are provided in the
|
||||
`lib/arch' directory, in order to provide enhanced performance.
|
||||
|
||||
If you need to include FreeType in a graphics library or an
|
||||
embedded system, you will most probably only need to use its
|
||||
contents and discard the rest.
|
||||
|
||||
- `test'
|
||||
|
||||
Contains test and demo programs used during development. Note
|
||||
that some of these programs might not compile on all platforms,
|
||||
as they need to display graphics.
|
||||
|
||||
- `pascal'
|
||||
|
||||
Contains the Pascal version of FreeType's source code. Note
|
||||
that the library has been successfully compiled with Turbo
|
||||
Pascal 6, Borland Pascal 7, Virtual Pascal, Free Pascal,
|
||||
Delphi 1, 2 and 3.
|
||||
|
||||
The pascal source tree contains its own test programs which
|
||||
should *only* run with either Borland or Virtual Pascal
|
||||
compilers.
|
||||
|
||||
- `po'
|
||||
|
||||
On Unix, all of FreeType test programs support
|
||||
internationalization through the use of the `gettext' library.
|
||||
This directory contains `po' files, which are used to translate
|
||||
the original english text into language-specific one.
|
||||
|
||||
Note also that this release contains an extension, called
|
||||
`ftxerr18' used to return internationalized strings from the
|
||||
usual FreeType error codes. The `po' files also contain
|
||||
translations for this extension.
|
||||
|
||||
If you don't plan to use `ftxerr18' or internationalization,
|
||||
simply ignore it. Note also that even if `gettext' isn't
|
||||
available on your system, the test programs will be compiled
|
||||
correctly (using the `--disable-nls' configure switch).
|
||||
|
||||
- `contrib'
|
||||
|
||||
Contains a set of contributed tools and utilities related to
|
||||
TrueType or FreeType. Here you can find real situations how to
|
||||
use the library.
|
||||
|
||||
|
||||
This file explains how to compile the library, and the test
|
||||
programs on various platforms.
|
||||
|
||||
|
||||
|
||||
II. Compiling the C library
|
||||
===========================
|
||||
|
||||
|
||||
********************************************************************
|
||||
* *
|
||||
* NOTE THAT WE STRONGLY RECOMMEND TO READ THE SYSTEM-SPECIFIC *
|
||||
* DOCUMENTS LOCATED IN THE `howto' DIRECTORY FOR A *
|
||||
* `QUICK'N'EASY' COMPILATION & INSTALLATION GUIDE ON YOUR *
|
||||
* PLATFORM. THE FOLLOWING IS A VERY DETAILED EXPLANATION ON HOW *
|
||||
* TO COMPILE THE LIBRARY. *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
||||
The following concepts are important to build the library.
|
||||
|
||||
|
||||
1. Choosing a configuration file
|
||||
--------------------------------
|
||||
|
||||
The source code for the C library is located in the `lib'
|
||||
directory.
|
||||
|
||||
It uses a file named `ft_conf.h', which contains the definitions
|
||||
of many configuration macros to toggle various engine features,
|
||||
as well as tell system-specific information (e.g., the size of
|
||||
the `int' type in bytes, etc).
|
||||
|
||||
There are several configuration files provided with this
|
||||
release. They are located in the `lib/arch/<system>' directory,
|
||||
where <system> stands for a given architecture or environment.
|
||||
|
||||
For example, the file `lib/arch/ansi/ft_conf.h' can be used to
|
||||
build the library with any ANSI-compliant compiler and runtime
|
||||
library.
|
||||
|
||||
This release also provides configuration files for the following
|
||||
systems: MS-DOS, OS/2, Unix, VMS, Win 16, Amiga OS, and Win 32.
|
||||
|
||||
Make sure, when compiling each source file of the FreeType
|
||||
library, to include the path to your configuration file in your
|
||||
include directories.
|
||||
|
||||
|
||||
2. Compiling the library
|
||||
------------------------
|
||||
|
||||
The library can be quickly compiled by invoking a Makefile, as
|
||||
described in the system-specific documents in the `howto'
|
||||
directory.
|
||||
|
||||
We will now describe how to compile the library by hand.
|
||||
|
||||
Traditionally, building a library like FreeType needs the
|
||||
following steps:
|
||||
|
||||
- Compile each individual `.c' file into the corresponding
|
||||
object file, whose extension might be `.o' or `.obj',
|
||||
depending on the platform.
|
||||
|
||||
- Group all object files into a library (e.g. `libfreetype.a' or
|
||||
`freetype.lib'), which is later used at link time to build the
|
||||
executables using it.
|
||||
|
||||
For example, to build a static FreeType library on an ANSI
|
||||
system, with gcc, one should type
|
||||
|
||||
cd lib # go to `lib' directory
|
||||
gcc -c -Iarch/ansi tt*.c # compile base engine sources
|
||||
ar -r libfreetype.a tt*.o # create library from objects
|
||||
|
||||
Note that we included the path to the configuration file in the
|
||||
include list during compilation, by using the `-I' switch on the
|
||||
`arch/ansi' directory. This is required to use the
|
||||
configuration file named `lib/arch/ansi/ft_conf.h'.
|
||||
|
||||
However, we recommend you to build the base FreeType engine as a
|
||||
SINGLE OBJECT FILE, i.e., a single `freetype.o' or
|
||||
`freetype.obj' file containing all the code for the base engine.
|
||||
It works by including all the `.c' files in a single one, and
|
||||
has a few advantages over a `traditional build':
|
||||
|
||||
- Because all the code is `part' of a single source file, many
|
||||
internal functions need not be declared as `extern' anymore.
|
||||
|
||||
This means that when compiling the engine as a dynamic
|
||||
library, only FreeType external functions will (correctly) be
|
||||
exported as entry points.
|
||||
|
||||
This also typically allows the compiler to perform more
|
||||
aggressive optimizations on the source code, and results in
|
||||
somewhat faster and/or smaller overall code size depending on
|
||||
your compiler and environment.
|
||||
|
||||
- Compilation speed is greatly improved, as the pre-processor
|
||||
and compiler need to be called only once, instead of a dozen
|
||||
times.
|
||||
|
||||
- During development, this allows to detect very easily
|
||||
unresolved dependencies regarding the base engine's internal
|
||||
symbols.
|
||||
|
||||
To compile the engine as a single object file, simply go to the
|
||||
`lib' directory and compile the file
|
||||
`lib/arch/<system>/freetype.c'.
|
||||
|
||||
For example, to compile the ANSI build with gcc in SINGLE OBJECT
|
||||
MODE, use
|
||||
|
||||
cd lib
|
||||
gcc -c -Iarch/ansi -I. arch/ansi/freetype.c
|
||||
|
||||
This will create a single file called `freetype.o' containing
|
||||
the object code for the base TrueType engine.
|
||||
|
||||
Note that we did include the paths to the configuration file
|
||||
(i.e. `arch/ansi') AND to the current directory (i.e. `.',
|
||||
where the included source files are located).
|
||||
|
||||
`freetype.o' only contains the base engine. Extensions to the
|
||||
engine are located in the `lib/extend' directory and must be
|
||||
compiled separately as described later.
|
||||
|
||||
|
||||
3. System-specific builds
|
||||
-------------------------
|
||||
|
||||
The files `ttfile.c', `ttmemory.c', and `ttmutex.c' are used to
|
||||
provide an implementation of i/o access, memory management, and
|
||||
thread synchronization for the rest of the library.
|
||||
|
||||
These source files, located in the `lib' directory, use the ANSI
|
||||
C library for i/o and memory, and simply ignore threads (as the
|
||||
standard doesn't know threads at all).
|
||||
|
||||
However, this release provides, for each supported platform,
|
||||
system-specific versions of these files, located in the
|
||||
`lib/arch/<system>' hierarchy. Here are a few examples:
|
||||
|
||||
lib/arch/os2/os2file.c:
|
||||
|
||||
A replacement for `ttfile' which directly uses OS/2 system
|
||||
calls for i/o access. This results in slightly better
|
||||
performance, but much reduced resource requirements.
|
||||
|
||||
lib/arch/unix/ttmmap.c:
|
||||
|
||||
A replacement for `ttfile' which uses memory-mapped files
|
||||
instead of buffered-based reads on Unix. This increases
|
||||
*dramatically* the engine's performance when reading font
|
||||
files and loading glyphs.
|
||||
|
||||
These files are directly included by the platform specific
|
||||
versions of `freetype.c' which are located in
|
||||
`lib/arch/<system>'. This means that, by default, the
|
||||
single-object build of FreeType always chooses the best
|
||||
implementation available for a supported system.
|
||||
|
||||
Note that it is also possible to redefine `ttmemory' or
|
||||
`ttmutex' with a similar scheme. This is used, for example, by
|
||||
the OS/2 font driver based on FreeType (called FreeType/2),
|
||||
which uses some special system calls to allocate memory
|
||||
shareable among distinct processes.
|
||||
|
||||
By providing your own version of `ttfile', `ttmemory', and
|
||||
`ttmutex', you are able to tailor the FreeType engine for
|
||||
optimal performance and resource usage on your system.
|
||||
|
||||
|
||||
4. Compiling the extensions
|
||||
---------------------------
|
||||
|
||||
The base TrueType engine is located in the `lib' directory.
|
||||
This release also provides many specific extensions in
|
||||
`lib/extend'.
|
||||
|
||||
An extension is a simple way to extend FreeType's capabilities.
|
||||
It is used to perform any of the following:
|
||||
|
||||
- Access some TrueType tables that are not loaded and returned
|
||||
by the base engine, like
|
||||
|
||||
* the kerning table(s)
|
||||
* the `gasp' table
|
||||
* the glyph Postscript names
|
||||
* some OpenType layout tables (GDEF, GSUB; GPOS is not
|
||||
finished yet)
|
||||
|
||||
- Perform some advanced operations on the TrueType data for very
|
||||
specific uses, like
|
||||
|
||||
* enumerate the contents of a given charmap
|
||||
* access a font file's embedded bitmaps (called sbits)
|
||||
* return an array containing the dimensions of each glyph in
|
||||
the font
|
||||
|
||||
The idea is to keep the base engine small (under 50kByte), while
|
||||
providing optional enhancements for specific uses.
|
||||
|
||||
Writing an extension is rather easy. And adding a new extension
|
||||
to the engine doesn't need any modifications to the base
|
||||
engine's source code.
|
||||
|
||||
To compile the extensions, simply go to the `lib' directory,
|
||||
then compile each file in `lib/extend'. Here is an example with
|
||||
gcc:
|
||||
|
||||
cd lib ; go to `lib'
|
||||
gcc -c -Iarch/ansi -I. extend/ftx*.c ; compile all extensions
|
||||
|
||||
|
||||
You can later add each extension object file to the FreeType
|
||||
library file. For example, here is how to create the static
|
||||
library on Unix:
|
||||
|
||||
cd lib
|
||||
-- compile the engine, then the extensions
|
||||
ar libfreetype.a *.o ; create static library
|
||||
|
||||
|
||||
5. Using a Makefile
|
||||
-------------------
|
||||
|
||||
This release also provides Makefiles for many systems and
|
||||
compilers in the `lib/arch/<system>' hierarchy. For more
|
||||
information, please read the documentation in the `howto'
|
||||
directory, which contains system-specific instructions on how to
|
||||
use them.
|
||||
|
||||
Generally, you should go the `lib' directory, then invoke your
|
||||
system-specific Makefile from there. Here is an example:
|
||||
|
||||
cd lib
|
||||
make -farch\msdos\Makefile.TC
|
||||
|
||||
to compile the library under DOS with the Turbo C compiler and
|
||||
make tool. Or:
|
||||
|
||||
cd lib
|
||||
wmake -f arch\msdos\Makefile.wat
|
||||
|
||||
to compile it under DOS with the Watcom compiler and wmake tool.
|
||||
|
||||
The ANSI target does not come with a Makefile, as there is no
|
||||
standard make tool available on all platforms. You will have to
|
||||
compile the library by hand as described in section I.3.
|
||||
|
||||
We welcome new Makefile submissions for platforms not currently
|
||||
listed in the `lib/arch' hierarchy.
|
||||
|
||||
Finally, note that most of the makefiles will build the library
|
||||
in single object mode; for a `traditional compile', try the
|
||||
`debug' target (i.e., say `make debug').
|
||||
|
||||
|
||||
6. Building a dynamic library (`DLL' or `so')
|
||||
---------------------------------------------
|
||||
|
||||
It is possible to build the engine as a dynamic library. The
|
||||
method to do so can vary greatly depending on the platform.
|
||||
|
||||
a. Building a shared object on Unix
|
||||
|
||||
NOTE THAT THIS RELEASE USES `libtool' TO AUTOMATICALLY CREATE
|
||||
A SHARED OBJECT FOR FREETYPE ON UNIX SYSTEMS THAT SUPPORT
|
||||
DYNAMIC LIBRARIES. WE STRONGLY RECOMMEND YOU TO READ THE
|
||||
`howto/unix.txt' FILE TO KNOW HOW TO USE THE `configure'
|
||||
SCRIPT. THIS SUB-SECTION DESCRIBES HOW TO COMPILE THE SHARED
|
||||
OBJECT BY HAND.
|
||||
|
||||
In order to build a shared object like `libfreetype.so' on
|
||||
Unix, one has to compile each object file as
|
||||
position-independent code (a.k.a. PIC).
|
||||
|
||||
We also strongly recommend to build the base engine as a
|
||||
single object, as this prevents internal `extern' functions to
|
||||
be exported as entry points (and creating a smaller overall
|
||||
.so file).
|
||||
|
||||
For example, this with gcc, one can use the `-fPIC' flag when
|
||||
compiling the object files. Here is an example:
|
||||
|
||||
cd lib ; go to `lib'
|
||||
gcc -c -fPIC -Iarch/ansi -I. \
|
||||
arch/ansi/freetype.c ; compile engine
|
||||
gcc -c -fPIC -Iarch/ansi -I. extend/ftx*.c ; & extensions
|
||||
|
||||
You can now invoke your linker to create the shared object
|
||||
from the various object files. See your system's
|
||||
documentation for details, or read the Unix-specific howto to
|
||||
know how to do it `easily' through the use of `libtool'.
|
||||
|
||||
b. Building a DLL on Windows or OS/2
|
||||
|
||||
The dynamic linkers of Windows and OS/2 differ greatly from
|
||||
Unix ones.
|
||||
|
||||
- The first difference is that the object files that make up
|
||||
the DLL do not need to be compiled as position-independent
|
||||
code.
|
||||
|
||||
- The second difference is that the DLL's entry points must
|
||||
generally be declared as so in the source file, and/or maybe
|
||||
listed in a `definition' file used at link time when
|
||||
creating the DLL.
|
||||
|
||||
Each FreeType API function is declared with the help of a
|
||||
special macro named EXPORT_DEF. For example, here is the
|
||||
declaration of the function `FT_Init_FreeType', as written in
|
||||
`freetype.h':
|
||||
|
||||
EXPORT_DEF
|
||||
TT_Error TT_Init_FreeType( TT_Engine* engine );
|
||||
|
||||
If the configuration file `ft_conf.h' doesn't define
|
||||
EXPORT_DEF, it is automatically set to `extern' by default.
|
||||
|
||||
In order to build FreeType as a DLL, one might need to define
|
||||
EXPORT_DEF in its `ft_conf.h' to a keyword tagging the
|
||||
function as a DLL entry point. This keyword varies with
|
||||
compilers and platforms; examples are `__system',
|
||||
`__dllentry', etc.
|
||||
|
||||
Please refer to your compiler's user guide for instructions.
|
||||
|
||||
You can also `grep' for EXPORT_DEF in the `freetype.h' source
|
||||
file to obtain the list of exported functions of the FreeType
|
||||
API, which could then be used to write a `def' file for the
|
||||
DLL. We provide a sample .def file (built with an Unix script)
|
||||
for Windows.
|
||||
|
||||
Note also that the definition (i.e. its implementation) of
|
||||
each exported function is preceded with the EXPORT_FUNC macro,
|
||||
as in
|
||||
|
||||
EXPORT_FUNC
|
||||
TT_Error TT_Init_FreeType( TT_Engine* engine )
|
||||
{
|
||||
TT_Error error;
|
||||
...
|
||||
}
|
||||
|
||||
(to be found in `ttapi.c').
|
||||
|
||||
By default, EXPORT_FUNC converts to an empty string, but it
|
||||
can also be redefined if you need to.
|
||||
|
||||
Note that the EXPORT_DEF/EXPORT_FUNC mechanism does not work
|
||||
for 16-bit Windows (in this environment, the special keyword
|
||||
for declaring entry points, (the `__export' keyword), must be
|
||||
after the type name). We suggest you to use the makefiles we
|
||||
provide for both Microsoft and Borland compilers.
|
||||
|
||||
|
||||
7. Internationalization and the `ftxerr18' extension
|
||||
----------------------------------------------------
|
||||
|
||||
The engine extension named `ftxerr18' is used to convert a
|
||||
FreeType error code into a human-readable string of text.
|
||||
|
||||
However, it is able to support internationalization on Unix
|
||||
systems through the use of the `gettext' library. This means
|
||||
that the error messages will be localized to your system's
|
||||
language, provided it is available in this release. The
|
||||
currently available languages are
|
||||
|
||||
- English (by default)
|
||||
- Czech
|
||||
- German
|
||||
- Spanish
|
||||
- French
|
||||
- Dutch
|
||||
|
||||
One can add a new language by adding a `.po' file in the `po'
|
||||
directory. Please read the file `docs/i18n.txt' for more
|
||||
details on how to use `gettext'.
|
||||
|
||||
In order to enable localization of the `ftxerr18' extension, one
|
||||
has to set the macro HAVE_LIBINTL_H at compile time. By
|
||||
default, the extension will build with support for the English
|
||||
language.
|
||||
|
||||
Unix-specific: -------------------------------------------------
|
||||
|
||||
Note that the Unix `configure' script that comes with this
|
||||
release is able to automatically detect whether your system
|
||||
has `gettext' installed and set HAVE_LIBINTL_H in the
|
||||
`ft_conf_h' file accordingly.
|
||||
|
||||
To disable internationalization, run `configure' with the
|
||||
option `--disable-nls' (NLS stands for `National Language
|
||||
Support'). Then rebuild the library.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
Note that we do not support internationalization on non-Unix
|
||||
platforms, as the `gettext' library isn't available everywhere,
|
||||
or does not work in a consistent way in different environments.
|
||||
|
||||
|
||||
8. TrueType patents
|
||||
-------------------
|
||||
|
||||
We have recently discovered that Apple owns several patents that
|
||||
relate to the rendering of TrueType fonts. This could mean that
|
||||
the free use and distribution of the FreeType library could be
|
||||
illegal in the US, Japan, and possibly other countries.
|
||||
|
||||
For more information, please see the FreeType Patents page at:
|
||||
|
||||
http://www.freetype.org/patents.htm
|
||||
|
||||
This section will now explain how to build a `patent-free'
|
||||
engine, at the cost of rendering quality. This is done simply
|
||||
by de-activating the compilation of the TrueType bytecode
|
||||
interpreter (which is the only part of FreeType that might
|
||||
violate an Apple patent). This has two effects:
|
||||
|
||||
- saving about 18kByte of code in the engine
|
||||
- ignoring completely the grid-fitting of vector outlines, which
|
||||
results in extremely low quality at small pixel sizes.
|
||||
|
||||
Such an engine can be used by font converters and/or graphics
|
||||
libraries to display glyphs at high pixel sizes.
|
||||
|
||||
In order to do so, simply look for the following line in your
|
||||
configuration file `ft_conf.h':
|
||||
|
||||
#undef FT_CONFIG_OPTION_NO_INTERPRETER
|
||||
|
||||
Then change the `#undef' into a `#define':
|
||||
|
||||
#define FT_CONFIG_OPTION_NO_INTERPRETER
|
||||
|
||||
Now rebuild the engine with this new configuration file.
|
||||
|
||||
|
||||
|
||||
III. Compiling the test programs
|
||||
================================
|
||||
|
||||
This section explains how to compile the FreeType test programs
|
||||
located in the `test' directory. Note that you should have
|
||||
successfully compiled the library, as described in section I
|
||||
before proceeding.
|
||||
|
||||
WE STRONGLY RECOMMEND TO READ THE SYSTEM-SPECIFIC DOCUMENTS IN THE
|
||||
`howto' DIRECTORY FOR A `QUICK'N'EASY' GUIDE ON HOW TO COMPILE AND
|
||||
RUN THE TEST PROGRAMS.
|
||||
|
||||
|
||||
1. Compile the graphics sub-system and utility sources
|
||||
------------------------------------------------------
|
||||
|
||||
Some of the test programs need to display a graphics window to
|
||||
show their results. In order to do so, they use a tiny graphics
|
||||
system which was specifically written for FreeType (Note: The
|
||||
code isn't really clean there -- you have been warned).
|
||||
|
||||
Also, some simple C sources in the `test' directory are utility
|
||||
functions used by nearly all test programs, and they should also
|
||||
be compiled before them. These are the following files:
|
||||
|
||||
gmain.h: the sub-system interface
|
||||
gmain.c: the sub-system device-independent implementation
|
||||
gevents.h: the definition of the events used by the test
|
||||
program
|
||||
gdriver.h: the system-specific device interface
|
||||
blitter.c: a set of simple bitmap blitting functions
|
||||
common.c: common routines used by all test programs
|
||||
display.c: some routines dealing with text display
|
||||
|
||||
as well as a system-specific `graphics driver' located in the
|
||||
`test/arch/<system>' hierarchy. For example:
|
||||
|
||||
test/arch/msdos/gfs_dos.c: used to display graphics in a
|
||||
full-screen Dos session
|
||||
test/arch/os2/gpm_os2.c: used to display graphics in an OS/2
|
||||
Presentation Manager window
|
||||
test/arch/unix/gwin_x11.c: used to display graphics in an X11
|
||||
window.
|
||||
|
||||
You must compile the graphics sub-system and utilities before
|
||||
compiling the test programs. This can be done simply with gcc
|
||||
as:
|
||||
|
||||
cd test
|
||||
gcc -c -I../lib gmain.c blitter.c common.c display.c
|
||||
gcc -c -I../lib -I. arch/<system>/yourdriver.c -o ./gdriver.o
|
||||
|
||||
Note that a given test program may require some specific include
|
||||
paths (like `/usr/X11/include' with X11 for example).
|
||||
|
||||
The resulting object files can be grouped in a library if you
|
||||
want to.
|
||||
|
||||
|
||||
2. Internationalization on Unix
|
||||
-------------------------------
|
||||
|
||||
On Unix and Unix-like systems, the test programs are able to
|
||||
support internationalization through the use of the `gettext'
|
||||
library and the `ftxerr18' engine extension (see section I.7).
|
||||
|
||||
To enable it, one has to compile each test program with the
|
||||
macro HAVE_LIBINTL_H set. This is the same macro used to enable
|
||||
it in `ftxerr18'.
|
||||
|
||||
Note that the Unix `configure' script that comes with this
|
||||
release is able to automatically detect whether `gettext' is
|
||||
available on your system and set the macro accordingly when
|
||||
compiling the test programs.
|
||||
|
||||
You can disable internationalisation with the `--disable-nls'
|
||||
option when invoking the `configure' script.
|
||||
|
||||
|
||||
3. Compile the test programs
|
||||
----------------------------
|
||||
|
||||
All test programs begin with the `ft' prefix in the `test'
|
||||
directory, as in `ftzoom', `ftdump', `ftmetric'", etc. are test
|
||||
programs.
|
||||
|
||||
The easiest way to compile the test programs is compiling each
|
||||
source file to an object file, including the path to the
|
||||
FreeType engine source and its extensions. You need to use the
|
||||
following include paths:
|
||||
|
||||
- the path to the engine's public header file, i.e. `freetype.h'
|
||||
which normally is `lib'
|
||||
|
||||
- the path to the engine's extensions header files, located
|
||||
normally in `lib/extend'
|
||||
|
||||
- the path to the configuration file `ft_conf.h'. This is only
|
||||
required to support internationalisation, as the test programs
|
||||
read `ft_conf.h' only to see whether HAVE_LIBINTL_H is
|
||||
defined.
|
||||
|
||||
When compiling your own programs to FreeType, you shouldn't
|
||||
normally need this file and path.
|
||||
|
||||
Here is an example, compiling a test program with the ANSI
|
||||
build:
|
||||
|
||||
cd test
|
||||
gcc -c -I../lib -I../lib/extend -I../lib/arch/ansi \
|
||||
<program name>.c
|
||||
|
||||
Then, link this object file to the FreeType library, utilities
|
||||
and graphics sub-system to build an executable.
|
||||
|
||||
You can then invoke each program directly.
|
||||
|
||||
|
||||
4. The `fdebug' test program
|
||||
----------------------------
|
||||
|
||||
All test programs begin with the `ft' prefix (in the `test'
|
||||
directory) as in `ftzoom', `ftdump', `ftmetric', etc.
|
||||
|
||||
However, one test program named `fdebug' is used exclusively by
|
||||
FreeType developers. It is a very simple TrueType bytecode
|
||||
debugger, and was written to inspect the execution of the
|
||||
TrueType interpreter.
|
||||
|
||||
Note that we rather use the Pascal debugger for real work on the
|
||||
interpreter, as it provides a much easier windowed interface
|
||||
through the use of the Turbo Vision library. The C debugger is
|
||||
mainly used to check that both Pascal and C sources produce the
|
||||
same output.
|
||||
|
||||
You will need gcc to compile the debugger. It uses a special
|
||||
build of the FreeType engine to work. Follow these steps to
|
||||
compile it:
|
||||
|
||||
1. Compile the library for the `debugger' system, i.e.
|
||||
|
||||
cd freetype/lib
|
||||
make -f arch/debugger/Makefile
|
||||
|
||||
this will create a file named `libttf.a' in the directory
|
||||
`freetype/lib/arch/debugger' which will NOT interfere with
|
||||
your normal build (which is located in `freetype/lib').
|
||||
|
||||
2. Compile the debugger:
|
||||
|
||||
cd freetype/test
|
||||
make -f arch/debugger/Makefile
|
||||
|
||||
This will create an executable called `fdebug.exe' or
|
||||
`fdebug', which is linked with the version of the library
|
||||
found in `freetype/lib/arch/debugger' as described above.
|
||||
|
||||
[For old Unix variants like 4.2BSD please uncomment the flag
|
||||
HAVE_POSIX_TERMIOS in the makefile.]
|
||||
|
||||
You can invoke the debugger in two ways:
|
||||
|
||||
a. To debug a given glyph program in a given font, type
|
||||
|
||||
fdebug glyph_number pointsize fontfile[.ttf]
|
||||
|
||||
b. To debug a given font's CVT program, type
|
||||
|
||||
fdebug --cvt pointsize fontfile[.ttf]
|
||||
|
||||
Type `?' while running fdebug for a list of key bindings.
|
||||
|
||||
|
||||
IV. Compiling the Pascal source
|
||||
===============================
|
||||
|
||||
This section deals with the compilation of the Pascal version of
|
||||
the FreeType engine, whose source code is located in the `pascal'
|
||||
directory.
|
||||
|
||||
Note that the Pascal version is more limited than the C one, as it
|
||||
lacks the following `features':
|
||||
|
||||
- Extensions are neither supported nor provided in Pascal.
|
||||
|
||||
- The interpreter is more pedantic than the C one and will
|
||||
probably not work with many broken glyphs.
|
||||
|
||||
- It doesn't compile on old Turbo Pascal (TP 6.0 is a minimum), as
|
||||
it uses inline assembly code.
|
||||
|
||||
Other than that, the Pascal version supports charmaps and the name
|
||||
table correctly since the 1.3 release.
|
||||
|
||||
********************************************************************
|
||||
* *
|
||||
* AN IMPORTANT NOTE REGARDING TURBO AND BORLAND PASCAL USERS *
|
||||
* ========================================================== *
|
||||
* *
|
||||
* Programs compiled with TP6 and BP7 might not be able to run on *
|
||||
* fast machines! *
|
||||
* *
|
||||
* Usually, the program aborts immediately with a message like *
|
||||
* *
|
||||
* Runtime error 200: Divide by zero at xxxx:xxxx *
|
||||
* *
|
||||
* The bug is located in the runtime's initialization routine *
|
||||
* used to compute the machine's speed. It does so by dividing a *
|
||||
* value taken through the BIOS timer by a small constant. *
|
||||
* *
|
||||
* On fast machines, the result exceeds 16 bits, which causes a *
|
||||
* CPU exception/interrupt. The latter is caught by the *
|
||||
* runtime's exception handlers which aborts the execution and *
|
||||
* prints the above message. *
|
||||
* *
|
||||
* We don't know anything that can be done to fix this bug, as it *
|
||||
* would need a recompilation of a version of the Borland runtime *
|
||||
* initialization code. *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
Due to lack of time, the library could not be fully tested under
|
||||
TP6 or BP7.
|
||||
|
||||
|
||||
1. Compiling the library
|
||||
------------------------
|
||||
|
||||
The library itself is located in `pascal/lib'. You can compile
|
||||
it very simply by invoking your Pascal compiler on the file
|
||||
`freetype.pas'.
|
||||
|
||||
As always with Pascal, dependencies are resolved automatically.
|
||||
|
||||
|
||||
2. Compiling the test programs
|
||||
------------------------------
|
||||
|
||||
The test programs are located in `pascal/test'. You will mainly
|
||||
find there the following:
|
||||
|
||||
lint - A TrueType glyph loading checker. This test program
|
||||
will simply load each glyph in a font file and check
|
||||
for errors in its hinting programs. It is useful to
|
||||
find broken glyphs in fonts.
|
||||
|
||||
view - A simple TrueType glyph viewer. Shows all the glyphs
|
||||
within a given font file on a graphics screen. Only
|
||||
works under DOS (with Borland Pascal) and OS/2 (with
|
||||
Virtual Pascal).
|
||||
|
||||
timer - A simple benchmark program for the scan-line
|
||||
converter. Similar to the C `fttimer' test program.
|
||||
|
||||
debugger - A TrueType bytecode debugger. This one must be
|
||||
compiled with the Turbo Vision library. It uses a
|
||||
rather advanced windowed interface to display the
|
||||
glyph program and their execution. It can also
|
||||
display the current glyph in a graphics window. A
|
||||
bit rough but extremely useful to the development
|
||||
of FreeType.
|
||||
|
||||
dump - A TrueType metrics checker. This test program simply
|
||||
checks that the hinted width of each glyph corresponds
|
||||
to the one found in the TrueType `hdmx' table when
|
||||
present. This program is now obsolete and should be
|
||||
ignored.
|
||||
|
||||
As always, simply invoke the root source file to make an
|
||||
executable automatically -- don't forget to include the path to
|
||||
the FreeType unit as described in section III.1.
|
||||
|
||||
|
||||
3. Porting the library to a different Pascal compiler
|
||||
-----------------------------------------------------
|
||||
|
||||
The Pascal sources use inline assembly to implement the 64-bit
|
||||
computation routines needed by the TrueType engine. This
|
||||
release comes with various versions of the `ttcalc' inline
|
||||
assembly.
|
||||
|
||||
These files are (within `pascal/lib'):
|
||||
|
||||
ttcalc1.inc: for Turbo and Borland Pascal & Delphi 1 (16-bit)
|
||||
ttcalc2.inc: for Virtual Pascal (32-bit)
|
||||
ttcalc3.inc: for Delphi 2 & 3 (untested on Delphi 4 & 5)
|
||||
ttcalc4.inc: for Free Pascal on a i386 (32-bit)
|
||||
|
||||
Note that in order to port the Pascal source to a new compiler,
|
||||
one has to:
|
||||
|
||||
a. Write a specific version of `ttcalc?.inc' for the compiler's
|
||||
inline assembly.
|
||||
|
||||
Be sure to respect the compiler's assembler syntax, as well
|
||||
as its parameter-passing function interface, i.e., which
|
||||
registers and/or stack slots are used to pass arguments at
|
||||
function call.
|
||||
|
||||
b. Add some lines to detect your compiler in `ttconfig.inc'.
|
||||
|
||||
This file contains some tests to define macros used to
|
||||
determine which compiler is used. These macros are used
|
||||
later in `ttcalc.pas' in order to select the correct inline
|
||||
assembly file to use.
|
||||
|
||||
See the source files for more details.
|
||||
|
||||
c. Add an include to the new `ttcalc?.inc' in `ttcalc.pas'.
|
||||
|
||||
Make this according to the compiler detected in
|
||||
`ttconfig.inc'.
|
||||
|
||||
See the source files for more details.
|
||||
|
||||
d. Submit your changes to the FreeType Developers list.
|
||||
|
||||
In order to see them added to the next release of the Pascal
|
||||
engine.
|
||||
|
||||
|
||||
--- end of INSTALL ---
|
||||
7
MakeSub.in
Normal file
7
MakeSub.in
Normal file
@@ -0,0 +1,7 @@
|
||||
# this file is part of the FreeType project
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @libdir@
|
||||
bindir = @bindir@
|
||||
includedir = @includedir@
|
||||
60
Makefile.in
Normal file
60
Makefile.in
Normal file
@@ -0,0 +1,60 @@
|
||||
# This file is part of the FreeType project.
|
||||
|
||||
RMF = @RM@ -f
|
||||
|
||||
MAKEFILE = arch/unix/Makefile
|
||||
|
||||
FTLIBDIR = lib
|
||||
FTTESTDIR = test
|
||||
FTPODIR = po
|
||||
|
||||
all: ttlib tttest ttpo
|
||||
|
||||
debug: ttlibdebug tttest ttpo
|
||||
|
||||
# we can't use the target names 'lib', 'test', etc.
|
||||
# because make will believe that the directories are
|
||||
# the targets and are up-to-date! Grrr... >:-(
|
||||
|
||||
ttlib:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) all
|
||||
|
||||
ttlibdebug:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) debug
|
||||
|
||||
tttest:
|
||||
cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) all
|
||||
|
||||
ttpo:
|
||||
cd $(FTPODIR); $(MAKE) all
|
||||
|
||||
install:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) install
|
||||
cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) install
|
||||
cd $(FTPODIR); $(MAKE) install
|
||||
|
||||
uninstall:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) uninstall
|
||||
cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) uninstall
|
||||
cd $(FTPODIR); $(MAKE) uninstall
|
||||
|
||||
clean:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) clean
|
||||
cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) clean
|
||||
cd $(FTPODIR); $(MAKE) clean
|
||||
|
||||
distclean:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) distclean
|
||||
cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) distclean
|
||||
cd $(FTPODIR); $(MAKE) distclean
|
||||
$(RMF) config.cache config.log config.status Makefile \
|
||||
MakeSub ft_conf.h libtool
|
||||
|
||||
check:
|
||||
@echo This package does not yet have a validation suite
|
||||
|
||||
depend:
|
||||
cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) depend
|
||||
cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) depend
|
||||
|
||||
# end of Makefile.in
|
||||
27
PATENTS
Normal file
27
PATENTS
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
FreeType Patents Disclaimer
|
||||
August 1999
|
||||
|
||||
|
||||
|
||||
WE HAVE DISCOVERED THAT APPLE OWNS SEVERAL PATENTS RELATED TO THE
|
||||
RENDERING OF TRUETYPE FONTS. THIS COULD MEAN THAT THE FREE USE OF
|
||||
FREETYPE MIGHT BE ILLEGAL IN THE USA, JAPAN, AND POSSIBLY OTHER
|
||||
COUNTRIES, BE IT IN COMMERCIAL OR OPEN SOURCE PRODUCTS.
|
||||
|
||||
FOR MORE DETAILS, WE STRONGLY ADVISE YOU TO GO TO THE FREETYPE
|
||||
PATENTS PAGE AT THE FOLLOWING WEB ADDRESS:
|
||||
|
||||
http://www.freetype.org/patents.htm
|
||||
|
||||
WE WILL NOT PLACE INFORMATION IN THIS FILE AS THE SITUATION IS STILL
|
||||
UNDETERMINED FOR NOW. AT THE TIME THESE LINES ARE WRITTEN, WE HAVE
|
||||
CONTACTED APPLE'S LEGAL DEPARTMENT AND ARE STILL WAITING FOR THEIR
|
||||
ANSWER ON THE SUBJECT.
|
||||
|
||||
PLEASE READ THE `INSTALL' FILE TO SEE HOW TO DISABLE THE ENGINE'S
|
||||
BYTECODE INTERPRETER IN ORDER TO BUILD A PATENT-FREE ENGINE, AT THE
|
||||
COST OF RENDERING QUALITY.
|
||||
|
||||
|
||||
--- end of PATENTS ---
|
||||
695
README
Normal file
695
README
Normal file
@@ -0,0 +1,695 @@
|
||||
|
||||
|
||||
Welcome to the
|
||||
|
||||
F R E E T Y P E P R O J E C T
|
||||
|
||||
http://www.freetype.org
|
||||
|
||||
Release 1.3.1
|
||||
|
||||
The FREE TrueType Font Engine
|
||||
|
||||
Copyright 1996 David Turner <david.turner@freetype.org>
|
||||
- 1999 Robert Wilhelm <robert.wilhelm@freetype.org>
|
||||
Werner Lemberg <werner.lemberg@freetype.org>
|
||||
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
|
||||
I. Introduction
|
||||
|
||||
II. The FreeType mini-FAQ
|
||||
|
||||
III. How to use the test programs
|
||||
|
||||
1. ftzoom
|
||||
2. ftlint
|
||||
3. ftview
|
||||
4. fttimer
|
||||
5. ftdump
|
||||
6. ftstring
|
||||
7. ftstrpnm
|
||||
8. fterror
|
||||
9. ftsbit
|
||||
10. ftmetric
|
||||
11. ftstrtto
|
||||
|
||||
IV. How to use the programs in the `contrib' directory
|
||||
|
||||
V. Final remarks
|
||||
|
||||
|
||||
I. Introduction
|
||||
===============
|
||||
|
||||
Please read the file `INSTALL' for installation instructions!
|
||||
|
||||
The FreeType engine is a free and portable TrueType font rendering
|
||||
engine. It has been developed to provide TrueType support to a
|
||||
great variety of platforms and environments.
|
||||
|
||||
Notice that FreeType is a *library*. It is *not* a font server
|
||||
for your preferred environment, even though it has been written to
|
||||
allow the design of many font servers.
|
||||
|
||||
To our knowledge, this is the only royalty-free complete TrueType
|
||||
engine available. Moreover, its quality fully matches these of
|
||||
Windows or the Macintosh, a thing that cannot be said for most
|
||||
other commercial engines available.
|
||||
|
||||
FreeType is a clean-room implementation that is not derived from
|
||||
the original TrueType engine developed by Apple and Microsoft. It
|
||||
has been created with the sole help of the published TrueType
|
||||
specifications, which, to our great surprise and pain, turned out
|
||||
to be extremely poor or misleading in critical areas. Much hard
|
||||
work has been undertaken to solve numerous ambiguities;
|
||||
nevertheless, its end result is a portable, fast quality renderer!
|
||||
|
||||
The library itself takes about 55kByte of Intel code, complete
|
||||
with a TrueType byte-code interpreter and a high-performance
|
||||
scan-line converter.
|
||||
|
||||
You will find in this release:
|
||||
|
||||
- A TrueType engine, with source code in ANSI C and Pascal.
|
||||
|
||||
The C source code has been successfully compiled and run on
|
||||
various platforms, including MS-DOS, OS/2, Amiga, Linux, and
|
||||
several other variants of Unix. It should be portable to many
|
||||
other platforms too.
|
||||
|
||||
The Pascal code has been successfully compiled and run on DOS
|
||||
(Borland's BP7) and OS/2 (fPrint's Virtual Pascal). A Delphi
|
||||
port is in beta (the code in freetype/pascal compiles).
|
||||
Unfortunately, it is not up to date compared to the C version.
|
||||
|
||||
- An API to be used by client applications and font servers,
|
||||
providing several low level abstractions that can be used to
|
||||
open font files and collections, create point sizes and load,
|
||||
process and render glyph outlines and bitmaps.
|
||||
|
||||
- Support for the following features:
|
||||
|
||||
o Font smoothing, a.k.a. gray-level rendering.
|
||||
|
||||
Just like Windows 95, the renderer uses a `fine' algorithm
|
||||
that only smoothes diagonals and curves, while keeping the
|
||||
horizontal and vertical stems intact.
|
||||
|
||||
This results in glyphs that are much more legible than the
|
||||
`fuzzy' ones generated by programs like Acrobat.
|
||||
|
||||
o Support for all character mapping formats.
|
||||
|
||||
o A full-featured TrueType byte-code interpreter.
|
||||
|
||||
The engine is able to hint the glyphs to produce excellent
|
||||
output at small sizes. It was extremely difficult to get this
|
||||
component right, due to the ambiguous and misleading TrueType
|
||||
specifications. However, we now *match* Windows and Macintosh
|
||||
qualities.
|
||||
|
||||
o TrueType collection support, when several fonts are embedded
|
||||
in the same file.
|
||||
|
||||
o Support for extensions.
|
||||
|
||||
It is now possible to extend the library in parts to support
|
||||
additional features, like optional tables that are not
|
||||
considered by the current core engine.
|
||||
|
||||
o Kerning support.
|
||||
|
||||
Provided as a sample extension with this release, kerning
|
||||
tables can be accessed from a TrueType font for applications
|
||||
that need it.
|
||||
|
||||
o Support for vertical metrics.
|
||||
|
||||
It is possible to load vertical metrics when they are present
|
||||
in a font file. Metrics can be retrieved glyph by glyph,
|
||||
using the loader, or in arrays with a new API.
|
||||
|
||||
o Support for thread-safety and re-entrancy.
|
||||
|
||||
You will only need to specialize the file `ttmutex.c' for your
|
||||
platform to include system-specific synchronization calls.
|
||||
|
||||
o New in 1.3: Support for embedded bitmaps.
|
||||
|
||||
This feature is already used in xtt, a TrueType font server
|
||||
for X Window System.
|
||||
|
||||
Note also that:
|
||||
|
||||
- Though development of the library is mainly performed on OS/2
|
||||
and Linux, the library does not contain system-specific code.
|
||||
|
||||
- The package contains some graphics drivers used by the test
|
||||
programs for display purposes on MS-DOS, OS/2, Amiga, and X11.
|
||||
These drivers are absolutely not mandatory for running the
|
||||
FreeType engine. Some console-mode test programs like `ftlint'
|
||||
or `ftdump' don't use graphics at all.
|
||||
|
||||
- FreeType 1.3 is binary compatible with 1.2, which means that you
|
||||
won't need to recompile your programs if they used the engine as
|
||||
a shared library (libttf.so on Linux, or FreeType.dll on
|
||||
Windows). See the file `freetype/docs/changes.txt' for more
|
||||
information about (minimal) API changes.
|
||||
|
||||
|
||||
II. The FreeType mini-FAQ
|
||||
=========================
|
||||
|
||||
Summary
|
||||
|
||||
0. Where to find the latest FreeType release?
|
||||
|
||||
1. Did the API change?
|
||||
|
||||
2. What does the `Free' in FreeType means? Can you use it in a
|
||||
commercial product? (YES!)
|
||||
|
||||
3. I have made a small program based on the test programs but I
|
||||
would like to know how to do xxx?
|
||||
|
||||
4. When will I be able to use FreeType to display TrueType fonts
|
||||
under X11, OS/2 or Wine? (NOW!)
|
||||
|
||||
5. Trying to compile the FreeType sources gives me lots of
|
||||
warnings with my ANSI C compliant compiler!
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
0. Where to find the latest FreeType release?
|
||||
|
||||
The latest package is usually uploaded to various source
|
||||
repositories, like SunSite, SimTel, or Hobbes. There are two
|
||||
archive formats (zip and tar.gz), which also differ by their
|
||||
CR/LF conventions.
|
||||
|
||||
* for DOS and OS/2: `ft-13.zip'
|
||||
|
||||
which should be available at:
|
||||
|
||||
Hobbes: ftp://ftp.cdrom.com/pub/os2/fonts
|
||||
SimTel: ftp://oak.oakland.edu/pub/simtel.net/msdos/graphics
|
||||
|
||||
* for UNIX and Amiga: `freetype-1.3.tar.gz'
|
||||
|
||||
look at:
|
||||
|
||||
SunSite: ftp://sunsite.unc.edu/pub/Linux/X11/fonts
|
||||
|
||||
* As uploading can take several days before the package becomes
|
||||
available to the public, we advise you to download it from
|
||||
our own ftp site if you read this message few days after the
|
||||
announcement at:
|
||||
|
||||
ftp://ftp.freetype.org/pub/freetype
|
||||
|
||||
Our home page is at:
|
||||
|
||||
http://www.freetype.org
|
||||
|
||||
Screen shots are available!
|
||||
|
||||
There are also three mailing lists:
|
||||
|
||||
o freetype-announce@freetype.org
|
||||
|
||||
Announcements only about new versions of FreeType and
|
||||
related packages. This list is moderated and expected to
|
||||
have very low traffic.
|
||||
|
||||
o freetype@freetype.org
|
||||
|
||||
Discusses general use of FreeType, future, and needed
|
||||
additions, as well as many other font-related discussions
|
||||
which do not always relate directly to the FreeType code
|
||||
itself...
|
||||
|
||||
o devel@freetype.org
|
||||
|
||||
Discusses development, design choices, portability issues,
|
||||
internals, specific licenses, etc.
|
||||
|
||||
To subscribe, send the usual subscription commands to:
|
||||
|
||||
majordomo@freetype.org
|
||||
|
||||
To report bugs please use send an email to the address
|
||||
bugs@freetype.org -- if you want help fixing bugs, contact
|
||||
robert.wilhelm@freetype.org to be manually subscribed to this
|
||||
closed list.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
1. Did the API change since the version 1.2?
|
||||
|
||||
Only very marginally. Please refer to `changes.txt'.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
2. What does the `Free' in FreeType means? Can you use it in a
|
||||
commercial product? (YES!)
|
||||
|
||||
We have placed this release under our special FreeType license.
|
||||
|
||||
It was inspired by the BSD, Artistic, and IJG (Independent JPEG
|
||||
group) licences, which specifically encourage the use of this
|
||||
software in commercial products!
|
||||
|
||||
The reason we did this is that we believe that TrueType is a
|
||||
very useful technology, and want to make it available on all
|
||||
machines and platforms. The license is there to ensure that
|
||||
the engine can be spread as widely as possible.
|
||||
|
||||
However, free does not mean public domain. This engine is
|
||||
copyrighted by its authors, and they will fiercely defend their
|
||||
rights.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
3. I have made a small program based on the test programs but I
|
||||
would like to know how to do xxx?
|
||||
|
||||
(Where xxx is a feature lacking from the current
|
||||
implementation).
|
||||
|
||||
First of all, read the documentation. The user guide gives
|
||||
some basic hints and concepts. You can also read the source
|
||||
code of the test programs that you didn't consider yet. If
|
||||
you're really stuck, mail your question to:
|
||||
|
||||
freetype@freetype.org
|
||||
|
||||
We'll try to help you.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
4. When will I be able to use FreeType to display TrueType fonts
|
||||
under X11, OS/2, or Wine?
|
||||
|
||||
You can already do that under X11 and OS/2 :-) Go to the
|
||||
FreeType web page (http://www.freetype.org) for up-to-date
|
||||
information.
|
||||
|
||||
And yes, it looks terrific!
|
||||
|
||||
For X11, you could also take a look at `xfstt', an independent
|
||||
TrueType font server for Unix which doesn't rely on the
|
||||
FreeType code.
|
||||
|
||||
You're welcome to volunteer for other platforms, like:
|
||||
|
||||
Amiga, RISC OS, BeOS, and others
|
||||
|
||||
Please contact devel@freetype.org for more information.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
5. Trying to compile the FreeType sources gives me lots of
|
||||
warnings with my ANSI C compliant compiler!
|
||||
|
||||
We use gcc as our reference compiler for warnings. This means
|
||||
that we use the `-ansi -pedantic -Wall' flags and try to get
|
||||
rid of warnings in this situation.
|
||||
|
||||
If you're compiling with another compiler, you may encounter
|
||||
warnings, not errors.
|
||||
|
||||
We have spent much efforts to reduce seriously the number of
|
||||
warnings produced by major compilers, including Visual Age,
|
||||
Visual C++ and Borland C++.
|
||||
|
||||
Note that the Borland compilers seem to produce lots of
|
||||
irrelevant warnings (like `potential loss of precision').
|
||||
|
||||
|
||||
III. How to use the test programs
|
||||
=================================
|
||||
|
||||
All test programs having a graphic interface use the same key
|
||||
convention:
|
||||
|
||||
x : fine counter_clockwise rotation
|
||||
c : fine clockwise rotation
|
||||
|
||||
v : fast counter_clockwise rotation
|
||||
b : fast clockwise rotation
|
||||
|
||||
h : toggle hinting on/off
|
||||
K : toggle kerning on/off
|
||||
B : toggle display of embedded bitmaps on/off
|
||||
G : toggle GSUB on/off
|
||||
|
||||
+ : fast scale up
|
||||
- : fast scale down
|
||||
u : fine scale up
|
||||
j : fine scale down
|
||||
|
||||
l : go to next glyph
|
||||
k : go to previous glyph
|
||||
|
||||
o : go to tenth next glyph
|
||||
i : go to tenth previous glyph
|
||||
|
||||
0 : go to hundredth next glyph (useful for CJK fonts)
|
||||
9 : go to hundredth previous glyph
|
||||
|
||||
) : go to thousandth next glyph
|
||||
( : go to thousandth previous glyph
|
||||
|
||||
} : go to tenthousandth next glyph
|
||||
{ : go to tenthousandth previous glyph
|
||||
|
||||
q :
|
||||
ESC : exit
|
||||
|
||||
These keys were chosen because they are available on all
|
||||
platforms. Note also that each program uses only a subset of this
|
||||
key map.
|
||||
|
||||
1. FTZOOM
|
||||
---------
|
||||
|
||||
`ftzoom' is a very simple glyph viewer that supports font
|
||||
smoothing. Its usage is:
|
||||
|
||||
ftzoom [-g] [-p platformID -e encodingID]
|
||||
[-r resolution] [-z magnification] [-n] fontfilename
|
||||
|
||||
With -g you can select gray-scaling; with -n you can suppress
|
||||
usage of the `post' table in the TrueType font.
|
||||
|
||||
For example:
|
||||
|
||||
ftzoom arial.ttf to show the glyphs found
|
||||
in the Arial font
|
||||
ftzoom -g times.ttf to show smoothed version of
|
||||
Times's glyphs.
|
||||
ftzoom -p 3 -e 1 uwjmg3.ttf use cmap for platform ID 3,
|
||||
encoding ID 1 for this Japanese
|
||||
font.
|
||||
|
||||
2. FTLINT
|
||||
---------
|
||||
|
||||
`ftlint' is used to execute all glyphs instructions found in a
|
||||
font file at a given char size size. Its usage is:
|
||||
|
||||
ftlint pointsize fontfilename [fontfilename] ...
|
||||
|
||||
For example:
|
||||
|
||||
ftlint 12 arial.ttf
|
||||
ftlint 15 times.ttf
|
||||
|
||||
It reports error codes and faulty glyph numbers. This is a
|
||||
console tool that doesn't need the graphics subsystem.
|
||||
|
||||
NOTE: Trying to hint at sizes smaller than 7 is irrelevant.
|
||||
|
||||
3. FTVIEW
|
||||
---------
|
||||
|
||||
A font viewer that supports hinting and font smoothing. Its
|
||||
usage:
|
||||
|
||||
ftview [-g] -[r resolution] [-B] pointsize fontfilename
|
||||
|
||||
like in:
|
||||
|
||||
ftview 12 arial.ttf show the hinted Arial at size 12pt.
|
||||
|
||||
ftview -g 15 timesi.ttf show the hinted and font-smoothed
|
||||
Times at size 15pt.
|
||||
|
||||
`-r' selects the resolution; `-B' forces the use of embedded
|
||||
bitmaps.
|
||||
|
||||
Note that it is possible to change the point size during display
|
||||
with the keys `u', `j', `+', and `-'. It is also possible to
|
||||
browse the whole glyph set with the `k', `l', `i', `o', `0',
|
||||
`9', `(', `)', `{', and `}' keys (see key map above).
|
||||
|
||||
The OS/2 PM driver comes with an additional magnifying window.
|
||||
The magnified zone is set with the mouse, while the scale is
|
||||
changed with the help of `PageUp' and `PageDown'.
|
||||
|
||||
Note 1: The engine uses the font's CVT program to determine at
|
||||
which size to enable or disable glyph hinting. Don't be
|
||||
surprised to see unhinted glyphs at sizes < 7pt.
|
||||
|
||||
Note 2: Vertical drop-out control has been added to the gray
|
||||
scaling renderer. As a consequence, the library doesn't
|
||||
produce unpleasant results at small ppems with badly
|
||||
hinted glyphs.
|
||||
|
||||
4. FTTIMER
|
||||
----------
|
||||
|
||||
This program is used to benchmark FreeType's scan-converter (the
|
||||
component in charge of translating a vectorial shape description
|
||||
into a bitmap). It does so in preloading all glyphs from a font
|
||||
file, then rendering them as fast as possible in a 640x450
|
||||
buffer. The glyphs are rendered at size 400pt / 96dpi, which is
|
||||
_quite_ big.
|
||||
|
||||
Its usage is:
|
||||
|
||||
fttimer [-g] [-v] fontfilename
|
||||
|
||||
where
|
||||
|
||||
-g : Asks for gray-level rendering at size 200pt instead
|
||||
(a.k.a. font-smoothing).
|
||||
|
||||
-v : Asks for the display of the produced bitmap. Beware
|
||||
that display slows things down (display on X11 is
|
||||
_terrible_, especially with gray-levels, but this is
|
||||
not a problem for us :-).
|
||||
|
||||
Note that the returned numbers are not a benchmark of FreeType's
|
||||
overall performance! Only of the scan-line renderer (which
|
||||
seems quite fast, apparently :-).
|
||||
|
||||
When comparing measured performances across machines, please
|
||||
only consider the undisplayed ones. We're interested in all
|
||||
kinds of results (please provide the following information:
|
||||
|
||||
font file
|
||||
number of rendered glyphs
|
||||
render time
|
||||
total time
|
||||
glyphs / s
|
||||
processor type
|
||||
CPU clock
|
||||
|
||||
and which compiler used (with optimization involved)! This
|
||||
can make a great difference!
|
||||
|
||||
etc.)
|
||||
|
||||
5. FTDUMP
|
||||
---------
|
||||
|
||||
This program is a very simple font dumper. In its current
|
||||
incarnation, it will only output a font's name table, character
|
||||
encoding maps IDs and total memory consumption. For TrueType
|
||||
Open files, the available GSUB tables are also shown.
|
||||
|
||||
The `total memory used' reported is the amount that is used by
|
||||
the engine to load one face, with one instance (a point size).
|
||||
|
||||
Each additional instance takes only a fraction of that amount,
|
||||
and is labeled by `instance object'. As you can see, FreeType
|
||||
isn't really greedy.
|
||||
|
||||
Usage: ftdump fontpathname[.ttf|.ttc]
|
||||
|
||||
6. FTSTRING
|
||||
-----------
|
||||
|
||||
This program demonstrates string text generation. It only
|
||||
displays a given message on the screen, and lets you resize it
|
||||
with the classic key bindings `u', `j', `+', and `-'.
|
||||
|
||||
Usage:
|
||||
|
||||
ftstring ptsize fontname[.ttf|.ttc] [message_string]
|
||||
|
||||
If the message is omitted, it will revert to the classic
|
||||
typographic test sentence:
|
||||
|
||||
The quick brown fox jumps over the lazy dog
|
||||
|
||||
which is made of all letters of the English alphabet.
|
||||
|
||||
`ftstring' only works with font files that contain a Unicode
|
||||
character mapping table (either Windows Unicode or Apple
|
||||
Unicode). For the moment, the message can however only be
|
||||
written in ASCII, as accents aren't supported yet.
|
||||
|
||||
7. FTSTRPNM
|
||||
-----------
|
||||
|
||||
Usage:
|
||||
|
||||
ftstrpnm [options] filename [string]
|
||||
|
||||
Options:
|
||||
|
||||
-g gray-level rendering (default: off)
|
||||
-h hinting off (default: on)
|
||||
-r X resolution X dpi (default: 96)
|
||||
-p X pointsize X pt (default: 12)
|
||||
-b X border X pixels wide (default: 0)
|
||||
|
||||
This program is quite similar to ftstring but converts the
|
||||
rendered image of the specified string into a bitmap in PBM or
|
||||
PGM format written to stdout; PBM (Portable BitMap) and PGM
|
||||
(Portable GrayMap) formats can be further converted to popular
|
||||
graphics formats like GIF or PNG with the netpbm tool suite
|
||||
available via Internet.
|
||||
|
||||
8. FTERROR
|
||||
----------
|
||||
|
||||
This program tests the gettext() functionality on UNIX platforms
|
||||
(usually provided in the GNU gettext package). It will return
|
||||
language specific error and warning messages depending on your
|
||||
locale. Currently French, Dutch, Spanish, German, and Czech
|
||||
translations of the FreeType messages are included -- we invite
|
||||
you to contribute more translations.
|
||||
|
||||
Typically, you have to set the LANG environment variable to your
|
||||
locale to get localized messages. Example:
|
||||
|
||||
LANG=de fterror
|
||||
|
||||
Note that providing message strings for FreeType's error and
|
||||
warning messages is an extension and not part of the FreeType
|
||||
library itself. Please refer to `docs/i18n.txt' for further
|
||||
details.
|
||||
|
||||
9. FTSBIT
|
||||
---------
|
||||
|
||||
Usage:
|
||||
|
||||
ftsbit ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]
|
||||
|
||||
This tool dumps the information in the tables for embedded
|
||||
bitmaps. Additionally, it prints (to the console) a selected
|
||||
glyph bitmap.
|
||||
|
||||
10. FTMETRIC
|
||||
------------
|
||||
|
||||
Usage:
|
||||
|
||||
ftmetric [options below] point fontname[.ttf|.ttc] ...
|
||||
|
||||
-B show sbit's metrics (default: none)
|
||||
-c C use C'th font index of TrueType collection
|
||||
(default: 0)
|
||||
-i index glyph index (default: 0)
|
||||
-r R use resolution R dpi (default: 72dpi)
|
||||
|
||||
With this small program you can inspect the metric data of a
|
||||
given glyph; additionally, it dumps the particular glyph to the
|
||||
console.
|
||||
|
||||
11. FTSTRTTO
|
||||
------------
|
||||
|
||||
Usage:
|
||||
|
||||
ftstrtto [options below] ppem fontname[.ttf|.ttc] [string|-]
|
||||
|
||||
-c C use font with index C in TrueType collection
|
||||
(default: 0)
|
||||
-f F use feature F (can be specified more than once)
|
||||
-g gray-level rendering
|
||||
-l L use language L
|
||||
-r R use resolution R dpi (default: 96dpi)
|
||||
-s S use script S
|
||||
-u interpret input data as UTF8-encoded
|
||||
-v display string vertically
|
||||
-x display string from right to left
|
||||
|
||||
F, L, and S must be specified as 4-character tags.
|
||||
Specifying only F and S selects default language system of S.
|
||||
Specifying only L and S selects the req. feature of L only
|
||||
(if any).
|
||||
|
||||
If `-' is specified as input string, stdin is read instead.
|
||||
|
||||
This program uses almost all features of FreeType to display a
|
||||
string on screen. Its usage is similar to `ftstring', but you
|
||||
can additionally select GSUB features, the collection in a font,
|
||||
toggle kerning and embedded bitmaps interactively, and input the
|
||||
optional string in UTF8 encoding.
|
||||
|
||||
For a list of available script, language, and feature tags
|
||||
please refer to the TrueType Open (resp. OpenType)
|
||||
specification.
|
||||
|
||||
Example:
|
||||
|
||||
ftstrtto -s "latn" -l "DEU " -f "liga" -f "frac" \
|
||||
40 pala.ttf "fi ff ffi ffl 1/2"
|
||||
|
||||
Note that you can inspect the available tags in a font with
|
||||
`ftdump'.
|
||||
|
||||
The features `init', `medi', and `fina', and `isol' are treated
|
||||
specially. Internally, ftstrtto assigns initial, medial,
|
||||
isolated, and final properties to Arabic characters in the input
|
||||
string. If one of the features is switched on, all glyphs with
|
||||
the corresponding property are modified (if covered).
|
||||
|
||||
Example:
|
||||
|
||||
ftstrtto -s arab -f init -f medi -f fina -f isol \
|
||||
-f liga -f mset -x -u 20 trado.ttf - < arab.utf8
|
||||
|
||||
`mset' is another, Arabic specific feature to position combining
|
||||
marks.
|
||||
|
||||
If you select the swash feature `swsh', the displayed
|
||||
alternative in the string is always the first available one.
|
||||
|
||||
|
||||
|
||||
IV. HOW TO USE THE PROGRAMS IN THE `CONTRIB' DIRECTORY
|
||||
======================================================
|
||||
|
||||
These programs are contributions to FreeType and not really part
|
||||
of it. Please read the documentation files in the respective
|
||||
subdirectories how to compile and install them.
|
||||
|
||||
|
||||
V. FINAL REMARKS
|
||||
================
|
||||
|
||||
Of course, all source code is provided `as is'. Please read the
|
||||
file `license.txt' for more information.
|
||||
|
||||
We hope you will find this engine useful, and look forward to file.
|
||||
your feed-back. We're of course very interested in bug reports, as
|
||||
well as FreeType success stories :-)
|
||||
|
||||
|
||||
Thanks for your time and consideration,
|
||||
|
||||
|
||||
David Turner, Robert Wilhelm, Werner Lemberg,
|
||||
and all the FreeType enthusiasts...
|
||||
|
||||
|
||||
--- end of README ---
|
||||
427
aclocal.m4
vendored
Normal file
427
aclocal.m4
vendored
Normal file
@@ -0,0 +1,427 @@
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
60
announce
Normal file
60
announce
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
|
||||
Announcing
|
||||
|
||||
|
||||
F R E E T Y P E 1 . 3 . 1
|
||||
|
||||
|
||||
The FREE TrueType Font Engine
|
||||
|
||||
|
||||
Copyright (C) 1996-1999 The FreeType Development Team
|
||||
|
||||
|
||||
|
||||
The FreeType engine is a free and portable TrueType font rendering
|
||||
engine, available in ANSI C and Pascal source code. It has been
|
||||
developed to provide TrueType support to a great variety of
|
||||
platforms and environments.
|
||||
|
||||
Notice that FreeType is a *library*. It is *not* a font server
|
||||
for your preferred environment, even though it has been designed
|
||||
to be the basis of many high-level libraries, tools and font
|
||||
servers.
|
||||
|
||||
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
|
||||
WE HAVE RECENTLY DISCOVERED THAT APPLE OWNS SEVERAL PATENTS
|
||||
RELATED TO THE RENDERING OF TRUETYPE FONTS. THIS COULD MEAN THAT
|
||||
THE FREE USE OF THE FREETYPE LIBRARY MIGHT BE ILLEGAL IN THE USA,
|
||||
JAPAN, AND POSSIBLY OTHER COUNTRIES. FOR MORE INFORMATION, WE
|
||||
STRONGLY ADVISE YOU TO GO TO THE FREETYPE WEB SITE AT:
|
||||
|
||||
http://www.freetype.org/patents.htm
|
||||
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER
|
||||
|
||||
|
||||
It's a clean-room implementation that is not derived from the
|
||||
original TrueType engine developed by Apple and Microsoft, though
|
||||
it matches it regarding rendering quality. To our knowledge, it's
|
||||
the only royalty-free complete TrueType engine available.
|
||||
|
||||
Version 1.3.1 fixes several bugs found in 1.3.
|
||||
|
||||
Version 1.3 fixes several bugs found in 1.2, as well as provide
|
||||
the engine with enhanced capabilities, like support for embedded
|
||||
bitmaps and rudimentary TrueType Open support.
|
||||
|
||||
For more information, please visit the freetype web site at:
|
||||
|
||||
http://www.freetype.org
|
||||
|
||||
1087
config.guess
vendored
Normal file
1087
config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1215
config.sub
vendored
Normal file
1215
config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
201
configure.in
Normal file
201
configure.in
Normal file
@@ -0,0 +1,201 @@
|
||||
dnl This file is part of the FreeType project.
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(lib/freetype.h)
|
||||
|
||||
dnl Due to a bug in autoconf we must set $srcdir explicitly to an absolute
|
||||
dnl path.
|
||||
srcdir=`cd $srcdir; pwd`
|
||||
|
||||
AM_DISABLE_STATIC
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl FreeType version
|
||||
freetype_version='1.2.0'
|
||||
|
||||
dnl libttf.so version
|
||||
version_info='4:0:2'
|
||||
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls don't use NLS],
|
||||
USE_NLS=no, USE_NLS=yes)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
dnl Checks for system type.
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
|
||||
dnl get Compiler flags right.
|
||||
|
||||
if test "x$CC" = xgcc; then
|
||||
XX_CFLAGS="-Wall -pedantic -ansi"
|
||||
else
|
||||
case "$host" in
|
||||
*-dec-osf*)
|
||||
XX_CFLAGS="-std1 -O2 -g3"
|
||||
;;
|
||||
*)
|
||||
XX_CFLAGS=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(XX_CFLAGS)
|
||||
|
||||
dnl at least Digital UNIX 4.0d needs this due to a strange make program
|
||||
|
||||
case "$host" in
|
||||
*-dec-osf*)
|
||||
ln -s ../../MakeSub lib/arch
|
||||
ln -s ../../MakeSub test/arch
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(freetype_version)
|
||||
AC_SUBST(version_info)
|
||||
|
||||
dnl gettext support
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])
|
||||
AC_CHECK_HEADERS(locale.h)
|
||||
AC_CHECK_FUNCS(setlocale)
|
||||
AC_SUBST(HAVE_LOCALE_H)
|
||||
|
||||
ALL_LINGUAS="de fr cs nl es"
|
||||
AC_CHECK_HEADERS(libintl.h)
|
||||
AC_CHECK_LIB(intl,gettext)
|
||||
AC_SUBST(HAVE_LIBINTL_H)
|
||||
AC_SUBST(HAVE_LIBINTL)
|
||||
|
||||
dnl Handle localedir
|
||||
LOCALEDIR='${prefix}/share/locale'
|
||||
AC_ARG_WITH(locale-dir,
|
||||
[ --with-locale-dir=DIR Location of the locale file(s)
|
||||
[PREFIX/share/locale]],[
|
||||
if test x$withval = xyes; then
|
||||
AC_MSG_WARN(Usage is: --with-locale-dir=basedir)
|
||||
else
|
||||
if test x$withval = xno; then
|
||||
AC_MSG_WARN(Usage is: --with-locale-dir=basedir)
|
||||
else
|
||||
LOCALEDIR=$withval
|
||||
fi
|
||||
fi
|
||||
])
|
||||
AC_SUBST(LOCALEDIR)
|
||||
|
||||
AC_PATH_PROG(MSGFMT, msgfmt, $MSGFMT)
|
||||
if test -n "$MSGFMT"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AC_PATH_PROG(XGETTEXT, xgettext, $XGETTEXT)
|
||||
AC_PATH_PROG(MSGMERGE, msgmerge, $MSGMERGE)
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test -n "$XGETTEXT"; then
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=""
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl We add another test for comparing GNU xgettext with openwin xgettext
|
||||
if test -n "$XGETTEXT"; then
|
||||
if $XGETTEXT --help > /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=""
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test -n "$MSGFMT"; then
|
||||
if $MSGFMT < /dev/null 2> /dev/null; then
|
||||
AC_MSG_RESULT(
|
||||
[found msgfmt program is not GNU msgfmt; NLS won't be installed])
|
||||
MSGFMT=""
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_TRY_LINK(,
|
||||
[extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for lang in $ALL_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang$CATOBJEXT"
|
||||
done
|
||||
fi
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
fi
|
||||
|
||||
dnl don't use NLS, when there is no gettext installed
|
||||
if test x"$MSGFMT" = x; then
|
||||
USE_NLS=no
|
||||
fi
|
||||
|
||||
|
||||
AC_CHECK_PROG(RM, rm, rm)
|
||||
AC_CHECK_PROG(RMDIR, rmdir, rmdir)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
dnl Checks for libraries.
|
||||
sinclude(net.m4)
|
||||
AC_LIBRARY_NET
|
||||
AC_CHECK_LIB(m, cos)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_PATH_XTRA
|
||||
AC_CHECK_HEADERS(stdlib.h fcntl.h unistd.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
dnl Here we check whether we can use our mmap file component.
|
||||
AC_FUNC_MMAP
|
||||
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
|
||||
TT_FILE_COMPONENT=ttfile.c
|
||||
else
|
||||
TT_FILE_COMPONENT=arch/unix/ttmmap.c
|
||||
fi
|
||||
AC_SUBST(TT_FILE_COMPONENT)
|
||||
|
||||
AC_CHECK_FUNCS(memcpy memmove)
|
||||
|
||||
AC_CONFIG_HEADER(ft_conf.h)
|
||||
|
||||
dnl Another bug: to make --srcdir work correctly we have to create the
|
||||
dnl directory hierarchy first since autoconf only uses mkdir.
|
||||
$srcdir/mkinstalldirs lib/arch/unix test/arch/unix
|
||||
|
||||
AC_OUTPUT(Makefile
|
||||
MakeSub
|
||||
lib/arch/unix/Makefile
|
||||
test/arch/unix/Makefile
|
||||
po/Makefile.in,
|
||||
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
|
||||
|
||||
|
||||
dnl end of configure.in
|
||||
38
contrib/ftos2/DEVELFAQ
Normal file
38
contrib/ftos2/DEVELFAQ
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This is a FreeType/2 programmers' mini-FAQ
|
||||
|
||||
Q1: Is the source code available?
|
||||
|
||||
A1: Yes! But if you think you have all you need, you're probably wrong :-)
|
||||
The source is now actually part of FreeType project, located at
|
||||
ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype
|
||||
|
||||
We have now the permission to distribute the OS/2 IFI headers with
|
||||
the FreeType/2 source code. They're all the files beginning with a
|
||||
"32" in the "ifi" directory. It seems that some people had problems
|
||||
with the download indicated in the last beta.
|
||||
|
||||
|
||||
Q2: What compilers are supported?
|
||||
|
||||
A2: The development of FreeType/2 was done primarily in IBM's VisualAge C++
|
||||
version 3.0. It should be possible to build the DLL with Watcom C/C++ but
|
||||
it's not quite working yet.
|
||||
It is perhaps possible to build the Font Driver with another compiler,
|
||||
but you'll have to know the compiler (and OS/2 of course) _quite_ well.
|
||||
|
||||
Note that the FreeType library itself supports also EMX/GCC (and I
|
||||
believe it was mainly developed in it).
|
||||
|
||||
|
||||
Q3: What other tools do I need?
|
||||
|
||||
A3: You'll need a kernel debugger. Check out IBM's ICAT, it's great and
|
||||
it's free! Actually without ICAT this code would probably never happen.
|
||||
If you've lived under a rock and don't know what ICAT is, it's actually
|
||||
an interface to ol' good KDB. It is a source-level debugger and it looks
|
||||
and feels very much like the VisualAge debugger, IPMD.
|
||||
|
||||
And if you haven't got it yet, you'll need _two_ computers to use ICAT.
|
||||
But believe me, it's worth it!
|
||||
|
||||
260
contrib/ftos2/FAQ
Normal file
260
contrib/ftos2/FAQ
Normal file
@@ -0,0 +1,260 @@
|
||||
This is a FreeType/2 users' mini-FAQ
|
||||
|
||||
Table of Contents:
|
||||
|
||||
Q1: Where can I find the latest FreeType/2 release?
|
||||
Q2: Now that I have FreeType/2 installed, how do I actually add TrueType
|
||||
fonts to OS/2?
|
||||
Q3: When will you add font-smoothing to the DLL? I really want that!
|
||||
Q4: Why does IBM's TrueType engine do such a poor job?
|
||||
Q5: But there are still differences with the glyphs produced by Windows or
|
||||
the Mac, right?
|
||||
Q6: I've got TrueType Times New Roman installed but the system still seems
|
||||
to be using the original ATM (Type 1) font. Why this odd behaviour?
|
||||
Q7: I noticed it takes a second or two before the Font Palette object opens
|
||||
for the first time. Why?
|
||||
Q8: I noticed the characters sometimes have odd spacing. When will you fix
|
||||
it?
|
||||
Q9: Could you explain the open fonts limit?
|
||||
Q10: Can you recommend some fonts to use?
|
||||
Q11: What's a 'broken glyph'?
|
||||
Q12: Why do some fonts appear twice, once starting with an '@'?
|
||||
Q13: I've got a Chinese (Japanese, Korean) font but the characters aren't
|
||||
there! Why?
|
||||
Q14: I tried to use a DBCS font but I got an exception un UCONV.DLL. What's
|
||||
wrong?
|
||||
Q15: My system won't boot after I installed FreeType/2 and the uninstall
|
||||
script won't work when I boot to command line. What now?
|
||||
Q16: I'm upgrading from previous version and I don't want to uninstall and
|
||||
reinstall. Is there any other way?
|
||||
Q17: What's this stuff about Times New Roman being aliased to Tms Rmn?
|
||||
Please explain this.
|
||||
|
||||
Questions & Answers:
|
||||
|
||||
Q1: Where can I find the latest FreeType/2 release?
|
||||
|
||||
A1: Links to the latest release can be found at the FreeType/2 homepage at
|
||||
http://www.freetype.org/ft_os2/index.html.
|
||||
|
||||
Q2: Now that I have FreeType/2 installed, how do I actually add TrueType
|
||||
fonts to OS/2?
|
||||
|
||||
A2: I thought everyone knew that... It's simple, really. Open the Font
|
||||
Palette object (in System Setup folder) then click 'Edit font' and 'Add'.
|
||||
Now type the directory path where your TrueType fonts reside, such as
|
||||
'C:\WINDOWS\FONTS' if you have Win95 and click 'Add'. You'll be presented a
|
||||
list of all fonts that OS/2 found in specified directory. Simply select all
|
||||
fonts you wish to install click 'Add' for the last time. If you wish to
|
||||
remove fonts, just use the 'Delete' button in the 'Edit Font' dialog.
|
||||
TIP: If you wish to add font to OS/2 but don't want to actually copy the
|
||||
file, just type the directory name where the font files already are instead
|
||||
of 'X:\PSFONTS' in the 'Add New Fonts' dialog.
|
||||
|
||||
Q3: When will you add font-smoothing to the DLL? I really want that!
|
||||
|
||||
A3: Short answer: We can't.
|
||||
Long answer: The FreeType library already supports font-smoothing (or
|
||||
antialiasing or grayscaling). The problem is that OS/2's font engine, in
|
||||
its current incarnation, doesn't know anything about anti-aliased text and
|
||||
is only able to manage monochrome bitmaps. Font smoothing support would
|
||||
require some changes of PM/GPI/GRE components, which certainly is out of
|
||||
our scope, and isn't planned by IBM (to our knowledge) in foreseeable
|
||||
future, if ever.
|
||||
|
||||
If you really need font smoothing in your application, you can still use
|
||||
the FreeType library itself. Be warned that it is a rather low-level engine
|
||||
and that you'll need to add a various number of text features on top of
|
||||
this code to get the equivalent of PM's font API.
|
||||
|
||||
There is a good chance that FreeType 2.0 will ease the pain for developers
|
||||
when it's available.
|
||||
|
||||
And if you really want font smoothing in OS/2, ask IBM!
|
||||
|
||||
Q4: Why does IBM's TrueType engine do such a poor job?
|
||||
|
||||
A4: It'd be easy to throw one or two stones at IBM's engineers if this was
|
||||
the result of lazy coding or bad software engineering. However, the problem
|
||||
is more complex, and PSP programmers deserve little, if any, blame.
|
||||
|
||||
Trouble is that the TrueType specification, which can be found both on
|
||||
Microsoft and Apple sites, has severe lacks, as well as particularly fuzzy
|
||||
definitions. Part of the TT spec is the TrueType bytecode specification.
|
||||
This bytecode is used to write glyph programs that are used to explicitely
|
||||
hint each glyph to have it rendered perfectly on the screen (and on
|
||||
printers). It is made of approximately 200 opcodes, which relate to moving
|
||||
points on a pixel grid, measuring distances in any kind of direction,
|
||||
keeping widths and heights consistent across a single font, etc..
|
||||
|
||||
Some of these opcodes are simply un-documented, or lack precise and
|
||||
important details related to their exact implementation. As a consequence,
|
||||
when FreeType started, it's first bytecode interpreter exhibited results
|
||||
which were very similar to OS/2's one (i.e. bad baseline, incoherent
|
||||
widths, "swashs" and bad serifs, etc..). There are several commercial
|
||||
engines which provide the same kind of "erroneous" output, like the one in
|
||||
the BeOS for instance.
|
||||
|
||||
It took FreeType developers _many_ months and experimentation to discover
|
||||
the real meaning of some opcodes, and incorporate it into the library. This
|
||||
"spelunker" work has been painful and slow, which is why few commercial
|
||||
companies, if any, dared to do it, but it finally pays off ! Moreover, the
|
||||
FreeType library is released under a BSD-like free license. This means that
|
||||
_anyone_ is now able to take the work that has been done to rewrite or fix
|
||||
his own TrueType interpreter. (Of course, another good idea is to use
|
||||
FreeType as your core TrueType engine, to be able to benefit to ongoing
|
||||
fixes and "undocumented features" discoveries, etc...)
|
||||
|
||||
Q5: But there are still differences with the glyphs produced by Windows or
|
||||
the Mac, right?
|
||||
|
||||
A5: Right. Another feature of the TrueType specification is to use fixed
|
||||
float pixel coordinates. When measuring distances along diagonals, some
|
||||
rouding error usually occur. Also, some TrueType opcodes have a more or
|
||||
less "chaotic" behaviour, where a ridiculous difference in inputs can
|
||||
produce vastly different results. These factors mean that the only way to
|
||||
match bit-to-bit the glyphs produced by Windows or the Macintosh is to
|
||||
implement the _exact_ same computation routines, and reproduce all their
|
||||
rounding errors ! As FreeType is a clean-room implementation, this will
|
||||
never be possible. Note that the bitmaps match in 95% cases, at least, and
|
||||
that there are already differences between the Win 3.1 and Win95 TrueType
|
||||
renderers (i.e. look at the "m" of Arial at size 8 for example).
|
||||
|
||||
The FreeType team tries very hard to "catch" differences, but there is a
|
||||
point where this just isn't possible... However, we're very satisfied with
|
||||
its current quality, and we hope you'll be too :-)
|
||||
|
||||
Q6: I've got TrueType Times New Roman installed but the system still seems
|
||||
to be using the original ATM (Type 1) font. Why this odd behaviour?
|
||||
|
||||
A6: It seems in case of a name clash OS/2 is using the font that was
|
||||
installed later. Try removing and reinstalling the TrueType font.
|
||||
Alternately remove the ATM (Type 1) font (not recommended).
|
||||
Experiments also suggest that different apps behave differently. Some apps
|
||||
will for example show both fonts but will use only one of them anyway. It
|
||||
really depends.
|
||||
|
||||
Q7: I noticed it takes a second or two before the Font Palette object opens
|
||||
for the first time. Why?
|
||||
|
||||
A7: Because FreeType/2 postpones as much work on the fonts as possible
|
||||
until it's really needed. This means the first opening of a font is a bit
|
||||
slower. But it also means no resources are unnecessarily wasted. And it's
|
||||
not really that bad :-) This behaviour is also noticeable when e.g. opening
|
||||
a document for the first time. Note that subsequent openings are OK because
|
||||
OS/2 caches as much information as possible.
|
||||
|
||||
Q8: I noticed the characters sometimes have odd spacing. When will you fix
|
||||
it?
|
||||
|
||||
A8: I won't. It's not really a bug, it's a feature. If they weren't spaced
|
||||
'oddly', the result might look better, but only at the cost of
|
||||
Windows-style 'WYSIWYG', i.e. what you see on screen will almost certainly
|
||||
look totally different on any other device. Anyway, the spacing is
|
||||
controlled by OS/2 and not by the Font Driver itself, so if you still don't
|
||||
like it, IBM is the right one to ask :-)
|
||||
|
||||
This problem is particularly visible in Netscape. Most probably this
|
||||
happens because Netscape tries to use fractional pointsizes, but most
|
||||
TrueType fonts don't allow that. This means that Netscape sometimes
|
||||
positions characters as if they were e.g. 8.6 points while their actual
|
||||
size is only 8 points.
|
||||
|
||||
Q9: Could you explain the open fonts limit?
|
||||
|
||||
A9: Sure. If you install 50 fonts in OS/2, the system opens them all at
|
||||
startup and keeps them open until shutdown. While many users may want to
|
||||
have large number of fonts installed (like me), very few of them probably
|
||||
use all the fonts all the time. This of course wastes lots of memory and
|
||||
swap space. Just for your information, normal fonts take up 30-50 K of
|
||||
memory with FreeType/2, but for example Times New Roman MT 30 takes over
|
||||
500K!
|
||||
|
||||
FreeType/2 overcomes this problem by only actually keeping in memory the
|
||||
last n most recently used fonts. The actual number is settable via entry in
|
||||
OS2.INI and there's an simple REXX script to do that. Good default might be
|
||||
10-15 fonts, depending what you want to do with them.
|
||||
|
||||
Note that this process is totally transparent to the system. You won't have
|
||||
to do anything, FreeType/2 will take care of everything. The only things
|
||||
you will notice is dramatically reduced memory consumption and when working
|
||||
with large numbers of fonts there may be slight delay when reopening a
|
||||
font.
|
||||
|
||||
Q10: Can you recommend some fonts to use?
|
||||
|
||||
A10: Yes! I recommend to use Micro$oft's (oh no!) Core Fonts - Times New
|
||||
Roman, Arial and Courier New, plus other MS fonts. There are several
|
||||
reasons: the fonts have very good quality, stick to the TrueType spec prety
|
||||
well, support many countries and are widely available. Moreover they're
|
||||
free. You can certainly find some Win95 or NT machine in your neighbourhood
|
||||
(all too easily I'm afraid). They should also be available from MS's Web
|
||||
site.
|
||||
Note: If you want to copy the fonts from a Win95 machine, they're in
|
||||
\WINDOWS\FONTS. Watch out, the directory is hidden!
|
||||
|
||||
Q11: What's a 'broken glyph'?
|
||||
|
||||
A11: Some fonts contain buggy or 'broken' glyphs that cannot be reliably
|
||||
loaded and rendered. Those glyphs are usually very rarely used so you might
|
||||
never notice. There was a problem with the first Beta of FreeType/2 that if
|
||||
there was a single broken glyph in a font, the
|
||||
whole font didn't work.
|
||||
|
||||
Q12: Why do some fonts appear twice, once starting with an '@'?
|
||||
|
||||
A12: It's because of DBCS systems. If you don't have one, you can safely
|
||||
ignore these fonts. The DBCS characters in them are rotated 90 degrees
|
||||
counterclockwise. It allows you to write vertical text (e.g. Chinese) with
|
||||
a normal word processor. You write the text horizontally but if you turn
|
||||
the resulting page 90 degrees clockwise, you've got vertical text.
|
||||
It's not working perfectly yet.
|
||||
|
||||
Q13: I've got a Chinese (Japanese, Korean) font but the characters aren't
|
||||
there! Why?
|
||||
|
||||
A13: Most probably the font and your system settings don't mix. One
|
||||
possible cause is that your country setting is different than that of the
|
||||
font and the font contains no information about what language it's meant
|
||||
for. In that case, FreeType/2 has to guess from your country setting. This
|
||||
means it might try to treat e.g. Japanese font as a Korean one which means
|
||||
you won't be able to access the Japanese characters in it. It's all a bit
|
||||
more complicated but it's a result of how national language support is done
|
||||
in OS/2.
|
||||
|
||||
Q14: I tried to use a DBCS font but I got an exception un UCONV.DLL. What's
|
||||
wrong?
|
||||
|
||||
A14: UCONV.DLL it used for character code translation. A likely cause is
|
||||
that you are missing the required translation table in \LANGUAGE\CODEPAGE
|
||||
directory on your boot drive. Look for file named 'IBM<CP>', where <CP> is
|
||||
the codepage you use, e.g. IBM950 for Taiwan or IBM949 for Korea.
|
||||
|
||||
Q15: My system won't boot after I installed FreeType/2 and the uninstall
|
||||
script won't work when I boot to command line. What now?
|
||||
|
||||
A15: But you've archived the key files, haven't you? If not, one way out of
|
||||
this mess is booting to command line and renaming or deleting FREETYPE.DLL
|
||||
from \OS2\DLL. Your system should boot then.
|
||||
|
||||
Q16: I'm upgrading from previous version and I don't want to uninstall and
|
||||
reinstall. Is there any other way?
|
||||
|
||||
A16: Yes! There's a little utility called REPMOD.EXE which allows you to
|
||||
replace files that are in use. In case you don't already have it, it's
|
||||
included in the FreeType/2 package. You should simply run UPDATE.CMD. The
|
||||
new version will be used on next reboot.
|
||||
|
||||
Q17: What's this stuff about Times New Roman being aliased to Tms Rmn?
|
||||
Please explain this.
|
||||
|
||||
A17: OS/2 contains bitmap font called Tms Rmn which is often used in dialog
|
||||
windows and elsewhere. The bitmap font contains only several pointsizes (8,
|
||||
10, 12, 14, 18, 24). If you request a missing pointsize, OS/2's graphics
|
||||
engine (GRE) substitutes it from the (outline) ATM font Times New Roman
|
||||
which can also be referred to as Roman/Tms Rmn. Now FreeType/2 mimics this
|
||||
functionality and can fully replace the ATM version. I recommend to
|
||||
uninstall the ATM font since if both fonts are installed, some apps use the
|
||||
ATM one, others TrueType one, without any apparent logic. If you uninstall
|
||||
(via Font Palette) the ATM version, you will always get high-quality
|
||||
TrueType Times New Roman.
|
||||
BIN
contrib/ftos2/ft2.gif
Normal file
BIN
contrib/ftos2/ft2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
53
contrib/ftos2/ifi/32fddef.h
Normal file
53
contrib/ftos2/ifi/32fddef.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*********************************************************************\
|
||||
* Module Name: 32FDDEF.H
|
||||
*
|
||||
* OS/2 Intelligent Font Interface
|
||||
*
|
||||
* Copyright (c) 1989,1994 IBM Corporation
|
||||
* Copyright (c) 1989 Microsoft Corporation
|
||||
*
|
||||
\*********************************************************************/
|
||||
#ifndef __32FDDEF_H__
|
||||
#define __32FDDEF_H__
|
||||
|
||||
/* Typedef the Font Driver 32 Bit entry points */
|
||||
|
||||
/* FdLoadFontFile */
|
||||
typedef HFF (* _syscall PFDLFF)(PSZ pszFileName);
|
||||
|
||||
/* FdQueryFaces */
|
||||
typedef LONG (* _syscall PFDQF)(HFF hff, PIFIMETRICS pifim,
|
||||
ULONG cMetricLen, ULONG cFontCount,
|
||||
ULONG cStart);
|
||||
/* FdConvertFontFile */
|
||||
typedef LONG (* _syscall PFDCFF)(PSZ pszSrc, PSZ pszDestDir,
|
||||
PSZ pszName);
|
||||
|
||||
/* FdClaimFontFile */
|
||||
typedef LONG (* _syscall PFDCLF)(PSZ pszFileName);
|
||||
|
||||
/* FdUnloadFontFile */
|
||||
typedef LONG (* _syscall PFDUFF)(HFF hff);
|
||||
|
||||
/* FdOpenFontContext */
|
||||
typedef HFC (* _syscall PFDOFC)(HFF hff, ULONG ulFont);
|
||||
|
||||
/* FdSetFontContext */
|
||||
typedef LONG (* _syscall PFDSFC)(HFC hfc, PCONTEXTINFO pci);
|
||||
|
||||
/* FdCloseFontContext */
|
||||
typedef LONG (* _syscall PFDCFC)(HFC hfc);
|
||||
|
||||
/* FdQueryFaceAttr */
|
||||
typedef LONG (* _syscall PFDQFA)(HFC hfc, ULONG iQuery, PBYTE pBuffer,
|
||||
ULONG cb, PGLYPH pagi, GLYPH gistart);
|
||||
|
||||
/* FdQueryCharAttr */
|
||||
typedef LONG (* _syscall PFDQCA)(HFC hfc, PCHARATTR pCharAttr,
|
||||
PBITMAPMETRICS pbmm);
|
||||
|
||||
/* FdQueryFullFaces */
|
||||
typedef LONG (* _syscall PFDQFF)(HFF hff, PVOID pBuf, PULONG cBufLen,
|
||||
PULONG cFontCount, ULONG cStart);
|
||||
#endif
|
||||
|
||||
161
contrib/ftos2/ifi/32fdstrc.h
Normal file
161
contrib/ftos2/ifi/32fdstrc.h
Normal file
@@ -0,0 +1,161 @@
|
||||
/*********************************************************************\
|
||||
* Module Name: 32FDSTRC.H
|
||||
*
|
||||
* OS/2 Intelligent Font Interface
|
||||
*
|
||||
* Copyright (c) 1989,1994 IBM Corporation
|
||||
* Copyright (c) 1989 Microsoft Corporation
|
||||
*
|
||||
\*********************************************************************/
|
||||
#ifndef __32FDSTRC_H__
|
||||
#define __32FDSTRC_H__
|
||||
|
||||
#define FACESIZE 32
|
||||
#define GLYPHNAMESIZE 16
|
||||
|
||||
/* Error codes defined to be returned by IFI */
|
||||
/* NOTE: The actual values are subject to change */
|
||||
|
||||
/*#define PMERR_BUFFER_TOO_SMALL 23003L*/
|
||||
#define PMERR_FACENAME_NOT_FOUND 23004L
|
||||
#define PMERR_FD_ALREADY_INSTALLED 23005L
|
||||
#define PMERR_INVALID_CONTEXTINFO 23006L
|
||||
#define PMERR_NOT_A_FONT_FILE 23007L
|
||||
#define PMERR_INVALID_FONT_SELECTION 23008L
|
||||
#define PMERR_INVALID_FORMAT 23009L
|
||||
#define PMERR_BUSY_HFC 230010L
|
||||
#define PMERR_INVALID_HFC 230011L
|
||||
#define PMERR_INVALID_INDEX 230012L
|
||||
#define PMERR_INVALID_QUERY_TYPE 230013L
|
||||
#define PMERR_CONTEXT_NOT_SET 230014L
|
||||
|
||||
/* Query faces subfunction */
|
||||
#define FD_QUERY_CONTEXTMETRICS 1L
|
||||
#define FD_QUERY_ABC_WIDTHS 2L
|
||||
#define FD_QUERY_KERNINGPAIRS 3L
|
||||
|
||||
/* Query char subfunction */
|
||||
#define FD_QUERY_CHARIMAGE 1L
|
||||
#define FD_QUERY_OUTLINE 2L
|
||||
#define FD_QUERY_BITMAPMETRICS 4L
|
||||
|
||||
#define FD_CHARATTR_ALIGNED_8 0x00000001
|
||||
#define FD_CHARATTR_ALIGNED_16 0x00000002
|
||||
#define FD_CHARATTR_ALIGNED_32 0x00000004
|
||||
#define FD_CHARATTR_NO_CACHE 0x00000010
|
||||
|
||||
typedef struct _ABC_TRIPLETS /*abc*/
|
||||
{
|
||||
LONG lA;
|
||||
ULONG ulB;
|
||||
LONG lC;
|
||||
} ABC_TRIPLETS;
|
||||
typedef ABC_TRIPLETS *PABC_TRIPLETS;
|
||||
|
||||
// THIS STRUCTURE NOW RESIDES IN PMDDI.H FOR CRUISER WORLD
|
||||
// BUT IFI FONT DRIVER DOES NOT INCLUDE PMDDI.H
|
||||
|
||||
#ifndef INCL_IFI
|
||||
typedef struct _POINTFX { /* ptfx */
|
||||
FIXED x;
|
||||
FIXED y;
|
||||
} POINTFX;
|
||||
typedef POINTFX *PPOINTFX;
|
||||
#endif
|
||||
|
||||
typedef struct _BITMAPMETRICS /* bmm */
|
||||
{
|
||||
SIZEL sizlExtent;
|
||||
ULONG cyAscent;
|
||||
#ifdef OLD_DRIVER
|
||||
POINTFX *ppfxOrigin; /* Return character origin. */
|
||||
#else
|
||||
POINTFX pfxOrigin; /* Return character origin. */
|
||||
#endif
|
||||
} BITMAPMETRICS;
|
||||
typedef BITMAPMETRICS *PBITMAPMETRICS;
|
||||
|
||||
typedef struct _MAT2 /* mat */
|
||||
{
|
||||
FIXED eM11;
|
||||
FIXED eM12;
|
||||
FIXED eM21;
|
||||
FIXED eM22;
|
||||
} MAT2;
|
||||
|
||||
typedef struct _FD_KERNINGPAIRS /* krnpr */
|
||||
{
|
||||
GLYPH giFirst;
|
||||
GLYPH giSecond;
|
||||
LONG eKerningAmount;
|
||||
} FD_KERNINGPAIRS;
|
||||
|
||||
typedef struct _CONTEXTINFO /* ci */
|
||||
{
|
||||
ULONG cb; /* Length in bytes of this structure. */
|
||||
ULONG fl; /* Flags. */
|
||||
SIZEL sizlPPM; /* Device resolution in pels/meter. */
|
||||
POINTFX pfxSpot; /* Spot size in pels. */
|
||||
MAT2 matXform; /* Notional to Device transform. */
|
||||
} CONTEXTINFO;
|
||||
typedef CONTEXTINFO *PCONTEXTINFO;
|
||||
|
||||
typedef struct _CHARATTR /* ca */
|
||||
{
|
||||
ULONG cb;
|
||||
ULONG iQuery; /* Query type. */
|
||||
GLYPH gi; /* Glyph index in font. */
|
||||
PBYTE pBuffer; /* Bitmap buffer. */
|
||||
ULONG cbLen; /* Size of buffer in bytes. */
|
||||
} CHARATTR;
|
||||
typedef CHARATTR *PCHARATTR;
|
||||
|
||||
typedef struct _CHARATTR2 /* ca2 */
|
||||
{
|
||||
ULONG cb;
|
||||
ULONG iQuery; /* Query type. */
|
||||
GLYPH gi; /* Glyph index in font. */
|
||||
PBYTE pBuffer; /* Bitmap buffer. */
|
||||
ULONG cbLen; /* Size of buffer in bytes. */
|
||||
ULONG fl; /* Flags */
|
||||
} CHARATTR2;
|
||||
typedef CHARATTR2 *PCHARATTR2;
|
||||
|
||||
typedef struct _CONTEXTMETRICS
|
||||
{
|
||||
SIZEL sizlMax;
|
||||
ULONG cyMaxAscent;
|
||||
ULONG cyMaxDescent;
|
||||
ULONG cxTotal;
|
||||
ULONG cGlyphs;
|
||||
} CONTEXTMETRICS;
|
||||
typedef CONTEXTMETRICS * PCONTEXTMETRICS;
|
||||
|
||||
typedef struct _POLYGONHEADER {
|
||||
ULONG cb;
|
||||
ULONG iType; /* Must be FD_POLYGON_TYPE */
|
||||
} POLYGONHEADER;
|
||||
typedef POLYGONHEADER *PPOLYGONHEADER;
|
||||
|
||||
typedef struct _PRIMLINE {
|
||||
ULONG iType; /* Must be FD_PRIM_LINE */
|
||||
POINTFX pte;
|
||||
} PRIMLINE;
|
||||
typedef PRIMLINE *PPRIMLINE;
|
||||
|
||||
typedef struct _PRIMSPLINE {
|
||||
ULONG iType; /* Must be FD_PRIM_SPLINE */
|
||||
POINTFX pte[3];
|
||||
} PRIMSPLINE;
|
||||
typedef PRIMSPLINE *PPRIMSPLINE;
|
||||
|
||||
/*
|
||||
* The names of these were changed to avoid conflict with PRIM_LINE
|
||||
* which is defined ion some other header file.
|
||||
*/
|
||||
#define FD_POLYGON_TYPE 24
|
||||
#define FD_PRIM_LINE 1
|
||||
#define FD_PRIM_SPLINE 3
|
||||
|
||||
#endif
|
||||
|
||||
118
contrib/ftos2/ifi/32ifimet.h
Normal file
118
contrib/ftos2/ifi/32ifimet.h
Normal file
@@ -0,0 +1,118 @@
|
||||
/*********************************************************************\
|
||||
* Module Name: 32IFIMET.H
|
||||
*
|
||||
* OS/2 Intelligent Font Interface
|
||||
*
|
||||
* Copyright (c) 1989,1994 IBM Corporation
|
||||
* Copyright (c) 1989 Microsoft Corporation
|
||||
*
|
||||
* Definition and description of IFIMETRICS structure
|
||||
* This file is included by FDSTRUCS.H
|
||||
*
|
||||
\*********************************************************************/
|
||||
#ifndef __32IFIMET_H__
|
||||
#define __32IFIMET_H__
|
||||
|
||||
#define FACESIZE 32
|
||||
#define GLYPHNAMESIZE 16
|
||||
|
||||
/* #defines for fsType in IFIMETRICS */
|
||||
|
||||
#define IFIMETRICS_FIXED 0x0001 /*Fixed pitch */
|
||||
#define IFIMETRICS_LICENSED 0x0002 /*Font subject of licensing agreement */
|
||||
#define IFIMETRICS_KERNING 0x0004 /*Font has kerning data */
|
||||
#define IFIMETRICS_DBCS 0x0010 /*DBCS font */
|
||||
#define IFIMETRICS_MBCS 0x0018 /*MBCS (DBCS + SBCS) font */
|
||||
/* Reserved 0x8000 */
|
||||
#define IFIMETRICS_ATOMS 0x4000 /*The atom name fields are valid */
|
||||
#define IFIMETRICS_FAMTRUNC 0x2000 /*Familyname field is truncated */
|
||||
#define IFIMETRICS_FACETRUNC 0x1000 /*Facename field is truncated */
|
||||
#define IFIMETRICS_ANTIALIASED 0x0020
|
||||
#define IFIMETRICS_UNICODE 0x0040
|
||||
#define IFIMETRICS_NO_CACHE 0x0080
|
||||
|
||||
/* #defines for fsDefn in IFIMETRICS */
|
||||
|
||||
#define IFIMETRICS_OUTLINE 0x0001 /*1 - Outline. 0 - Raster */
|
||||
/* Reserved 0x0002 */
|
||||
/* Reserved 0x0004 */
|
||||
/* Reserved 0x8000 */
|
||||
#define IFIMETRICS_UDC_FONT 0x0010 /*User defined font */
|
||||
/* Reserved */
|
||||
|
||||
/* #defines for fsSelection in IFIMETRICS valid for bitmap or outline fonts */
|
||||
|
||||
#define IFIMETRICS_ITALIC 0x8000 /*Italic */
|
||||
#define IFIMETRICS_UNDERSCORE 0x4000 /*Underscored */
|
||||
#define IFIMETRICS_OVERSTRUCK 0x2000 /*Overstruck */
|
||||
|
||||
/* #defines for fsSelection in IFIMETRICS valid for bitmap fonts */
|
||||
|
||||
#define IFIMETRICS_NEGATIVE 0x1000 /*Negative image */
|
||||
#define IFIMETRICS_HOLLOW 0x0800 /*Outline (hollow) */
|
||||
|
||||
#if defined(__IBMCPP__) || defined(__IBMC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma Align_members(1)
|
||||
#endif
|
||||
|
||||
typedef struct _IFIMETRICS /* ifim */
|
||||
{ /* UNITS */
|
||||
UCHAR szFamilyname[FACESIZE]; /*Font Family Name, e.g. Roman */
|
||||
UCHAR szFacename[FACESIZE]; /*Face name, e.g. Tms Rmn Bold Italic */
|
||||
UCHAR szGlyphlistName[GLYPHNAMESIZE]; /*e.g. PM316, Latin-2, Greek */
|
||||
USHORT idRegistry; /*IBM registration number (or zero). I */
|
||||
LONG lCapEmHeight; /*Height of uppercase M N */
|
||||
LONG lXHeight; /*Nominal height of lowercase N */
|
||||
LONG lMaxAscender; /*Maximum height above baseline of any char N */
|
||||
LONG lMaxDescender; /*Maximum depth below baseline of any char N */
|
||||
LONG lLowerCaseAscent; /*Maximum height above baseline of any a-z N */
|
||||
LONG lLowerCaseDescent; /*Maximum depth below basiline of any a-z N */
|
||||
LONG lInternalLeading; /*White space within character N */
|
||||
LONG lExternalLeading; /*White space between lines N */
|
||||
LONG lAveCharWidth; /*Weighted average character width N */
|
||||
LONG lMaxCharInc; /*Maximum character increment N */
|
||||
LONG lEmInc; /*Increment for Capitals (typically 'M') N */
|
||||
LONG lMaxBaselineExt; /*Height of character cell N */
|
||||
FIXED fxCharSlope; /*Slope angle, degrees, clockwise D */
|
||||
FIXED fxInlineDir; /*Drawing direction, degrees clockwise D */
|
||||
FIXED fxCharRot; /*Glyph rotation in cell, degrees clockwise D */
|
||||
USHORT usWeightClass; /*Character weight, 1-9 (1=ultra-light) I */
|
||||
USHORT usWidthClass; /*Character width, 1-9 (1=ultra condensed) I */
|
||||
LONG lEmSquareSizeX; /*Em Square size, x-direction N */
|
||||
LONG lEmSquareSizeY; /*Em Square size, y-direction N */
|
||||
GLYPH giFirstChar; /*Number of first glyph in font I */
|
||||
GLYPH giLastChar; /*Number of last glyph in font I */
|
||||
GLYPH giDefaultChar; /*Glyph used if requested glyph invalid I */
|
||||
GLYPH giBreakChar; /*Space glyph I */
|
||||
USHORT usNominalPointSize; /*Point size for which font was designed N */
|
||||
USHORT usMinimumPointSize; /*Minimum point size scaling for font N */
|
||||
USHORT usMaximumPointSize; /*Maximum point size scaling for font N */
|
||||
USHORT fsType; /*Type indicators (see #defines) B */
|
||||
USHORT fsDefn; /*Font definition data (see #defines) B */
|
||||
USHORT fsSelection; /*Font selection flags (see #defines) B */
|
||||
USHORT fsCapabilities; /*Font capabilities must be 0 B */
|
||||
LONG lSubscriptXSize; /*Size in x-direction of subscript N */
|
||||
LONG lSubscriptYSize; /*Size in y-direction of subscript N */
|
||||
LONG lSubscriptXOffset; /*Offset in x-direction of subscript N */
|
||||
LONG lSubscriptYOffset; /*Offset in y-direction of subscript N */
|
||||
LONG lSuperscriptXSize; /*Size in x-direction of superscript N */
|
||||
LONG lSuperscriptYSize; /*Size in y-direction of superscript N */
|
||||
LONG lSuperscriptXOffset; /*Offset in x-direction of superscript N */
|
||||
LONG lSuperscriptYOffset; /*Offset in y-direction of superscript N */
|
||||
LONG lUnderscoreSize; /*Underscore size N */
|
||||
LONG lUnderscorePosition; /*Underscore position N */
|
||||
LONG lStrikeoutSize; /*Strikeout size N */
|
||||
LONG lStrikeoutPosition; /*Strikeout position N */
|
||||
SHORT cKerningPairs; /*Number of kerning pairs in pair table I */
|
||||
ULONG ulFontClass; /*IBM font classification B */
|
||||
} IFIMETRICS;
|
||||
typedef IFIMETRICS FAR *PIFIMETRICS;
|
||||
#if defined(__IBMCPP__) || defined(__IBMC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma Align_members()
|
||||
#endif
|
||||
|
||||
#endif
|
||||
79
contrib/ftos2/ifi/32pmifi.h
Normal file
79
contrib/ftos2/ifi/32pmifi.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*********************************************************************\
|
||||
* Module Name: 32PMIFI.H
|
||||
*
|
||||
* OS/2 Intelligent Font Interface
|
||||
*
|
||||
* Copyright (c) 1989,1994 IBM Corporation
|
||||
* Copyright (c) 1989 Microsoft Corporation
|
||||
*
|
||||
\*********************************************************************/
|
||||
#ifndef __32PMIFI_H__
|
||||
#define __32PMIFI_H__
|
||||
|
||||
#define INCL_IFD
|
||||
|
||||
typedef PVOID HFF; /* Font file handle */
|
||||
typedef PVOID HFC; /* Font context handle */
|
||||
|
||||
#ifndef INCL_GRE_FONTS
|
||||
typedef ULONG GLYPH; /* gi */
|
||||
typedef ULONG *PGLYPH; /* pgi */
|
||||
#endif
|
||||
|
||||
#include "32fdstrc.h" /* Font Driver structures */
|
||||
#include "32ifimet.h" /* Pifi Metrics */
|
||||
#include "32fddef.h" /* Font Driver entry definitions */
|
||||
|
||||
|
||||
typedef struct _FDDISPATCH16 { /* fdisp */
|
||||
PVOID FdLoadFontFile;
|
||||
PVOID FdQueryFaces;
|
||||
PVOID FdUnloadFontFile;
|
||||
PVOID FdOpenFontContext;
|
||||
PVOID FdSetFontContext;
|
||||
PVOID FdCloseFontContext;
|
||||
PVOID FdQueryFaceAttr;
|
||||
PVOID FdQueryCharAttr;
|
||||
PVOID FdClaimFontFile;
|
||||
PVOID FdConvertFontFile;
|
||||
} FDDISPATCH16;
|
||||
typedef FDDISPATCH16 FAR *PFDDISPATCH16;
|
||||
|
||||
|
||||
typedef struct _FDDISPATCH { /* fdisp */
|
||||
PFDLFF FdLoadFontFile;
|
||||
PFDQF FdQueryFaces;
|
||||
PFDUFF FdUnloadFontFile;
|
||||
PFDOFC FdOpenFontContext;
|
||||
PFDSFC FdSetFontContext;
|
||||
PFDCFC FdCloseFontContext;
|
||||
PFDQFA FdQueryFaceAttr;
|
||||
PFDQCA FdQueryCharAttr;
|
||||
PFDCLF FdClaimFontFile;
|
||||
PFDCFF FdConvertFontFile;
|
||||
PFDQFF FdQueryFullFaces;
|
||||
} FDDISPATCH;
|
||||
typedef FDDISPATCH *PFDDISPATCH;
|
||||
|
||||
typedef struct _FDHEADER { /* fdhdr */
|
||||
ULONG cbLength; /* Length of FDHEADER */
|
||||
UCHAR strId[16]; /* String 'OS/2 FONT DRIVER' */
|
||||
UCHAR szTechnology[40]; /* Identifier of Font Driver technology */
|
||||
ULONG ulVersion; /* IFI version number (0x0100) */
|
||||
ULONG ufDeviceCaps; /* Capabilities of device */
|
||||
PFDDISPATCH pfddisp;
|
||||
} FDHEADER;
|
||||
|
||||
typedef FDHEADER FAR *PFDHEADER;
|
||||
|
||||
#define OK 0
|
||||
#define ERROR -1
|
||||
|
||||
#define IFI_VERSION 10
|
||||
#define IFI_VERSION20 20
|
||||
#define IFI_VERSION21 21
|
||||
|
||||
#define FD_DISPATCH_COUNT 11
|
||||
#define DISPATCHTABLE "FONT_DRIVER_DISPATCH_TABLE"
|
||||
|
||||
#endif
|
||||
10
contrib/ftos2/ifi/FreeType.def
Normal file
10
contrib/ftos2/ifi/FreeType.def
Normal file
@@ -0,0 +1,10 @@
|
||||
;LIBRARY FreeType INITGLOBAL TERMGLOBAL
|
||||
LIBRARY FreeType INITINSTANCE TERMINSTANCE
|
||||
|
||||
PROTMODE
|
||||
|
||||
DATA SINGLE SHARED READWRITE LOADONCALL
|
||||
;DATA MULTIPLE NONSHARED READWRITE LOADONCALL
|
||||
CODE LOADONCALL
|
||||
|
||||
DESCRIPTION "FreeType/2, Copyright (C) 1998 Michal Necasek"
|
||||
35
contrib/ftos2/ifi/FreeType.icc
Normal file
35
contrib/ftos2/ifi/FreeType.icc
Normal file
@@ -0,0 +1,35 @@
|
||||
# Makefile for FTIFI using IBM VisualAge C++
|
||||
#
|
||||
# Explanation of compiler switches used:
|
||||
# -C compile only, do not link
|
||||
# -Sp1 pack structures on byte boundaries (quite important)
|
||||
# -Ss accept double slash (//) comments
|
||||
# -Ge- build a DLL
|
||||
# -Rn build a subsystem DLL; means that a special C library is
|
||||
# linked and some calls cannot be used
|
||||
# -Fo<name> create object file <name>
|
||||
# -O+ optimizations on
|
||||
# -G4 optimize for 486 (should be better for my 6x86MX, produces smaller
|
||||
# code than Pentium optimization)
|
||||
# Linker switches used:
|
||||
# /DE include debug info in executable
|
||||
# /NOE no extended dictionary search
|
||||
# /E:2 exepack (for Warp 3 and higher)
|
||||
# /A:32 align pages of code on 32-byte boundaries (makes smaller file)
|
||||
# /DBGPACK pack debug info
|
||||
|
||||
# uncomment ICCR and LNKR to build a release version
|
||||
ICCR=-O+ -G4
|
||||
LNKR=/PACKC /PACKD /M /A:32 /E:2
|
||||
# uncomment ICCD and LNKD to build a debug version. Note that debug and
|
||||
# release version is not mutually exclusive in this case.
|
||||
#ICCD=-Ti+ -DDEBUG
|
||||
#ICCD=-Ti+
|
||||
#LNKD=/DE /DBGPACK /M
|
||||
|
||||
|
||||
FreeType.dll: $*.obj $*.def ..\lib\libttf.lib
|
||||
ilink /NOE $(LNKD) $(LNKR) $*.obj ..\lib\libttf.lib libconv.lib $*.def
|
||||
|
||||
FreeType.obj: ftifi.c ftifi.h FreeType.icc
|
||||
icc $(ICCD) $(ICCR) -C -Sp1 -Ss -Ge- -Rn -FoFreeType -I..\lib -I..\lib\extend -I..\lib\arch\os2 ftifi.c
|
||||
29
contrib/ftos2/ifi/FreeType.wat
Normal file
29
contrib/ftos2/ifi/FreeType.wat
Normal file
@@ -0,0 +1,29 @@
|
||||
# WARNING!! this doesn't quite work yet!!!!
|
||||
#
|
||||
# Makefile for FTIFI using Watcom C/C++
|
||||
#
|
||||
# Explanation of compiler switches used:
|
||||
# -4r register calling convention, generate 486 code. Better than
|
||||
# Pentium opt. for Cyrix/IBM and AMD
|
||||
# -otexan maximum optimization for speed
|
||||
# -zp1 pack structures on byte boundaries (quite important!)
|
||||
# -bd build a DLL
|
||||
# -zc
|
||||
# -d2 include debug info
|
||||
#
|
||||
# Important linker options used:
|
||||
# initglobal call DLL initialization function only once (not for each
|
||||
# process)
|
||||
# termglobal call DLL termination function only once
|
||||
# oneautodata use only one shared data segment
|
||||
|
||||
WCCR=-4r -otexan
|
||||
#WCCD=-d2 -DDEBUG
|
||||
#LNKD=debug all
|
||||
|
||||
|
||||
FreeType.dll: $*.obj $*.def
|
||||
wlink system os2v2 dll initglobal termglobal op oneautodata export GetOutline_ export FONT_DRIVER_DISPATCH_TABLE=_fdhdr file $* lib ..\lib\libttf.lib $(LNKD)
|
||||
|
||||
FreeType.obj: ftifi.c ftifi.h
|
||||
wcc386 $(WCCD) $(WCCR) -zp1 -bd -zc -I..\lib -I..\lib\extend ftifi.c /Fo=freetype.obj
|
||||
3209
contrib/ftos2/ifi/ftifi.c
Normal file
3209
contrib/ftos2/ifi/ftifi.c
Normal file
File diff suppressed because it is too large
Load Diff
305
contrib/ftos2/ifi/ftifi.h
Normal file
305
contrib/ftos2/ifi/ftifi.h
Normal file
@@ -0,0 +1,305 @@
|
||||
/*
|
||||
Conversion from OS/2 UGL to Unicode
|
||||
|
||||
Copyright (C) 1997 Robert Muchsel <muchsel@acm.org>
|
||||
Copyright (C) 1997,1998 Michal Necasek <mike@mendelu.cz>
|
||||
|
||||
All entries that were previously 0xFFFF were changed to 0x0000 because
|
||||
TrueType 'missing glyph' has index 0
|
||||
*/
|
||||
|
||||
#ifndef _FTIFI_H_INCLUDED_
|
||||
#define _FTIFI_H_INCLUDED_
|
||||
|
||||
/* Platform-specific Encoding IDs for MS platform */
|
||||
#define PSEID_SYMBOL 0
|
||||
#define PSEID_UNICODE 1
|
||||
#define PSEID_SHIFTJIS 2
|
||||
#define PSEID_BIG5 3
|
||||
#define PSEID_PRC 4
|
||||
#define PSEID_WANSUNG 5
|
||||
#define PSEID_JOHAB 6
|
||||
/* defined by me! */
|
||||
#define PSEID_PM383 100
|
||||
|
||||
/* bit masks for determining supported codepages */
|
||||
#define OS2_CP1_ANSI_OEM_JAPANESE_JIS (1 << 17)
|
||||
#define OS2_CP1_ANSI_OEM_CHINESE_SIMPLIFIED (1 << 18)
|
||||
#define OS2_CP1_ANSI_OEM_CHINESE_TRADITIONAL (1 << 19)
|
||||
#define OS2_CP1_ANSI_OEM_KOREAN_WANSUNG (1 << 20)
|
||||
#define OS2_CP1_ANSI_OEM_KOREAN_JOHAB (1 << 21)
|
||||
|
||||
/* defines for character translation */
|
||||
/* from Unicode to UGL */
|
||||
#define TRANSLATE_UGL 0
|
||||
/* Symbol - no translation */
|
||||
#define TRANSLATE_SYMBOL 1
|
||||
/* Unicode - no translation */
|
||||
#define TRANSLATE_UNICODE 2
|
||||
/* Big5 - no translation */
|
||||
#define TRANSLATE_BIG5 4
|
||||
/* ShiftJIS - no translation */
|
||||
#define TRANSLATE_SJIS 5
|
||||
/* from Unicode to Big5 */
|
||||
#define TRANSLATE_UNI_BIG5 16
|
||||
/* from Unicode to ShiftJIS */
|
||||
#define TRANSLATE_UNI_SJIS 17
|
||||
|
||||
|
||||
#define MAX_GLYPH 504
|
||||
/* I suppose more than 949 is never used */
|
||||
/* 504 should be OK for (most) European and American countries */
|
||||
|
||||
#ifndef USE_UCONV
|
||||
static const int UGL2Uni[MAX_GLYPH + 1] = {
|
||||
|
||||
/* PM383 UGL mapping */
|
||||
|
||||
/* 0..9 */
|
||||
0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25d8, 0x25cb,
|
||||
/* 10..19 */
|
||||
0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, 0x25ba, 0x25c4, 0x2195, 0x203c,
|
||||
/* 20..29 */
|
||||
0xb6, 0xa7, 0x25ac, 0x21a8, 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194,
|
||||
/* 30..39 */
|
||||
0x25b2, 0x25bc, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
|
||||
/* 40..49 */
|
||||
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31,
|
||||
/* 50..59 */
|
||||
0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
|
||||
/* 60..69 */
|
||||
0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
|
||||
/* 70..79 */
|
||||
0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
/* 80..89 */
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
|
||||
/* 90..99 */
|
||||
0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63,
|
||||
/* 100..109 */
|
||||
0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d,
|
||||
/* 110..119 */
|
||||
0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||
/* 120..129 */
|
||||
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x2302, 0xc7, 0xfc,
|
||||
/* 130..139 */
|
||||
0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, 0xea, 0xeb, 0xe8, 0xef,
|
||||
/* 140..149 */
|
||||
0xee, 0xec, 0xc4, 0xc5, 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2,
|
||||
/* 150..159 */
|
||||
0xfb, 0xf9, 0xff, 0xd6, 0xdc, 0xf8, 0xa3, 0xd8, 0xd7, 0x192,
|
||||
/* 160..169 */
|
||||
0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, 0xbf, 0xae,
|
||||
/* 170..179 */
|
||||
0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, 0x2591, 0x2592, 0x2593, 0x2502,
|
||||
/* 180..189 */
|
||||
0x2524, 0xc1, 0xc2, 0xc0, 0xa9, 0x2563, 0x2551, 0x2557, 0x255d, 0xa2,
|
||||
/* 190..199 */
|
||||
0xa5, 0x2510, 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0xe3, 0xc3,
|
||||
/* 200..209 */
|
||||
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, 0xf0, 0xd0,
|
||||
/* 210..219 */
|
||||
0xca, 0xcb, 0xc8, 0x131, 0xcd, 0xce, 0xcf, 0x2518, 0x250c, 0x2588,
|
||||
/* 220..229 */
|
||||
0x2584, 0xa6, 0xcc, 0x2580, 0xd3, 0xdf, 0xd4, 0xd2, 0xf5, 0xd5,
|
||||
/* 230..239 */
|
||||
0xb5, 0xfe, 0xde, 0xda, 0xdb, 0xd9, 0xfd, 0xdd, 0xaf, 0xb4,
|
||||
/* 240..249 */
|
||||
0xad, 0xb1, 0x2017, 0xbe, 0xb6, 0xa7, 0xf7, 0xb8, 0xb0, 0xa8,
|
||||
/* 250..259 */
|
||||
0xb7, 0xb9, 0xb3, 0xb2, 0x25a0, 0xa0, 0x20a7, 0x2310, 0x2561, 0x2562,
|
||||
/* 260..269 */
|
||||
0x2556, 0x2555, 0x255c, 0x255b, 0x255e, 0x255f, 0x2567, 0x2568, 0x2564, 0x2565,
|
||||
/* 270..279 */
|
||||
0x2559, 0x2558, 0x2552, 0x2553, 0x256b, 0x256a, 0x258c, 0x2590, 0x3b1, 0x393,
|
||||
/* 280..289 */
|
||||
0x3c0, 0x3a3, 0x3c3, 0x3c4, 0x3a6, 0x398, 0x3a9, 0x3b4, 0x221e, 0x3c6,
|
||||
/* 290..299 */
|
||||
0x3b5, 0x2229, 0x2261, 0x2265, 0x2264, 0x2320, 0x2321, 0x2248, 0x2219, 0x221a,
|
||||
/* 300..309 */
|
||||
0x207f, 0x2c9, 0x2d8, 0x2d9, 0x2da, 0x2dd, 0x2db, 0x2c7, 0x2018, 0x2019,
|
||||
/* 310..318*/
|
||||
0x201c, 0x201d, 0x2013, 0x2014, 0x2c6, 0x2dc, 0x201a, 0x201e, 0x2026,
|
||||
|
||||
/* 319..329 */
|
||||
0x2020, 0x2021, 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0x303, 0x2122, 0x161, 0x203a,
|
||||
/* 330..339 */
|
||||
0x153, 0x178, 0x11f, 0x11e, 0x130, 0x15f, 0x15e, 0x103, 0x102, 0x105,
|
||||
/* 340..349 */
|
||||
0x104, 0x107, 0x106, 0x10d, 0x10c, 0x10f, 0x10e, 0x111, 0x11b, 0x11a,
|
||||
/* 350..359 */
|
||||
0x119, 0x118, 0x13a, 0x139, 0x13e, 0x13d, 0x142, 0x141, 0x144, 0x143,
|
||||
/* 360..369 */
|
||||
0x148, 0x147, 0x151, 0x150, 0x155, 0x154, 0x159, 0x158, 0x15b, 0x15a,
|
||||
/* 370..379 */
|
||||
0x165, 0x164, 0x163, 0x162, 0x171, 0x170, 0x16f, 0x16e, 0x17a, 0x179,
|
||||
/* 380..383 */
|
||||
0x17e, 0x17d, 0x17c, 0x17b,
|
||||
|
||||
/* I don't know whether the following are used by PM, but they are in
|
||||
the I18N unicode library */
|
||||
/* yes they ARE used (for Cyrillic systems) */
|
||||
|
||||
/* 384..389 */
|
||||
0x401, 0x402, 0x403, 0x404, 0x405, 0x406,
|
||||
/* 390..399 */
|
||||
0x407, 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0x40e, 0x40f, 0x410, 0x411,
|
||||
/* 400..409 */
|
||||
0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41a, 0x41b,
|
||||
/* 410..419 */
|
||||
0x41c, 0x41d, 0x41e, 0x41f, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425,
|
||||
/* 420..429 */
|
||||
0x426, 0x427, 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f,
|
||||
/* 430..439 */
|
||||
0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439,
|
||||
/* 440..449 */
|
||||
0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, 0x440, 0x441, 0x442, 0x443,
|
||||
/* 450..459 */
|
||||
0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d,
|
||||
/* 460..469 */
|
||||
0x44e, 0x44f, 0x2116, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457,
|
||||
/* 470..479 */
|
||||
0x458, 0x459, 0x45a, 0x45b, 0x45c, 0x45e, 0x45f, 0x490, 0x491, 0x156,
|
||||
/* 480..489 */
|
||||
0x12e, 0x100, 0x112, 0x116, 0x122, 0x136, 0x12a, 0x1eb, 0x145, 0x14c,
|
||||
/* 490..499 */
|
||||
0x172, 0x16a, 0x157, 0x12f, 0x101, 0x113, 0x117, 0x123, 0x137, 0x12b,
|
||||
/* 500..504 */
|
||||
0x13c, 0x146, 0x14d, 0x173, 0x16b
|
||||
|
||||
#if MAX_GLYPH > 504
|
||||
, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 510..519 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 520..529 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 530..539 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 540..549 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 550..559 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 560..569 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 570..579 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 580..589 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 590..599 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 600..609 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 610..619 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 620..629 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 630..639 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 640..649 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 650..659 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 660..669 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 670..679 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 680..689 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 690..699 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 700..709 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 710..719 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 720..729 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 730..739 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 740..749 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 750..759 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 760..769 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x303f, 0x21b5,
|
||||
/* 770..779 */
|
||||
0x3002, 0x300c, 0x300d, 0x3001, 0x0000, 0x30f2, 0x30a1, 0x30a3, 0x30a5, 0x30a7,
|
||||
/* 780..789 */
|
||||
0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, 0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8,
|
||||
/* 790..799 */
|
||||
0x30aa, 0x30ab, 0x30ad, 0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, 0x30bb,
|
||||
/* 800..809 */
|
||||
0x30bd, 0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, 0x30cb, 0x30cc, 0x30cd,
|
||||
/* 810..819 */
|
||||
0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, 0x30db, 0x30de, 0x30df, 0x30e0, 0x30e1,
|
||||
/* 820..829 */
|
||||
0x30e2, 0x30e4, 0x30e6, 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef,
|
||||
/* 830..839 */
|
||||
0x30f3, 0x309b, 0x309c, 0x3041, 0x3043, 0x3045, 0x3047, 0x3049, 0x3083, 0x3085,
|
||||
/* 840..849 */
|
||||
0x3049, 0x3063, 0x3042, 0x3044, 0x3046, 0x3048, 0x304a, 0x304b, 0x304d, 0x304f,
|
||||
/* 850..859 */
|
||||
0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305b, 0x305d, 0x305f, 0x3061, 0x3064,
|
||||
/* 860..869 */
|
||||
0x3066, 0x3068, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3072, 0x3075,
|
||||
/* 870..879 */
|
||||
0x3078, 0x307b, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088,
|
||||
/* 880..889 */
|
||||
0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308f, 0x3092, 0x3093, 0x300e, 0x300f,
|
||||
/* 890..899 */
|
||||
0x30f6, 0x3005, 0x0000, 0x0000, 0x0000, 0x0000, 0x3131, 0x3132, 0x3133, 0x3134,
|
||||
/* 900..909 */
|
||||
0x3135, 0x3136, 0x3137, 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e,
|
||||
/* 910..919 */
|
||||
0x313f, 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
|
||||
/* 920..929 */
|
||||
0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150, 0x3151, 0x3152,
|
||||
/* 930..939 */
|
||||
0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159, 0x315a, 0x315b, 0x315c,
|
||||
/* 940..949 */
|
||||
0x315d, 0x315e, 0x315f, 0x3160, 0x3161, 0x3162, 0x3163, 0x20a9, 0x0000, 0x3164,
|
||||
/* 950..959 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 960..969 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 970..979 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 980..989 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 990..999 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 1000..1009 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 1010..1019 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
/* 1020..1023 */
|
||||
0x0000, 0x0000, 0x0000, 0x0000
|
||||
#endif /* MAX_GLYHP > 504 */
|
||||
};
|
||||
|
||||
|
||||
/* on Greek systems, the UGL is a bit different */
|
||||
/* and changes the entries 319-383 inclusive */
|
||||
|
||||
/* # of Greek glyphs in UGL */
|
||||
#define GREEK_GLYPHS 65
|
||||
/* start of Greek glyphs in UGL */
|
||||
#define GREEK_START 319
|
||||
|
||||
static const int SubUGLGreek[GREEK_GLYPHS] = {
|
||||
/* 319..328 */
|
||||
0x0391, 0x0392, 0x0395, 0x0396, 0x0397, 0x0399, 0x039a, 0x039c, 0x039d, 0x039f,
|
||||
/* 329..338 */
|
||||
0x03a1, 0x03a4, 0x03a5, 0x03a7, 0x03b7, 0x03bd, 0x03c7, 0x03bf, 0x0384, 0x0308,
|
||||
/* 339..348 */
|
||||
0x0385, 0x0390, 0x0020, 0x00A6, 0x0386, 0x0388, 0x0389, 0x038a, 0x038c, 0x038e,
|
||||
/* 349..358 */
|
||||
0x038f, 0x0394, 0x0398, 0x039b, 0x039e, 0x03a0, 0x03a8, 0x03aa, 0x03ab, 0x03ac,
|
||||
/* 359..368 */
|
||||
0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b2, 0x03b3, 0x03b6, 0x03b8, 0x03b9, 0x03ba,
|
||||
/* 369..378 */
|
||||
0x03bb, 0x03bc, 0x03be, 0x03c1, 0x03c2, 0x03c5, 0x03c6, 0x03c8, 0x03c9, 0x03ca,
|
||||
/* 379..383 */
|
||||
0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000
|
||||
};
|
||||
#endif /* USE_UCONV */
|
||||
|
||||
#endif /* _FTIFI_H_INCLUDED_ */
|
||||
184
contrib/ftos2/ifi/ftmem.c
Normal file
184
contrib/ftos2/ifi/ftmem.c
Normal file
@@ -0,0 +1,184 @@
|
||||
/* */
|
||||
/* ** This is part of the FreeType/2 project! ** */
|
||||
/* A small utility to display online memory usage stats for FreeType/2 */
|
||||
/* */
|
||||
/* The method used to keep the window float on top may be completely */
|
||||
/* stupid but I found no other way (except putting WinSetWindowPos() */
|
||||
/* in the timer code which looks odd). */
|
||||
/* */
|
||||
/* Copyright (C) 1998 by M. Necasek */
|
||||
|
||||
#define INCL_DOSMISC
|
||||
#define INCL_WINTIMER
|
||||
#define INCL_PM
|
||||
#include <os2.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define ID_TIMER 42
|
||||
#define IDM_FLOAT 155
|
||||
|
||||
|
||||
/* name of shared memory used for memory usage reporting */
|
||||
#define MEM_NAME "\\sharemem\\freetype"
|
||||
|
||||
typedef struct _INFOSTRUCT {
|
||||
ULONG signature; /* signature (0x46524545, 'FREE') */
|
||||
ULONG used; /* bytes actually used */
|
||||
ULONG maxused; /* maximum amount ever used */
|
||||
ULONG num_err; /* number of (de)allocation errors */
|
||||
} INFOSTRUCT, *PINFOSTRUCT;
|
||||
|
||||
/* structure (in named shared memory) pointing to the above struct */
|
||||
typedef struct _INFOPTR {
|
||||
PINFOSTRUCT address; /* pointer to actual memory info */
|
||||
} INFOPTR, *PINFOPTR;
|
||||
|
||||
HAB hab;
|
||||
HWND hwndFrame;
|
||||
PINFOSTRUCT meminfo;
|
||||
PINFOPTR memptr;
|
||||
ULONG bFloat = TRUE;
|
||||
HWND hwndSysSubmenu;
|
||||
|
||||
VOID AddFloat(HWND hwndFrame) {
|
||||
MENUITEM mi;
|
||||
HWND hwndSysMenu;
|
||||
SHORT sMenuID;
|
||||
|
||||
/* add Float option to system menu */
|
||||
hwndSysMenu = WinWindowFromID(hwndFrame, FID_SYSMENU);
|
||||
sMenuID = (SHORT)WinSendMsg(hwndSysMenu, MM_ITEMIDFROMPOSITION,
|
||||
MPFROMSHORT(0), MPVOID);
|
||||
WinSendMsg(hwndSysMenu, MM_QUERYITEM, MPFROMSHORT(sMenuID),
|
||||
MPFROMP(&mi));
|
||||
hwndSysSubmenu = mi.hwndSubMenu;
|
||||
mi.iPosition = MIT_END;
|
||||
mi.afStyle = MIS_SEPARATOR;
|
||||
mi.afAttribute = 0;
|
||||
mi.id = -1;
|
||||
mi.hwndSubMenu = 0;
|
||||
mi.hItem = 0;
|
||||
WinSendMsg(hwndSysSubmenu, MM_INSERTITEM, MPFROMP (&mi), NULL);
|
||||
mi.afStyle = MIS_TEXT;
|
||||
mi.afAttribute = MIA_CHECKED;
|
||||
mi.id = IDM_FLOAT;
|
||||
WinSendMsg(hwndSysSubmenu, MM_INSERTITEM, MPFROMP (&mi), "~Float on top");
|
||||
}
|
||||
|
||||
MRESULT EXPENTRY ClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
||||
{
|
||||
HPS hps;
|
||||
RECTL rcl;
|
||||
static ULONG i = 1;
|
||||
ULONG ulMem;
|
||||
char szBuf[200];
|
||||
|
||||
switch (msg) {
|
||||
case WM_CREATE:
|
||||
/* use smaller text */
|
||||
WinSetPresParam(hwnd, PP_FONTNAMESIZE, 7, (PVOID)"8.Helv");
|
||||
/* start the timer (ticks each 0.5 sec.) */
|
||||
AddFloat(WinQueryWindow(hwnd, QW_PARENT));
|
||||
WinStartTimer(hab, hwnd, ID_TIMER, 500);
|
||||
break;
|
||||
|
||||
/* make window always stay on top (if desired) */
|
||||
case WM_VRNENABLED:
|
||||
if (bFloat)
|
||||
WinSetWindowPos(hwndFrame, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER);
|
||||
break;
|
||||
|
||||
case WM_COMMAND: /* why doesn't WM_SYSCOMMAND work? */
|
||||
if (LOUSHORT(mp1) == IDM_FLOAT) {
|
||||
bFloat = !bFloat;
|
||||
WinCheckMenuItem(hwndSysSubmenu, IDM_FLOAT, bFloat);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
if (++i > 13)
|
||||
i = 1;
|
||||
WinInvalidateRect(hwnd, NULL, FALSE);
|
||||
return FALSE;
|
||||
|
||||
case WM_PAINT:
|
||||
hps = WinBeginPaint(hwnd, NULLHANDLE, &rcl);
|
||||
/* necessary to avoid incorrectly repainting window */
|
||||
WinQueryWindowRect(hwnd, &rcl);
|
||||
|
||||
/* sprintf(szBuf, " Current use %dK Maximum ever used %dK Errors %d",
|
||||
meminfo->used / 1024,
|
||||
meminfo->maxused / 1024, meminfo->num_err);*/
|
||||
sprintf(szBuf, " Current use %dB Maximum ever used %dK Errors %d",
|
||||
meminfo->used,
|
||||
meminfo->maxused / 1024, meminfo->num_err);
|
||||
WinDrawText(hps, -1, szBuf, &rcl, CLR_BLACK, CLR_WHITE,
|
||||
DT_CENTER | DT_VCENTER | DT_ERASERECT);
|
||||
|
||||
WinEndPaint(hps);
|
||||
break;
|
||||
}
|
||||
|
||||
return WinDefWindowProc(hwnd, msg, mp1, mp2);
|
||||
}
|
||||
|
||||
void main (void)
|
||||
{
|
||||
QMSG qmsg;
|
||||
HMQ hmq;
|
||||
HWND hwndClient;
|
||||
ULONG flFrameFlags;
|
||||
|
||||
WinInitialize(0);
|
||||
hmq = WinCreateMsgQueue(hab, 0);
|
||||
|
||||
/* get access to shared memory */
|
||||
DosGetNamedSharedMem((PVOID*)&memptr, MEM_NAME, PAG_READ);
|
||||
if (!memptr)
|
||||
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
|
||||
" FreeType/2 is not running!",
|
||||
"Error", 0, MB_OK | MB_ERROR);
|
||||
|
||||
else {
|
||||
meminfo = memptr->address;
|
||||
if (meminfo->signature != 0x46524545)
|
||||
WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
|
||||
" FreeType/2 is not running!",
|
||||
"Error", 0, MB_OK | MB_ERROR);
|
||||
else {
|
||||
flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU |
|
||||
FCF_TASKLIST ;
|
||||
|
||||
WinRegisterClass(hab, "MyClass",
|
||||
(PFNWP) ClientWndProc,
|
||||
CS_SIZEREDRAW, 0);
|
||||
|
||||
hwndFrame = WinCreateStdWindow(HWND_DESKTOP,
|
||||
WS_VISIBLE,
|
||||
&flFrameFlags,
|
||||
"MyClass", "FreeType/2 Heap Usage",
|
||||
0, (HMODULE) NULL,
|
||||
0, &hwndClient);
|
||||
|
||||
WinSetVisibleRegionNotify(hwndClient, TRUE);
|
||||
|
||||
/* make titlebar text look better */
|
||||
WinSetPresParam(WinWindowFromID(hwndFrame, FID_TITLEBAR),
|
||||
PP_FONTNAMESIZE, 9, (PVOID)"8.Helv");
|
||||
|
||||
WinSetWindowPos(hwndFrame, NULLHANDLE, 0, 0, 350, 42,
|
||||
SWP_MOVE | SWP_SIZE | SWP_SHOW);
|
||||
|
||||
while (WinGetMsg(hab, &qmsg, (HWND) NULL, 0, 0))
|
||||
WinDispatchMsg(hab, &qmsg);
|
||||
|
||||
WinSetVisibleRegionNotify(hwndClient, FALSE);
|
||||
}
|
||||
}
|
||||
/* free shared memory block */
|
||||
DosFreeMem(memptr);
|
||||
|
||||
WinDestroyWindow(hwndFrame);
|
||||
WinDestroyMsgQueue(hmq);
|
||||
WinTerminate(hab);
|
||||
}
|
||||
4
contrib/ftos2/ifi/ftmem.icc
Normal file
4
contrib/ftos2/ifi/ftmem.icc
Normal file
@@ -0,0 +1,4 @@
|
||||
ftmem.exe: $*.obj
|
||||
ilink /PM:PM /ST:0x8000 /BAS:0x10000 /E:2 /A:4 $*.obj
|
||||
ftmem.obj: $*.c
|
||||
icc -C $*.c
|
||||
BIN
contrib/ftos2/ifi/ftmem.ico
Normal file
BIN
contrib/ftos2/ifi/ftmem.ico
Normal file
Binary file not shown.
238
contrib/ftos2/ifi/test.c
Normal file
238
contrib/ftos2/ifi/test.c
Normal file
@@ -0,0 +1,238 @@
|
||||
|
||||
#include <os2.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "32pmifi.h"
|
||||
|
||||
//#define USE_ORIG
|
||||
#ifdef USE_ORIG
|
||||
#pragma import (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", "TRUETYPE", 0)
|
||||
#else
|
||||
#if defined USE_ATM
|
||||
#pragma import (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", "PMATM", 0)
|
||||
#else
|
||||
#pragma import (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", "FREETYPE", 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern FDHEADER fdhdr;
|
||||
|
||||
char *fontnames[20] = {
|
||||
"G:\\OS2\\MDOS\\WINOS2\\SYSTEM\\SYMBOL.TTF",
|
||||
"G:\\OS2\\MDOS\\WINOS2\\SYSTEM\\WINGDING.TTF",
|
||||
"G:\\PSFONTS\\ARIALB.ttf",
|
||||
"G:\\PSFONTS\\ARIALI.ttf",
|
||||
"G:\\PSFONTS\\ARIALZ.ttf",
|
||||
"G:\\PSFONTS\\COUR.TTF",
|
||||
"G:\\PSFONTS\\COURB.TTF",
|
||||
"G:\\PSFONTS\\COURI.TTF",
|
||||
"G:\\PSFONTS\\COURZ.TTF",
|
||||
"G:\\PSFONTS\\ARIAL.ttf",
|
||||
"G:\\PSFONTS\\TIMESB.TTF",
|
||||
"G:\\PSFONTS\\TIMESI.ttf",
|
||||
"G:\\PSFONTS\\TIMESZ.ttf",
|
||||
"G:\\PSFONTS\\TIMES.TTF",
|
||||
"G:\\PSFONTS\\ARIBLK.ttf",
|
||||
"G:\\CHINESE\\AVSV.TTF",
|
||||
"G:\\CHINESE\\MINGLI.TTC",
|
||||
"D:\\PSFONTS\\TNRMT30.TTF"
|
||||
};
|
||||
|
||||
#define FNTNAME1 "\\PSFONTS\\TIMES.TTF"
|
||||
#ifdef USE_ATM
|
||||
#define FNTNAME2 "\\PSFONTS\\helv.ofm"
|
||||
#else
|
||||
#define FNTNAME2 "\\PSFONTS\\symbol.tTf"
|
||||
#endif
|
||||
|
||||
#define BUFSIZE 32768
|
||||
|
||||
void ShowChar(PCHARATTR pca, PBITMAPMETRICS pbmm) {
|
||||
int i, j;
|
||||
int bufwidth = ((pbmm->sizlExtent.cx + 31) & -32) / 8;
|
||||
|
||||
for (i =0; i < pbmm->sizlExtent.cy; i++) {
|
||||
for (j = 0; j < bufwidth * 8; j++)
|
||||
if (pca->pBuffer[i * bufwidth + j / 8] & (1 << (7-(j % 8))))
|
||||
printf("*");
|
||||
else
|
||||
printf(" ");
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void main(int argc, char **argv)
|
||||
{
|
||||
char fname[260];
|
||||
PFDDISPATCH pfdisp;
|
||||
LONG rc;
|
||||
HFF hff, hff2; /* font file */
|
||||
HFC hfc, hfc2; /* font context */
|
||||
static IFIMETRICS ifimet[12]; /* IFI metrics */
|
||||
CONTEXTINFO ci;
|
||||
CHARATTR charattr; /* character attributes */
|
||||
BITMAPMETRICS bmm; /* bit-map metrics */
|
||||
PBYTE buf;
|
||||
int glyph = 0, i, j;
|
||||
int numFaces;
|
||||
int faceIndex = 0;
|
||||
|
||||
switch (argc) {
|
||||
case 4:
|
||||
strcpy(fname, argv[1]);
|
||||
glyph = atoi(argv[2]);
|
||||
faceIndex = atoi(argv[3]);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
glyph = atoi(argv[1]);
|
||||
case 1:
|
||||
strcpy(fname, FNTNAME1);
|
||||
break;
|
||||
|
||||
default:
|
||||
strcpy(fname, argv[1]);
|
||||
glyph = atoi(argv[2]);
|
||||
}
|
||||
|
||||
buf = (PBYTE)malloc(BUFSIZE);
|
||||
if (strncmp("OS/2 FONT DRIVER", fdhdr.strId, 16)) {
|
||||
printf("Invalid Font Driver\n");
|
||||
return;
|
||||
}
|
||||
printf("Font Driver OK, ");
|
||||
printf("Version %d\n", fdhdr.ulVersion);
|
||||
printf("Technology: %s\n", fdhdr.szTechnology);
|
||||
|
||||
hff = fdhdr.pfddisp->FdLoadFontFile(fname);
|
||||
printf("Loading font... HFF = %X\n", hff);
|
||||
if (hff == (HFF)0xFFFFFFFF)
|
||||
return;
|
||||
|
||||
/* rc = fdhdr.pfddisp->FdConvertFontFile("G:\\PSFONTS\\TIMES.TTF",
|
||||
"G:\\PSFONTS", buf); */
|
||||
|
||||
#if 0
|
||||
for (i = 0; i < 18; i++) {
|
||||
hff = fdhdr.pfddisp->FdLoadFontFile(fontnames[i]);
|
||||
if (hff == (HFF)-1) {
|
||||
printf("x");
|
||||
continue;
|
||||
}
|
||||
numFaces = fdhdr.pfddisp->FdQueryFaces(hff, NULL, 0, -1, 0);
|
||||
if (numFaces < 0) {
|
||||
printf("x");
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < numFaces; j++) {
|
||||
rc = fdhdr.pfddisp->FdQueryFaces(hff, &ifimet[0], 238, 1, j);
|
||||
if (rc < 0) {
|
||||
printf("x");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff);
|
||||
if (rc)
|
||||
printf("x");
|
||||
else
|
||||
printf(".");
|
||||
}
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
hff = fdhdr.pfddisp->FdLoadFontFile(FNTNAME2);
|
||||
hff = fdhdr.pfddisp->FdLoadFontFile(fname);
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff);
|
||||
|
||||
hff = fdhdr.pfddisp->FdLoadFontFile(fname);
|
||||
printf("Loading font... HFF = %X\n", hff);
|
||||
if (hff == (HFF)0xFFFFFFFF)
|
||||
return;
|
||||
numFaces = fdhdr.pfddisp->FdQueryFaces(hff, NULL, 0, -1, 0);
|
||||
printf("Number of faces = %d\n", numFaces);
|
||||
rc = fdhdr.pfddisp->FdQueryFaces(hff, &ifimet[0], sizeof(IFIMETRICS), numFaces, 0);
|
||||
printf("Querying faces... RC = %X\n", rc);
|
||||
hfc = fdhdr.pfddisp->FdOpenFontContext(hff, faceIndex);
|
||||
printf("Opening context... HFC = %X\n", hfc);
|
||||
if (hfc == (HFC)0xFFFFFFFF) {
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff);
|
||||
printf("Unloading font... RC = %X\n", rc);
|
||||
}
|
||||
ci.cb = sizeof(ci);
|
||||
ci.fl = 0;
|
||||
/* ci.sizlPPM.cx = 3618;
|
||||
ci.sizlPPM.cy = 3622;
|
||||
ci.pfxSpot.x = 46340;
|
||||
ci.pfxSpot.y = 46340;
|
||||
ci.matXform.eM11 = 511;
|
||||
ci.matXform.eM12 = 0;
|
||||
ci.matXform.eM21 = 0;
|
||||
ci.matXform.eM22 = 511; */
|
||||
ci.sizlPPM.cx = 3622;
|
||||
ci.sizlPPM.cy = 3622;
|
||||
ci.pfxSpot.x = 46340;
|
||||
ci.pfxSpot.y = 46340;
|
||||
ci.matXform.eM11 = 768;
|
||||
ci.matXform.eM12 = 0;
|
||||
ci.matXform.eM21 = 0;
|
||||
ci.matXform.eM22 = 768;
|
||||
|
||||
rc = fdhdr.pfddisp->FdQueryFaceAttr(hfc, FD_QUERY_ABC_WIDTHS, buf,
|
||||
sizeof(ABC_TRIPLETS), NULL, glyph);
|
||||
printf("Querying face attrs... RC = %d\n", rc);
|
||||
rc = fdhdr.pfddisp->FdQueryFaceAttr(hfc, FD_QUERY_KERNINGPAIRS, buf,
|
||||
ifimet[0].cKerningPairs * sizeof(FD_KERNINGPAIRS),
|
||||
NULL, 0);
|
||||
|
||||
|
||||
rc = fdhdr.pfddisp->FdSetFontContext(hfc, &ci);
|
||||
printf("Setting context... rc = %X\n", rc);
|
||||
|
||||
charattr.cb = sizeof(charattr);
|
||||
charattr.iQuery = FD_QUERY_BITMAPMETRICS | FD_QUERY_CHARIMAGE;
|
||||
// charattr.iQuery = FD_QUERY_OUTLINE;
|
||||
charattr.gi = glyph;
|
||||
charattr.pBuffer = buf;
|
||||
charattr.cbLen = BUFSIZE;
|
||||
if (rc == -1)
|
||||
return;
|
||||
rc = fdhdr.pfddisp->FdQueryCharAttr(hfc, &charattr, &bmm);
|
||||
printf("Querying char attrs... bytes = %d\n", rc);
|
||||
ShowChar(&charattr, &bmm);
|
||||
|
||||
// rc = fdhdr.pfddisp->FdQueryCharAttr(hfc, &charattr, &bmm, NULL);
|
||||
// printf("Querying char attrs... bytes = %d\n", rc);
|
||||
|
||||
hff2 = fdhdr.pfddisp->FdLoadFontFile(FNTNAME2);
|
||||
printf("Loading font... HFF = %X\n", hff2);
|
||||
if (hff2 == (HFF)0xFFFFFFFF)
|
||||
return;
|
||||
|
||||
charattr.cbLen = 0;
|
||||
rc = fdhdr.pfddisp->FdQueryCharAttr(hfc, &charattr, &bmm);
|
||||
printf("Querying char attrs... bytes = %d\n", rc);
|
||||
rc = fdhdr.pfddisp->FdQueryFaces(hff2, &ifimet[0], sizeof(ifimet), 1, 0);
|
||||
printf("Querying faces... RC = %X\n", rc);
|
||||
hfc2 = fdhdr.pfddisp->FdOpenFontContext(hff2, 0);
|
||||
printf("Opening context... HFC = %X\n", hfc2);
|
||||
if (hfc2 == (HFC)0xFFFFFFFF) {
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff2);
|
||||
printf("Unloading font... RC = %X\n", rc);
|
||||
}
|
||||
rc = fdhdr.pfddisp->FdCloseFontContext(hfc);
|
||||
printf("Closing context... RC = %X\n", rc);
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff);
|
||||
printf("Unloading font... RC = %X\n", rc);
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff);
|
||||
printf("Unloading font... RC = %X\n", rc);
|
||||
|
||||
rc = fdhdr.pfddisp->FdCloseFontContext(hfc2);
|
||||
printf("Closing context... RC = %X\n", rc);
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff2);
|
||||
printf("Unloading font... RC = %X\n", rc);
|
||||
rc = fdhdr.pfddisp->FdUnloadFontFile(hff2);
|
||||
printf("Unloading font... RC = %X\n", rc);
|
||||
}
|
||||
6
contrib/ftos2/ifi/test.icc
Normal file
6
contrib/ftos2/ifi/test.icc
Normal file
@@ -0,0 +1,6 @@
|
||||
test.exe: $*.obj freetype.lib
|
||||
ilink /DE /PM:VIO /ST:0x1000 $*.obj freetype.lib
|
||||
test.obj: $*.c
|
||||
icc -Ti+ -C -Ss -Sp1 $*.c
|
||||
freetype.lib: $*.dll
|
||||
implib $*.lib $*.dll
|
||||
4
contrib/ftos2/ifi/test.wat
Normal file
4
contrib/ftos2/ifi/test.wat
Normal file
@@ -0,0 +1,4 @@
|
||||
test.exe: $*.obj
|
||||
wlink file $*.obj lib freetype.lib import _fdhdr freetype.FONT_DRIVER_DISPATCH_TABLE
|
||||
test.obj: $*.c
|
||||
wcc386 -d2 -zp1 $*.c
|
||||
30
contrib/ftos2/install.cmd
Normal file
30
contrib/ftos2/install.cmd
Normal file
@@ -0,0 +1,30 @@
|
||||
/* */
|
||||
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
|
||||
call SysLoadFuncs
|
||||
|
||||
|
||||
say "Warning: This is your last chance to back out. If you do not wish to"
|
||||
say "continue, please just press ENTER. Otherwise please type ""yes"""
|
||||
|
||||
pull letter
|
||||
if letter <> "YES" then exit
|
||||
|
||||
/* Find drive where OS/2 is installed */
|
||||
bootdrive = SysSearchPath('PATH', 'OS2.INI')
|
||||
/* say os2path */
|
||||
bootdrive = left(bootdrive, 2)
|
||||
|
||||
copy "FREETYPE.DLL " || bootdrive || "\os2\dll"
|
||||
if rc <> 0 then do
|
||||
say "Error: Could not copy file!"
|
||||
pause
|
||||
exit
|
||||
end
|
||||
|
||||
app = "PM_Font_Drivers"
|
||||
key = "TRUETYPE"
|
||||
val = "\OS2\DLL\FREETYPE.DLL" || d2c(0)
|
||||
|
||||
SysIni('BOTH', app, key, val)
|
||||
say "Font Driver is installed. Please reboot."
|
||||
pause
|
||||
72
contrib/ftos2/lib/arch/os2/Makefile.icc
Normal file
72
contrib/ftos2/lib/arch/os2/Makefile.icc
Normal file
@@ -0,0 +1,72 @@
|
||||
# This file is part of the FreeType project.
|
||||
#
|
||||
# It builds the library and test programs for IBM VisualAge C++ under OS/2.
|
||||
#
|
||||
# You will need nmake.
|
||||
#
|
||||
# Use this file while in the lib directory with the following statement:
|
||||
#
|
||||
# nmake -f arch\os2\Makefile.icc
|
||||
#
|
||||
|
||||
ARCH = arch\os2
|
||||
FT_MAKEFILE = $(ARCH)\Makefile.icc
|
||||
FT_MAKE = $(MAKE) -nologo
|
||||
|
||||
CC = icc
|
||||
CFLAGS = -Wcnd- -Wpro- -Ss -Sp1 -Rn -Ge- -O+ -G4 -Q+ -Iarch\os2 -I. -Iextend
|
||||
#CFLAGS = -Wcnd- -Wpro- -Ss -Sp1 -Rn -Ge- -Ti+ Q+ -Iarch\os2 -I. -Iextend
|
||||
|
||||
# NOTE: Optimizations are discarded, as it seems that Visual Age
|
||||
# is buggy when producing ttraster.obj. The resulting code
|
||||
# crashes under some circumstances (performing vertical dropout
|
||||
# control when rendering smoothed outlines)!
|
||||
|
||||
TTFILE = $(ARCH)\os2file.c
|
||||
TTMEMORY = .\ttmemory.c
|
||||
TTMUTEX = .\ttmutex.c
|
||||
|
||||
PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX)
|
||||
|
||||
SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c \
|
||||
extend\ftxcmap.c extend\ftxwidth.c
|
||||
OBJS_X = $(SRC_X:.c=.obj)
|
||||
|
||||
SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \
|
||||
ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c \
|
||||
ttextend.c $(PORT)
|
||||
OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X)
|
||||
|
||||
SRC_S = $(ARCH)\freetype.c
|
||||
OBJ_S = $(SRC_S:.c=.obj)
|
||||
OBJS_S = $(OBJ_S) $(OBJS_X)
|
||||
|
||||
|
||||
all:
|
||||
$(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_S)" libttf.lib
|
||||
|
||||
debug:
|
||||
$(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_M)" libttf.lib
|
||||
|
||||
|
||||
$(OBJ_S): $(SRC_S) $(SRC_M)
|
||||
$(CC) -C $(CFLAGS) /Fo$@ $*.c
|
||||
|
||||
$(OBJS_X):
|
||||
$(CC) -C $(CFLAGS) /Fo$@ $*.c
|
||||
|
||||
$(ARCH)\os2file.obj:
|
||||
$(CC) -C $(CFLAGS) /Fo$@ $*.c
|
||||
|
||||
libttf.lib: $(LIB_FILES)
|
||||
!ilib /nologo /noignorecase /nobackup $@ -+$?,,
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del extend\*.obj
|
||||
-del arch\os2\*.obj
|
||||
|
||||
distclean: clean
|
||||
-del libttf.lib
|
||||
|
||||
# end of Makefile.icc
|
||||
41
contrib/ftos2/lib/arch/os2/Makefile.wat
Normal file
41
contrib/ftos2/lib/arch/os2/Makefile.wat
Normal file
@@ -0,0 +1,41 @@
|
||||
# This file is part of the FreeType project.
|
||||
# Modified for FTIFI - Mike
|
||||
#
|
||||
# It builds the library and test programs using Watcom C/C++ under OS/2.
|
||||
#
|
||||
# You will need nmake!!
|
||||
# If you can change this makefile to work with wmake, please
|
||||
# inform me.
|
||||
#
|
||||
# Use this file while in the lib directory with the following statement:
|
||||
#
|
||||
# nmake -f arch\os2\Makefile.icc
|
||||
|
||||
CC = wcc386
|
||||
CFLAGS = -4r -Otexan -zp1 -bd -zc -Iarch\os2 -I. -Iextend
|
||||
|
||||
SRC = ttapi.c ttcache.c ttcalc.c ttcmap.c tterror.c \
|
||||
ttfile.c ttgload.c ttinterp.c ttlists.c ttload.c \
|
||||
ttmemory.c ttmutex.c ttobjs.c ttraster.c ttextend.c \
|
||||
\
|
||||
extend\ftxgasp.c extend\ftxkern.c
|
||||
|
||||
OBJ = $(SRC:.c=.obj)
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) $*.c
|
||||
|
||||
all: libttf.lib
|
||||
|
||||
libttf.lib: $(OBJ)
|
||||
-move ft*.obj extend
|
||||
!wlib -c $@ -+$?
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del extend\*.obj
|
||||
|
||||
distclean: clean
|
||||
-del libttf.lib
|
||||
|
||||
# end of Makefile.wcc
|
||||
385
contrib/ftos2/lib/ttmemory.c
Normal file
385
contrib/ftos2/lib/ttmemory.c
Normal file
@@ -0,0 +1,385 @@
|
||||
/*******************************************************************
|
||||
*
|
||||
* ttmemory.c 1.2
|
||||
*
|
||||
* Memory management component (body).
|
||||
*
|
||||
* Copyright 1996, 1997 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* Portions Copyright 1998 by Michal Necasek
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* Changes between 1.1 and 1.2:
|
||||
*
|
||||
* - the font pool is gone.
|
||||
*
|
||||
* - introduced the FREE macro and the Free function for
|
||||
* future use in destructors.
|
||||
*
|
||||
* - Init_FontPool() is now a macro to allow the compilation of
|
||||
* 'legacy' applications (all four test programs have been updated).
|
||||
*
|
||||
* Note: This code was slightly adapted for use in the OS/2
|
||||
* Font Driver (FreeType/2).
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#include "ttdebug.h"
|
||||
#include "ttmemory.h"
|
||||
#include "ttengine.h"
|
||||
|
||||
#define INCL_DEV
|
||||
#include <os2.h>
|
||||
#include <pmddi.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#undef DEBUG_MEM
|
||||
|
||||
/* -------------------- debugging defs ----------------------- */
|
||||
/* DEBUG_MEM creates a file and logs all actions to it */
|
||||
|
||||
#ifdef DEBUG_MEM
|
||||
static HFILE MemLogHandle = NULLHANDLE;
|
||||
static ULONG Written = 0;
|
||||
static char log[2048] = "";
|
||||
static char buf[2048] = "";
|
||||
|
||||
|
||||
char* itoa10( int i, char* buffer ) {
|
||||
char* ptr = buffer;
|
||||
char* rptr = buffer;
|
||||
char digit;
|
||||
|
||||
if (i == 0) {
|
||||
buffer[0] = '0';
|
||||
buffer[1] = 0;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
if (i < 0) {
|
||||
*ptr = '-';
|
||||
ptr++; rptr++;
|
||||
i = -i;
|
||||
}
|
||||
|
||||
while (i != 0) {
|
||||
*ptr = (char) (i % 10 + '0');
|
||||
ptr++;
|
||||
i /= 10;
|
||||
}
|
||||
|
||||
*ptr = 0; ptr--;
|
||||
|
||||
while (ptr > rptr) {
|
||||
digit = *ptr;
|
||||
*ptr = *rptr;
|
||||
*rptr = digit;
|
||||
ptr--;
|
||||
rptr++;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static const char* hexstr = "0123456789abcdef";
|
||||
|
||||
char* itohex2( int i, char* buffer )
|
||||
{
|
||||
buffer[0] = hexstr[ (i >> 12) & 0xF ];
|
||||
buffer[1] = hexstr[ (i >> 8 ) & 0xF ];
|
||||
buffer[2] = hexstr[ (i >> 4 ) & 0xF ];
|
||||
buffer[3] = hexstr[ (i ) & 0xF ];
|
||||
buffer[4] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
char* itohex4( long i, char* buffer )
|
||||
{
|
||||
itohex2( (i >> 16) & 0xFFFF, buffer );
|
||||
/* We separate the high and low part with a dot to make it */
|
||||
/* more readable */
|
||||
buffer[4] = '.';
|
||||
itohex2( i & 0xFFFF, buffer+5 );
|
||||
return buffer;
|
||||
}
|
||||
|
||||
#define COPY(s) strcpy(log, s)
|
||||
#define CAT(s) strcat(log, s)
|
||||
#define CATI(v) strcat(log, itoa10( (int)v, buf ))
|
||||
#define CATH(v) strcat(log, itohex4( (long)v, buf ))
|
||||
#define CATW(v) strcat(log, itohex2( (short)v, buf ))
|
||||
#define WRITE DosWrite(MemLogHandle, log, strlen(log), &Written)
|
||||
#define ERRRET(e) { COPY("Error at "); \
|
||||
CATI(__LINE__); \
|
||||
CAT("\r\n"); \
|
||||
WRITE; \
|
||||
return(e); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define COPY(s)
|
||||
#define CAT(s)
|
||||
#define CATI(v)
|
||||
#define CATH(v)
|
||||
#define CATW(v)
|
||||
#define WRITE
|
||||
#define ERRRET(e) return(e);
|
||||
|
||||
#endif /* DEBUG_MEM */
|
||||
|
||||
|
||||
#undef TRACK_MEM
|
||||
/* TRACK_MEM allows online tracking of memory usage online (via shared */
|
||||
/* memory). It is used in conjunction with the FTMEM utility. */
|
||||
|
||||
#ifdef TRACK_MEM
|
||||
/* name of shared memory used for memory usage reporting */
|
||||
#define MEM_NAME "\\sharemem\\freetype"
|
||||
|
||||
/* structure containing memory usage information */
|
||||
typedef struct _INFOSTRUCT {
|
||||
ULONG signature; /* signature (0x46524545, 'FREE') */
|
||||
ULONG used; /* bytes actually used */
|
||||
ULONG maxused; /* maximum amount ever used */
|
||||
ULONG num_err; /* number of (de)allocation errors */
|
||||
} INFOSTRUCT, *PINFOSTRUCT;
|
||||
|
||||
/* structure (in named shared memory) pointing to the above struct */
|
||||
typedef struct _INFOPTR {
|
||||
PINFOSTRUCT address; /* pointer to actual memory info */
|
||||
} INFOPTR, *PINFOPTR;
|
||||
|
||||
PINFOSTRUCT meminfo; /* struct in shared memory holding usage info */
|
||||
PINFOPTR memptr;
|
||||
#endif
|
||||
|
||||
/* -----------------------------------------------------------------
|
||||
|
||||
A brief explanation of the memory allocator :
|
||||
|
||||
- We store the block's size in front of it. The size implies the nature
|
||||
of the block, and selects a de-allocation scheme..
|
||||
|
||||
- A note on the memory debugging schemes: logging and online tracking
|
||||
are independent of each other and none, either or both may be used.
|
||||
|
||||
----------------------------------------------------------------- */
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* Allocate a block of memory */
|
||||
/* */
|
||||
static
|
||||
void* ft2_malloc( long size )
|
||||
{
|
||||
long* head;
|
||||
void* base;
|
||||
int rc;
|
||||
|
||||
/* add header size */
|
||||
size += sizeof(long);
|
||||
|
||||
/* Allocate memory accessible from all processes */
|
||||
if (( rc = SSAllocMem( (PVOID)&head, size, 0 )))
|
||||
{
|
||||
COPY( "ft2_malloc: block SSAllocMem failed with rc = " );
|
||||
CATH( rc );
|
||||
CAT ( "\r\n" );
|
||||
WRITE;
|
||||
return NULL;
|
||||
}
|
||||
*head = size;
|
||||
base = (void*)(head + 1);
|
||||
#ifdef TRACK_MEM
|
||||
meminfo->used += size;
|
||||
if (meminfo->used > meminfo->maxused)
|
||||
meminfo->maxused = meminfo->used;
|
||||
#endif
|
||||
return base;
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* Release a block of memory */
|
||||
/* */
|
||||
int ft2_free( void* block )
|
||||
{
|
||||
long* head;
|
||||
long size, offset;
|
||||
int rc, h;
|
||||
|
||||
if (!block)
|
||||
return -1;
|
||||
|
||||
head = ((long*)block) - 1;
|
||||
size = *head;
|
||||
|
||||
if (size <= 0)
|
||||
{
|
||||
COPY( "ft2_free: negative size !!\r\n" );
|
||||
WRITE;
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = SSFreeMem( (PVOID)head );
|
||||
if (rc)
|
||||
{
|
||||
COPY( "ft2_free: block SSFreeMem failed with rc = " );
|
||||
CATI( rc );
|
||||
CAT ( "\r\n" );
|
||||
WRITE;
|
||||
}
|
||||
#ifdef TRACK_MEM
|
||||
meminfo->used -= size;
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* Function : TT_Alloc
|
||||
*
|
||||
* Description : Allocates memory from the heap buffer.
|
||||
*
|
||||
* Input : Size size of the memory to be allocated
|
||||
* P pointer to a buffer pointer
|
||||
*
|
||||
* Output : Error code.
|
||||
*
|
||||
* NOTE: The newly allocated block should _always_ be zeroed
|
||||
* on return. Many parts of the engine rely on this to
|
||||
* work properly.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
TT_Error TT_Alloc( long Size, void** P )
|
||||
{
|
||||
if ( Size )
|
||||
{
|
||||
*P = ft2_malloc( Size );
|
||||
if (!*P) {
|
||||
#ifdef TRACK_MEM
|
||||
meminfo->num_err++;
|
||||
#endif
|
||||
return TT_Err_Out_Of_Memory;
|
||||
}
|
||||
|
||||
/* MEM_Set( *P, 0, Size); */ /* not necessary, SSAllocMem does it */
|
||||
}
|
||||
else
|
||||
*P = NULL;
|
||||
|
||||
return TT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* Function : TT_Free
|
||||
*
|
||||
* Description : Releases a previously allocated block of memory.
|
||||
*
|
||||
* Input : P pointer to memory block
|
||||
*
|
||||
* Output : Always SUCCESS.
|
||||
*
|
||||
* Note : The pointer must _always_ be set to NULL by this function.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
TT_Error TT_Free( void** P )
|
||||
{
|
||||
if ( !P || !*P )
|
||||
return TT_Err_Ok;
|
||||
|
||||
if (ft2_free( *P )) {
|
||||
#ifdef TRACK_MEM
|
||||
meminfo->num_err++;
|
||||
#endif
|
||||
}
|
||||
*P = NULL;
|
||||
return TT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* Function : TTMemory_Init
|
||||
*
|
||||
* Description : Initializes the memory.
|
||||
*
|
||||
* Output : Always SUCCESS.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
TT_Error TTMemory_Init()
|
||||
{
|
||||
int rc;
|
||||
|
||||
#ifdef DEBUG_MEM
|
||||
ULONG Action;
|
||||
|
||||
DosOpen("C:\\FTMEM.LOG", &MemLogHandle, &Action, 0, FILE_NORMAL,
|
||||
OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS,
|
||||
OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_WRITE_THROUGH |
|
||||
OPEN_FLAGS_SEQUENTIAL | OPEN_SHARE_DENYWRITE | OPEN_ACCESS_WRITEONLY,
|
||||
NULL);
|
||||
|
||||
COPY("FTMEM Init.\r\n");
|
||||
WRITE;
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifdef TRACK_MEM
|
||||
/* allocate named shared memory and global shared memory */
|
||||
|
||||
SSAllocMem(&meminfo, 4096, 0);
|
||||
DosAllocSharedMem((PVOID*)&memptr, MEM_NAME, 4096, fALLOC);
|
||||
memptr->address = meminfo;
|
||||
meminfo->signature = 0x46524545; /* 'FREE' */
|
||||
meminfo->maxused = 0;
|
||||
meminfo->used = 0;
|
||||
#endif /* TRACK */
|
||||
|
||||
return TT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* Function : TTMemory_Done
|
||||
*
|
||||
* Description : Finalizes memory usage.
|
||||
*
|
||||
* Output : Always SUCCESS.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
TT_Error TTMemory_Done()
|
||||
{
|
||||
/* Never called by the font driver (beats me why). We do not
|
||||
release the heaps */
|
||||
|
||||
#ifdef TRACK_MEM
|
||||
DosFreeMem(memptr); /* free shared memory */
|
||||
SSFreeMem(meminfo);
|
||||
#endif
|
||||
#ifdef DEBUG_MEM
|
||||
COPY("FTMEM Done.\r\n");
|
||||
WRITE;
|
||||
DosClose(MemLogHandle);
|
||||
#endif
|
||||
return TT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
/* END */
|
||||
63
contrib/ftos2/limit.cmd
Normal file
63
contrib/ftos2/limit.cmd
Normal file
@@ -0,0 +1,63 @@
|
||||
/* */
|
||||
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
|
||||
call SysLoadFuncs
|
||||
|
||||
Parse Upper Arg a1 a2
|
||||
|
||||
app = "FreeType/2"
|
||||
key = "OPENFACES"
|
||||
|
||||
if Arg() = 0 then call usage
|
||||
|
||||
if a1 = 'Q' then call query
|
||||
|
||||
if a1 = 'S' then call set
|
||||
call usage
|
||||
|
||||
set:
|
||||
|
||||
val = a2
|
||||
|
||||
if val = '' then do
|
||||
say 'Invalid limit!'
|
||||
exit
|
||||
end
|
||||
|
||||
if val < 8 then do
|
||||
say 'The lowest acceptable limit is 8!'
|
||||
pause
|
||||
exit
|
||||
end
|
||||
|
||||
szval = val || d2c(0)
|
||||
|
||||
rc = SysIni('USER', app, key, szval)
|
||||
say rc
|
||||
if rc = 'ERROR:' then do
|
||||
say 'Error updating OS2.INI!'
|
||||
pause
|
||||
exit
|
||||
end
|
||||
|
||||
say "Open faces limit updated to " || val || ". Please reboot to activate changes."
|
||||
pause
|
||||
exit
|
||||
|
||||
query:
|
||||
val = SysIni('USER', app, key)
|
||||
if val = "ERROR:" then val = "not set"
|
||||
/* strip the terminating NULL character */
|
||||
else val = substr(val, 1, pos(d2c(0), val) - 1)
|
||||
|
||||
say 'The current open faces limit is ' || val
|
||||
pause
|
||||
exit
|
||||
|
||||
usage:
|
||||
say 'This program is used to set the limit of concurrently open typefaces for'
|
||||
say 'FreeType/2. Use lower numbers to limit memory consumption and higher to'
|
||||
say 'improve performance if you use lots of fonts.'
|
||||
say
|
||||
say 'Usage: LIMIT q - query the current limit'
|
||||
say ' LIMIT s <val> - set limit to <val> (effective on next reboot).'
|
||||
pause
|
||||
15
contrib/ftos2/query.cmd
Normal file
15
contrib/ftos2/query.cmd
Normal file
@@ -0,0 +1,15 @@
|
||||
/* */
|
||||
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
|
||||
call SysLoadFuncs
|
||||
|
||||
app = "PM_Font_Drivers"
|
||||
key = "TRUETYPE"
|
||||
|
||||
val = SysIni('USER', app, key)
|
||||
|
||||
if val = "ERROR:" then val = "none"
|
||||
/* strip the terminating NULL character */
|
||||
else val = substr(val, 1, pos(d2c(0), val) - 1)
|
||||
|
||||
say 'The current TrueType driver is ' || val
|
||||
pause
|
||||
87
contrib/ftos2/readme.1st
Normal file
87
contrib/ftos2/readme.1st
Normal file
@@ -0,0 +1,87 @@
|
||||
This is the source code from the FreeType/2 OS/2 font driver.
|
||||
Copyright (C) 1997-1998 Michal Necasek (mike@mendelu.cz).
|
||||
|
||||
Here's a description of the files in this package :
|
||||
|
||||
readme.1st This file
|
||||
|
||||
readme.txt The FreeType/2 Readme
|
||||
|
||||
FAQ The FreeType/2 user faq
|
||||
|
||||
DEVELFAQ The FreeType/2 developer faq. Read it before trying to
|
||||
compile this program
|
||||
|
||||
install.cmd The FreeType/2 installation script
|
||||
uninstall.cmd The FreeType/2 uninstallation script
|
||||
query.cmd A script used to query the name of the current font driver
|
||||
|
||||
limit.cmd The driver controls the number of font files it keeps
|
||||
opened at the same time, in order to save system resources
|
||||
and memory (of course, this _doesn't_ limit the number of
|
||||
opened fonts in PM, it just saves a _lot_ of memory when
|
||||
many fonts are installed on your system).
|
||||
|
||||
This script let you change this limit. It can be useful
|
||||
if you use font-intensive applications (like DTP) and
|
||||
want better performance (to the sake of memory).
|
||||
|
||||
update.cmd The FreeType/2 update script
|
||||
ifi/ Source code of the FreeType/2 font driver proper
|
||||
|
||||
|
||||
lib/ files that must be added to the standard FreeType 1.1
|
||||
release. They take the place of the files located in
|
||||
the corresponding "lib" file.
|
||||
|
||||
lib/ttmemory.c replacement for the FreeType memory
|
||||
manager component. This one uses the GRE
|
||||
shared memory segment allocater, and is
|
||||
required.
|
||||
|
||||
lib/arch/makefile.icc Makefile to compile the FreeType library for
|
||||
FreeType/2 with Visual Age. You'll need nmake.
|
||||
|
||||
lib/arch/makefile.wat Makefile to compile with Watcom. NOTE that
|
||||
you'll ALSO need nmake (wmake won't work !!)
|
||||
|
||||
|
||||
Here's how to compile the font driver.
|
||||
|
||||
0. Read the DEVELFAQ ! Now ! Then make a WPS backup !
|
||||
|
||||
1. Get the FreeType library, and copy the "lib" hierarchy into it to
|
||||
replace the related files (i.e. ttmemory.c and makefiles).
|
||||
|
||||
2. Compile FreeType with the new files, simply go to "freetype/lib"
|
||||
and type :
|
||||
|
||||
nmake -f arch\os2\makefile.icc for VisualAge
|
||||
nmake -f arch\os2\makefile.wat for Watcom
|
||||
|
||||
3. Adjust the makefiles in "ifi" to reflect the location of the
|
||||
library file "libttf.lib" that was generated previously.
|
||||
|
||||
5. Compile the font driver. Go to the "ft_os2/ifi" directory, then type
|
||||
|
||||
nmake -f freetype.icc for VisualAge
|
||||
nmake -f freetype.wat for Watcom
|
||||
|
||||
You should have created a file called "FreeType.dll". Copy it to
|
||||
your "ft_os2" directory..
|
||||
|
||||
6. Run the "install.cmd" script, then reboot after closing all
|
||||
applications.
|
||||
|
||||
7. When your desktop is back, go to the font palette and try to
|
||||
install some new TrueType fonts. Enjoy the difference :-)
|
||||
|
||||
8. You can also compile a small memory usage dumper called "ftmem.c"
|
||||
to know how much memory the driver is using. Simply do
|
||||
|
||||
nmake -f ftmem.icc for VisualAge
|
||||
nmake -f ftmem.wat for Watcom
|
||||
|
||||
Then launch it. A small window will appear with the current amount
|
||||
of memory allocated by the driver.
|
||||
|
||||
113
contrib/ftos2/readme.txt
Normal file
113
contrib/ftos2/readme.txt
Normal file
@@ -0,0 +1,113 @@
|
||||
|
||||
* * * FreeType/2 * * *
|
||||
|
||||
(Version 1.0, 5. November 1998)
|
||||
|
||||
Copyright (C) 1997,1998 Michal Necasek <mike@mendelu.cz>
|
||||
Copyright (C) 1997,1998 The FreeType Development Team
|
||||
|
||||
|
||||
Motto: "OS/2 is dead? Again? Thanks for telling me, I'd never notice!"
|
||||
|
||||
|
||||
*** if you are upgrading from previous version, please see the FAQ (Q15) ***
|
||||
|
||||
|
||||
- First a short Q&A:
|
||||
|
||||
Q1: What's this?
|
||||
A1: This is what OS/2 users have been waiting for only too long - a free,
|
||||
high-quality TrueType renderer a.k.a. Font Driver conforming to the
|
||||
OS/2 Intelligent Font Interface specification. It is based on FreeType -
|
||||
a free portable library for using TrueType fonts.
|
||||
Please note that although this code is free the FreeType team and
|
||||
I will cheerfully accept any donations by happy users ;-) (not that I
|
||||
expect to get any)
|
||||
|
||||
Q2: How do I use this?
|
||||
A2: Go to OS/2 command line and run INSTALL.CMD from the directory containing
|
||||
FREETYPE.DLL. This will replace the original IBM TrueType driver if it is
|
||||
installed.
|
||||
|
||||
Q3: Where's the disclaimer?
|
||||
A3: No, don't worry, I didn't forget that. I of course provide NO WARRANTY
|
||||
that this code will work as you expect. Use only at your OWN RISK!
|
||||
|
||||
Q4: What should I do RIGHT NOW?
|
||||
A4: Before attempting to install this driver, you are STRONGLY advised
|
||||
to archive your current configuration (Set Desktop Properties/Archive/
|
||||
Create archive at each startup, then reboot. Then of course switch archiving
|
||||
off). It is always possible your system won't boot with the font driver
|
||||
installed. You can risk it, but I warned you! You know how nasty the
|
||||
computers can be ;-)
|
||||
|
||||
Q5: What about the license?
|
||||
A5: This code is distributed under the FreeType license.
|
||||
It is free and the source code is available as part of the FreeType
|
||||
distribution.
|
||||
|
||||
Q6: How do I get rid of this?
|
||||
A6: Ah, right question. Just run UNINSTALL.CMD. That removes the font driver
|
||||
(not physically, it just isn't used on next startup) and restores the
|
||||
original TRUETYPE.DLL if it exists.
|
||||
|
||||
Q7: Is there something else?
|
||||
A7: Yes, be prepared that the fonts just kick ass! You will no longer have
|
||||
to envy those poor souls still using the so-called 95% OS from THAT
|
||||
unspeakable company starting with the letter M ;-)
|
||||
|
||||
|
||||
- Current features/bugs/limitations:
|
||||
|
||||
Features : - outlines
|
||||
- scaled/rotated text
|
||||
- supports printed output
|
||||
- works with TTCs (TrueType collections)
|
||||
- national characters (if provided in the font, of course);
|
||||
should work with all Latin codepages, Cyrillic and Greek.
|
||||
- partial DBCS support - Traditional Chinese should work about
|
||||
98%. Fonts like Times New Roman MT30 should work on all
|
||||
systems. If you want your language to be supported, you can
|
||||
apply at <mike@mendelu.cz> and become a Beta tester.
|
||||
|
||||
Bug/feature: - unharmonious glyph spacing in some applications. This seems
|
||||
to come from OS/2's WYSIWYG glyph placement policy. This
|
||||
is more or less visible depending on the application. We
|
||||
can't do a lot about this... At least it's true WYSIWYG and
|
||||
no nasty surprises when printing.
|
||||
|
||||
|
||||
Limitations: - no grayscaling (a.k.a. antialiasing) - this is a limitation
|
||||
of OS/2, not my code. If OS/2 starts supporting it, I'll
|
||||
implement it the moment I lay my hands on the specs :)
|
||||
Unfortunately it most probably won't happen any too soon.
|
||||
Anyway, you have to bug IBM about this one, not me!
|
||||
|
||||
- Planned features and features under consideration:
|
||||
- possibly adding even support for Type 1 fonts, but that depends on
|
||||
further FreeType engine development. Looks quite probable now.
|
||||
|
||||
And finally, thanks go to:
|
||||
- the FreeType team, the makers of FreeType. Without them, my work would be
|
||||
impossible.
|
||||
- especially David Turner of FreeType for his help, advice and support
|
||||
- Robert Muchsel, I used one or two ideas from his code
|
||||
- Marc L Cohen, Ken Borgendale and Tetsuro Nishimura from IBM. They provided
|
||||
me with lots of extremely valuable 'inside' information.
|
||||
- and last but not least - IBM, for providing us with the wonderful OS/2.
|
||||
And for giving out the necessary docs for free. If all companies did
|
||||
that, the world would be a better place.
|
||||
|
||||
|
||||
Information on FreeType is available at
|
||||
http://www.freetype.org
|
||||
|
||||
Please send bug reports/suggestions and comments to :
|
||||
|
||||
freetype-os2@physiol.med.tu-muenchen.de
|
||||
|
||||
|
||||
Greetings can also be sent directly to the author at : mike@mendelu.cz
|
||||
|
||||
And if you didn't know, IBM and OS/2 are registered trademarks of the
|
||||
International Business Machines Corporation.
|
||||
60
contrib/ftos2/uninst.c
Normal file
60
contrib/ftos2/uninst.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* */
|
||||
/* UNINST - FreeType/2 uninstaller */
|
||||
/* */
|
||||
/* Copyright 1998 Michal Necasek <mike@mendelu.cz> */
|
||||
/* */
|
||||
/* UNINSTALL.CMD rewritten in C - apparently the REXX version fails */
|
||||
/* when OS/2 is booted to command line. This causes problems if */
|
||||
/* FreeType/2 prevents PM from starting successfully. */
|
||||
/* */
|
||||
/* Note: This can be compiled as 16-bit app to keep the size down. */
|
||||
|
||||
#define INCL_NOXLATE_WIN16
|
||||
#define INCL_NOXLATE_DOS16
|
||||
#define INCL_WINSHELLDATA
|
||||
#define INCL_DOSMISC
|
||||
#include <os2.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <conio.h>
|
||||
|
||||
char szApp[] = "PM_Font_Drivers";
|
||||
char szKey[] = "TRUETYPE";
|
||||
char szBuffer[300];
|
||||
|
||||
void main(void) {
|
||||
ULONG ulBootDrv;
|
||||
USHORT usLen = 0;
|
||||
APIRET rc;
|
||||
char c;
|
||||
|
||||
usLen = PrfQueryProfileString(HINI_USERPROFILE, szApp, szKey, NULL,
|
||||
(PVOID)szBuffer, 260L);
|
||||
|
||||
if (!strcmp("\\OS2\\DLL\\FREETYPE.DLL", szBuffer)) {
|
||||
if(!PrfWriteProfileString(HINI_USERPROFILE, szApp, szKey, NULL))
|
||||
goto err;
|
||||
|
||||
printf("FreeType/2 successfully removed.\n");
|
||||
printf("Do you wish to restore TRUETYPE.DLL (y/n)? ");
|
||||
c = getch();
|
||||
if (c != 'y' && c != 'Y')
|
||||
return;
|
||||
|
||||
if(!PrfWriteProfileString(HINI_USERPROFILE, szApp, szKey,
|
||||
"\\OS2\\DLL\\TRUETYPE.DLL"))
|
||||
goto err;
|
||||
|
||||
printf("\nTRUETYPE.DLL successfully restored");
|
||||
}
|
||||
else {
|
||||
printf("FreeType/2 not installed!");
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
err:
|
||||
printf("Uninstallation failed!");
|
||||
}
|
||||
34
contrib/ftos2/uninstall.cmd
Normal file
34
contrib/ftos2/uninstall.cmd
Normal file
@@ -0,0 +1,34 @@
|
||||
/* */
|
||||
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
|
||||
call SysLoadFuncs
|
||||
|
||||
|
||||
say "This utility will remove the FreeType/2 font driver and install "
|
||||
say "the original TRUETYPE.DLL if it exists. If you do not wish to"
|
||||
say "continue, please just press ENTER. Otherwise please type ""y"""
|
||||
|
||||
pull letter
|
||||
if letter <> "Y" then exit
|
||||
|
||||
/* Find drive where OS/2 is installed */
|
||||
bootdrive = SysSearchPath('PATH', 'OS2.INI')
|
||||
bootdrive = left(bootdrive, 1)
|
||||
|
||||
app = "PM_Font_Drivers"
|
||||
key = "TRUETYPE"
|
||||
|
||||
/* look for TRUETYPE.DLL */
|
||||
rc = SysFileTree(left(bootdrive,1) || ":\OS2\DLL\TRUETYPE.DLL", "file", "F")
|
||||
|
||||
if file.0 = 1 then do
|
||||
say "Restoring TRUETYPE.DLL..."
|
||||
val = "\OS2\DLL\TRUETYPE.DLL" || d2c(0)
|
||||
SysIni('BOTH', app, key, val)
|
||||
end
|
||||
else do
|
||||
say "Uninstalling FREETYPE.DLL..."
|
||||
SysIni('BOTH', app, key, "DELETE:")
|
||||
end
|
||||
|
||||
say "FTIFI is uninstalled. Please reboot."
|
||||
pause
|
||||
BIN
contrib/mac/mac.hqx
Normal file
BIN
contrib/mac/mac.hqx
Normal file
Binary file not shown.
5
contrib/ttf2bdf/.cvsignore
Normal file
5
contrib/ttf2bdf/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
ttf2bdf
|
||||
config.status
|
||||
config.cache
|
||||
config.log
|
||||
Makefile
|
||||
74
contrib/ttf2bdf/Makefile.in
Normal file
74
contrib/ttf2bdf/Makefile.in
Normal file
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# $Id: Makefile.in,v 1.4 1998/12/06 18:50:22 mleisher Exp $
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright 1996, 1997, 1998 Computing Research Labs, New Mexico State
|
||||
# University
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
|
||||
# OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
||||
# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
RM = @RM@
|
||||
MKINSTALLDIRS = ../../mkinstalldirs
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @XX_CFLAGS@ @CFLAGS@
|
||||
|
||||
SRCS = remap.c ttf2bdf.c
|
||||
OBJS = remap.o ttf2bdf.o
|
||||
|
||||
#
|
||||
# Point these at the FreeType source directories.
|
||||
#
|
||||
INCS = @CPPFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
|
||||
all: ttf2bdf
|
||||
|
||||
ttf2bdf: $(OBJS)
|
||||
$(PURIFY) $(CC) $(STATIC) $(CFLAGS) -o ttf2bdf $(OBJS) $(LIBS)
|
||||
|
||||
clean:
|
||||
$(RM) -f *.o *BAK *CKP *~ a.out core
|
||||
|
||||
realclean: clean
|
||||
$(RM) -f ttf2bdf
|
||||
|
||||
distclean: clean
|
||||
$(RM) -f ttf2bdf config.* Makefile
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(INCS) -c $< -o $@
|
||||
|
||||
install: ttf2bdf
|
||||
@$(MKINSTALLDIRS) $(bindir) $(mandir)/man1
|
||||
@cp ttf2bdf $(bindir)/ttf2bdf
|
||||
@cp ttf2bdf.man $(mandir)/man1/ttf2bdf.1
|
||||
|
||||
uninstall:
|
||||
@$(RM) -f $(bindir)/ttf2bdf
|
||||
@$(RM) -f $(mandir)/man1/ttf2bdf.1
|
||||
|
||||
# end of Makefile
|
||||
315
contrib/ttf2bdf/README
Normal file
315
contrib/ttf2bdf/README
Normal file
@@ -0,0 +1,315 @@
|
||||
#
|
||||
# $Id: README,v 1.18 1999/08/19 16:30:24 mleisher Exp $
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright 1996, 1997, 1998, 1999 Computing Research Labs,
|
||||
# New Mexico State University
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
|
||||
# OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
||||
# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
This is version 2.7 of a program to convert TrueType fonts to BDF fonts using
|
||||
the FreeType renderer.
|
||||
|
||||
BDF fonts can be edited using the XmBDFEditor which is available from (replace
|
||||
the <version> with the most current version number):
|
||||
|
||||
[Sources]
|
||||
ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed.tar.gz
|
||||
|
||||
[Binaries: Linux/Pentium, Solaris, SunOS]
|
||||
ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-<version>-ELF.tar.gz
|
||||
ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-<version>-SOLARIS.tar.gz
|
||||
|
||||
COMPILING ttf2bdf
|
||||
-----------------
|
||||
|
||||
1. Pick up the latest FreeType distribution from:
|
||||
|
||||
ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype/devel/freetype-current.tar.gz
|
||||
|
||||
2. Unpack FreeType and build it.
|
||||
|
||||
3. Go into the "contrib/ttf2bdf/" directory and type "make" to build "ttf2bdf".
|
||||
|
||||
RUNNING ttf2bdf
|
||||
---------------
|
||||
|
||||
Type the following to get a list of command line options:
|
||||
|
||||
% ttf2bdf -h
|
||||
|
||||
ACKNOWLEDGEMENTS
|
||||
----------------
|
||||
|
||||
Thanks go to the following people:
|
||||
|
||||
Robert Wilhelm <robert@physiol.med.tu-muenchen.de> for pointing out a
|
||||
crucial problem with the pre-1.0 code.
|
||||
|
||||
Lho Li-Da <ollie@ms1.hinet.net> for pointing out a problem with Big5 and
|
||||
GB2312 encoding ids being documented incorrectly in the TT docs and a
|
||||
problem with glyphs that are height 1 or width 1, and a font name problem.
|
||||
|
||||
Adrian Havill <havill@threeweb.ad.jp> for unintentionally pointing out a
|
||||
missing feature.
|
||||
|
||||
Richard Verhoeven <rcb5@win.tue.nl> for pointing out a font names problem,
|
||||
problem with bitmaps missing their last byte in each row, and an invalid
|
||||
FONT_DESCENT property value.
|
||||
|
||||
Choi Jun Ho <junker@jazz.snu.ac.kr> for his inspiration from his
|
||||
implementation that changed some character set names, and added a
|
||||
number of new command line parameters.
|
||||
|
||||
Pavel Kankovsky <peak@kerberos.troja.mff.cuni.cz> for providing some
|
||||
critical grid fitting and metrics fixes when generating the bitmaps,
|
||||
adding the code to "auto-detect" bold and italic fonts, removing the
|
||||
dependency on ttobjs.h, finding some remapping bugs, and other fixes.
|
||||
|
||||
Matti Koskinen <mjkoskin@sci.fi> for pointing out a problem with using
|
||||
the code 0xffff.
|
||||
|
||||
Eugene Bobin <gene@ftim.ustu.ru> for contributing the Cyrillic mapping
|
||||
tables (iso8859.5, koi8.r, windows.1251) and the sample shell scripts for
|
||||
generating sets of BDF fonts.
|
||||
|
||||
Oleg N. Yakovlev <yashka@optima.dnepropetrovsk.ua> for alerting me to the
|
||||
problem of certain codes not being loaded correctly in the mapping tables.
|
||||
|
||||
Bertrand Petit <elrond@phoe.frmug.org> for providing additional command line
|
||||
parameters to allow more control over the XLFD name generated.
|
||||
|
||||
Roman Czyborra <czyborra@cs.tu-berlin.de> for pointing out the need for a
|
||||
change from UNICODE-2.0 to ISO10646-1 in the font XLFD name.
|
||||
|
||||
Mike Blazer <blazer@mail.nevalink.ru> for pointing out the include changes
|
||||
needed to compile on Windows.
|
||||
|
||||
Solofo Ramangalahy <solofo@mpi-sb.mpg.de> for contributing the ISO8859.1 and
|
||||
ISO8859.3 mapping tables.
|
||||
|
||||
Antoine Leca <Antoine.Leca@renault.fr> for suggesting the exchange of
|
||||
columns in the mapping table to better fit the mapping table format used by
|
||||
many.
|
||||
|
||||
Robert Brady <rwb197@ecs.soton.ac.uk> for pointing out a problem with the
|
||||
length of _XFREE86_GLYPH_RANGES properties and an Exceed font compiler.
|
||||
|
||||
CHANGES
|
||||
-------
|
||||
Version 2.7
|
||||
===========
|
||||
1. Swapped all the columns in the mapping files.
|
||||
|
||||
2. Changed the mapping table loader to index on the second column instead of
|
||||
the first.
|
||||
|
||||
3. Reduced the line length of _XFREE86_GLYPH_RANGES properties to 256
|
||||
instead of 512.
|
||||
|
||||
Version 2.6
|
||||
===========
|
||||
1. Changed the includes to deal with compilation on Windows.
|
||||
|
||||
2. Added some new mapping tables.
|
||||
|
||||
Version 2.5
|
||||
===========
|
||||
1. Updated the copyright dates.
|
||||
|
||||
2. Fixed an incorrect parameter for Traditional C compilers.
|
||||
|
||||
3. Added generation of the _XFREE86_GLYPH_RANGES properties.
|
||||
|
||||
Version 2.4
|
||||
===========
|
||||
1. Change all CRLF's, CR's, or LF's in copyright strings to double spaces.
|
||||
|
||||
2. Changed it so gcc 2.8.1 likes the return type of main() again.
|
||||
|
||||
Version 2.3
|
||||
===========
|
||||
1. Changed Makefile.in a bit to make installation more consistent.
|
||||
|
||||
2. Changed the lower limit for the vertical and horizontal resolutions to be
|
||||
10dpi instead of 50dpi.
|
||||
|
||||
Version 2.2
|
||||
===========
|
||||
1. Added missing documentation in the manual page.
|
||||
|
||||
2. Added the `-u' parameter to allow setting the character used to replace
|
||||
dashes or spaces in the font name.
|
||||
|
||||
3. Changed the CHARSET_REGISTRY and CHARSET_ENCODING to be "ISO10646-1"
|
||||
instead of "Unicode-2.0".
|
||||
|
||||
4. The numGlyphs property comes back incorrect for some fonts, so the loop
|
||||
cycles through all 65536 possibilities every time now.
|
||||
|
||||
Version 2.1
|
||||
===========
|
||||
1. Added patches provided by Bertrand Petit.
|
||||
|
||||
2. Insured compatibility with FreeType 1.1.
|
||||
|
||||
Version 2.0
|
||||
===========
|
||||
1. Created two new subdirectories. One for mapping tables and one for any
|
||||
other contributed code, scripts, or data.
|
||||
|
||||
2. Updated Cyrillic mapping files sent by Eugene Bobin.
|
||||
|
||||
3. Minor fixes to make compatible with the latest version of FreeType.
|
||||
|
||||
Version 1.9
|
||||
===========
|
||||
1. Fixed a problem with the first code of a mapping table being lost.
|
||||
|
||||
Version 1.8
|
||||
===========
|
||||
1. Added the Unicode->Cyrillic mapping tables provided by Eugene Bobin.
|
||||
|
||||
2. Created a shell script based on Eugene Bobin's scripts to generate sets
|
||||
of BDF fonts at one time.
|
||||
|
||||
Version 1.7
|
||||
===========
|
||||
1. If a remapping table is provided, code ranges are now expected to be
|
||||
specified in terms of the codes in the mapping table.
|
||||
|
||||
2. The glyph generation loop is improved a bit.
|
||||
|
||||
Version 1.6
|
||||
===========
|
||||
1. Added two expected keywords REGISTRY and ENCODING in the remap files.
|
||||
These values are used when the font's XLFD name is generated.
|
||||
|
||||
2. Added TTF2BDF_VERSION macro used for adding the "Converted by" comment.
|
||||
|
||||
3. Handle the case of no glyphs being generated. No BDF font is produced.
|
||||
|
||||
4. Updated for new API with TT_Engine.
|
||||
|
||||
Version 1.5
|
||||
===========
|
||||
1. Fixed a problem with updating the average width field of the XLFD
|
||||
font name.
|
||||
|
||||
2. Changed things so bitmaps are generated to a temporay file so an
|
||||
accurate count and metrics can be calculated.
|
||||
|
||||
3. Changed things so the font header is not generated until the bitmaps
|
||||
have been generated. This allows accurate calculations of the various
|
||||
fields needed.
|
||||
|
||||
4. Added the '-l' command line parameter that allows specification of a
|
||||
subrange of glyphs to generate. The syntax is the same as that used in
|
||||
X11 for subranges. See the X11 XLFD documentation, page 9 for more
|
||||
detail.
|
||||
|
||||
Example:
|
||||
|
||||
% ttf2bdf -l '60 70 80_90' font.ttf -o font.bdf
|
||||
|
||||
The command above will only generate the glyphs for codes 60, 70,
|
||||
and 80 through 90 inclusive.
|
||||
|
||||
5. Added the ability to load a mapping table that will remap a font to
|
||||
another character set. The mapping table should have two columns.
|
||||
|
||||
The first column should be the hexadecimal code of the glyph in the
|
||||
"cmap" table ttf2bdf is using. The second column should have the
|
||||
code which should be used in the BDF font. An example mapping file
|
||||
is provided which will map fonts from Unicode (default cmap table) to
|
||||
ISO8859-2.
|
||||
|
||||
6. Fixed grid fitting to avoid dropout in some cases.
|
||||
|
||||
7. Removed dependency on ttobjs.h by using the new API function for
|
||||
retrieving strings.
|
||||
|
||||
8. Removed warning about getpid() on Solaris.
|
||||
|
||||
9. Rearranged the man page a bit to be more useful. Minor
|
||||
improvements also done.
|
||||
|
||||
10. Changed the loop so it does not include 0xffff as a code because
|
||||
it causes crashes when converting some fonts.
|
||||
|
||||
Version 1.4 [Never released as binaries]
|
||||
===========
|
||||
1. Changed the names of two MS encodings (Wansung and Johab) to
|
||||
KSC5601.1987 and KSC5601.1992.
|
||||
|
||||
2. Added the '-n' command line flag to turn hinting off.
|
||||
|
||||
3. Added the '-c' command line flag to set the font spacing.
|
||||
|
||||
4. Added the '-t', '-w', and '-s' command line options to override the
|
||||
default typeface, weight and slant names.
|
||||
|
||||
Version 1.3
|
||||
===========
|
||||
1. Converted to use the new FreeType API.
|
||||
|
||||
2. Added the '-rh' and '-rv' command line parameters to allow both the
|
||||
horizontal and vertical resolutions to be set individually.
|
||||
|
||||
3. Fixed a problem with ignoring undefined glyphs. All undefined were
|
||||
being rendered which caused missing glyphs on the end.
|
||||
|
||||
4. Fixed a problem with offset calculations needed to render glyph
|
||||
bitmaps.
|
||||
|
||||
Version 1.2
|
||||
===========
|
||||
1. Fixed a problem with dashes that appear in the font family name causing
|
||||
parse problems with the XLFD font names.
|
||||
|
||||
2. Fixed a problem with certain bitmaps missing their final byte on each
|
||||
row.
|
||||
|
||||
3. Fixed an incorrect FONT_DESCENT value.
|
||||
|
||||
4. Changed things around so names can be retrieved in a more general way.
|
||||
|
||||
5. Fixed a problem with bitmaps not being generated after a certain point.
|
||||
|
||||
Version 1.1
|
||||
===========
|
||||
1. Fixed the actual glyph count for the CHARS line.
|
||||
|
||||
2. Swapped the Big5 and GB2312 XLFD encoding strings because of incorrect TT
|
||||
specifications.
|
||||
|
||||
3. Fixed a problem with bitmap generation for glyphs that are width 1 or
|
||||
height 1.
|
||||
|
||||
4. Added command line parameters to set the font and render pool memory
|
||||
sizes in Kilobytes from the command line.
|
||||
|
||||
Version 1.0
|
||||
===========
|
||||
1. Initial release.
|
||||
|
||||
mleisher@crl.nmsu.edu (Mark Leisher)
|
||||
15 October 1997
|
||||
1357
contrib/ttf2bdf/configure
vendored
Normal file
1357
contrib/ttf2bdf/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
40
contrib/ttf2bdf/configure.in
Normal file
40
contrib/ttf2bdf/configure.in
Normal file
@@ -0,0 +1,40 @@
|
||||
dnl $Id: configure.in,v 1.1 1998/01/14 21:45:26 mleisher Exp $
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(../../lib/freetype.h)
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
OLDLIBS=$LIBS
|
||||
LIBS="$LIBS -L../../lib/.libs"
|
||||
CPPFLAGS="$CPPFLAGS -I../../lib"
|
||||
AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[
|
||||
AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])])
|
||||
AC_SUBST(LIBS)
|
||||
|
||||
dnl get Compiler flags right.
|
||||
|
||||
if test "x$CC" = xgcc; then
|
||||
XX_CFLAGS="-Wall -pedantic"
|
||||
else
|
||||
case "$host" in
|
||||
alpha-dec-osf*)
|
||||
XX_CFLAGS="-std1 -O2 -g3"
|
||||
;;
|
||||
*)
|
||||
XX_CFLAGS=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(XX_CFLAGS)
|
||||
|
||||
AC_CHECK_PROG(RM, rm, rm)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_MEMCMP
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
28
contrib/ttf2bdf/contrib/KOI2iso_pcf
Normal file
28
contrib/ttf2bdf/contrib/KOI2iso_pcf
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/local/bin/perl
|
||||
#
|
||||
# hack a XFLD info - alias all fonts, declared as koi8*, to iso8859-1
|
||||
#
|
||||
# usage:
|
||||
# cd fontdir; ../ISO2koi < fonts.dir >> fonts.alias
|
||||
#
|
||||
# 1996/08/29 - vsv
|
||||
#
|
||||
while (<>) {
|
||||
chop;
|
||||
($z, $koi8) = split /[ \t]+/;
|
||||
$iso = $koi8;
|
||||
$iso =~ s/-koi8r-1/-iso8859-1/g;
|
||||
$iso =~ s/-koi8-1/-iso8859-1/g;
|
||||
$iso =~ s/-koi8-r/-iso8859-1/g;
|
||||
$iso =~ s/-cronyx-/-adobe-/g;
|
||||
$iso =~ s/-cronix-/-adobe-/g;
|
||||
## $iso =~ s/-cronix-/-hack-/g;
|
||||
## $iso =~ s/-cronyx-/-hack-/g;
|
||||
# Elvis+ fonts...
|
||||
## $iso =~ s/-adobe-/-hack-/g;
|
||||
## $iso =~ s/-dec-/-hack-/g;
|
||||
next if ("$iso" !~ /-iso8859-/);
|
||||
@z = split (/-/, $iso);
|
||||
# no matter, 10 or 12, must be more then 3-4 ;)
|
||||
printf ("\"%s\"\t\"%s\"\n", $iso, $koi8) if (@z > 10);
|
||||
}
|
||||
60
contrib/ttf2bdf/contrib/creatett
Normal file
60
contrib/ttf2bdf/contrib/creatett
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/csh
|
||||
# -*- mode:SH; -*-
|
||||
#
|
||||
# This script creates series of bdf files from TTF file.
|
||||
#
|
||||
#
|
||||
# Please set up parameters
|
||||
#
|
||||
# Font dpi:
|
||||
set DPI=96
|
||||
|
||||
#
|
||||
# TrueType files dir.
|
||||
set ttf_dir=~/ttf
|
||||
|
||||
# TTF files, please specify only base name
|
||||
# Script will try to use BolD, Italic and BoldItalic versions of face
|
||||
set FACES="ARIAL ARIBLK ARIALN TAHOMA TIMES VERDANA"
|
||||
|
||||
|
||||
# Output codepage
|
||||
# koi8.r
|
||||
# windows.1251
|
||||
# iso8859.5
|
||||
# iso8859.2
|
||||
set LANG_ID=koi8.r
|
||||
|
||||
foreach x ( 7 8 9 10 11 12 14 16 18 20 24 30 50 100 150)
|
||||
foreach z ( $FACES )
|
||||
set y = ${ttf_dir}/${z}
|
||||
#
|
||||
# Simple face
|
||||
if( -e ${y}.TTF ) then
|
||||
echo ${y} at ${x}pt
|
||||
./ttf2bdf -m $LANG_ID -p $x -r $DPI ${y}.TTF | bdftopcf | compress > ${DPI}dpi/${z}${x}.pcf.Z
|
||||
endif
|
||||
#
|
||||
# Bold face
|
||||
if( -e ${y}BD.TTF ) then
|
||||
echo Bold ${y} at ${x}pt
|
||||
./ttf2bdf -m $LANG_ID -p $x -r $DPI -w bold ${y}BD.TTF | bdftopcf | compress > ${DPI}dpi/${z}bd${x}.pcf.Z
|
||||
endif
|
||||
#
|
||||
# Italic face
|
||||
if( -e ${y}I.TTF ) then
|
||||
echo Italic ${y} at ${x}pt
|
||||
./ttf2bdf -m $LANG_ID -p $x -r $DPI -s o ${y}I.TTF | bdftopcf | compress >${DPI}dpi/${z}i${x}.pcf.Z
|
||||
endif
|
||||
#
|
||||
# Bold Italic face
|
||||
if( -e ${y}BI.TTF ) then
|
||||
echo Bold Italic ${y} at ${x}pt
|
||||
./ttf2bdf -m $LANG_ID -p $x -r $DPI -w bold -s o ${y}BI.TTF | bdftopcf | compress > ${DPI}dpi/${z}bi${x}.pcf.Z
|
||||
endif
|
||||
end
|
||||
end
|
||||
|
||||
echo Creating fonts directory...
|
||||
cd ${DPI}dpi
|
||||
mkfontdir
|
||||
59
contrib/ttf2bdf/contrib/creatett.m
Normal file
59
contrib/ttf2bdf/contrib/creatett.m
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/bin/csh
|
||||
# -*- mode:SH; -*-
|
||||
#
|
||||
# This script creates series of bdf files from TTF file.
|
||||
#
|
||||
#
|
||||
# Please set up parameters
|
||||
#
|
||||
# Font dpi:
|
||||
set DPI=96
|
||||
|
||||
#
|
||||
# TrueType files dir.
|
||||
set ttf_dir=~/ttf
|
||||
|
||||
# TTF files, please specify only base name
|
||||
# Script will try to use BolD, Italic and BoldItalic versions of face
|
||||
set FACES="COUR MONOTYPE"
|
||||
|
||||
# Output codepage
|
||||
# koi8.r
|
||||
# windows.1251
|
||||
# iso8859.5
|
||||
# iso8859.2
|
||||
set LANG_ID=koi8.r
|
||||
|
||||
foreach x ( 7 8 9 10 11 12 14 16 18 20 24 30 50 100 150)
|
||||
foreach z ( $FACES )
|
||||
set y = ${ttf_dir}/${z}
|
||||
#
|
||||
# Simple face
|
||||
if( -e ${y}.TTF ) then
|
||||
echo ${z} at ${x}pt
|
||||
./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI ${y}.TTF | bdftopcf | compress > ${DPI}dpi/${z}${x}.pcf.Z
|
||||
endif
|
||||
#
|
||||
# Bold face
|
||||
if( -e ${y}BD.TTF ) then
|
||||
echo Bold ${z} at ${x}pt
|
||||
./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI -w bold ${y}BD.TTF | bdftopcf | compress > ${DPI}dpi/${z}bd${x}.pcf.Z
|
||||
endif
|
||||
#
|
||||
# Italic face
|
||||
if( -e ${y}I.TTF ) then
|
||||
echo Italic ${z} at ${x}pt
|
||||
./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI -s o ${y}I.TTF | bdftopcf | compress >${DPI}dpi/${z}i${x}.pcf.Z
|
||||
endif
|
||||
#
|
||||
# Bold Italic face
|
||||
if( -e ${y}BI.TTF ) then
|
||||
echo Bold Italic ${z} at ${x}pt
|
||||
./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI -w bold -s o ${y}BI.TTF | bdftopcf | compress > ${DPI}dpi/${z}bi${x}.pcf.Z
|
||||
endif
|
||||
end
|
||||
end
|
||||
|
||||
#echo Creating fonts directory...
|
||||
#cd ${DPI}dpi
|
||||
#mkfontdir
|
||||
278
contrib/ttf2bdf/maps/iso8859.1
Normal file
278
contrib/ttf2bdf/maps/iso8859.1
Normal file
@@ -0,0 +1,278 @@
|
||||
#
|
||||
# $Id: iso8859.1,v 1.2 1999/06/16 16:13:11 mleisher Exp $
|
||||
#
|
||||
# SAMPLE TTF2BDF MAPPING TABLE
|
||||
#
|
||||
# Mapping table from Unicode to ISO8859-1. Names are from the Unicode
|
||||
# Character Database on ftp.unicode.org.
|
||||
#
|
||||
# Two keywords are used to specify the character set registry and encoding:
|
||||
# REGISTRY and ENCODING. These will be used when creating the XLFD name
|
||||
# for the font.
|
||||
#
|
||||
# Column 1 is the ISO8859-1 value, and column 2 is the Unicode value. The
|
||||
# columns can be separated by tabs or whitespace, and only the first two
|
||||
# columns are used.
|
||||
#
|
||||
# Empty lines and lines starting with '#' are ignored.
|
||||
#
|
||||
# NOTE: made with material from "The ISO 8859 Alphabet Soup" --solofo
|
||||
#
|
||||
REGISTRY ISO8859
|
||||
ENCODING 1
|
||||
0x00 0x0000 # <control>
|
||||
0x01 0x0001 # <control>
|
||||
0x02 0x0002 # <control>
|
||||
0x03 0x0003 # <control>
|
||||
0x04 0x0004 # <control>
|
||||
0x05 0x0005 # <control>
|
||||
0x06 0x0006 # <control>
|
||||
0x07 0x0007 # <control>
|
||||
0x08 0x0008 # <control>
|
||||
0x09 0x0009 # <control>
|
||||
0x0A 0x000A # <control>
|
||||
0x0B 0x000B # <control>
|
||||
0x0C 0x000C # <control>
|
||||
0x0D 0x000D # <control>
|
||||
0x0E 0x000E # <control>
|
||||
0x0F 0x000F # <control>
|
||||
0x10 0x0010 # <control>
|
||||
0x11 0x0011 # <control>
|
||||
0x12 0x0012 # <control>
|
||||
0x13 0x0013 # <control>
|
||||
0x14 0x0014 # <control>
|
||||
0x15 0x0015 # <control>
|
||||
0x16 0x0016 # <control>
|
||||
0x17 0x0017 # <control>
|
||||
0x18 0x0018 # <control>
|
||||
0x19 0x0019 # <control>
|
||||
0x1A 0x001A # <control>
|
||||
0x1B 0x001B # <control>
|
||||
0x1C 0x001C # <control>
|
||||
0x1D 0x001D # <control>
|
||||
0x1E 0x001E # <control>
|
||||
0x1F 0x001F # <control>
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0x7F 0x007F # <control>
|
||||
0x80 0x0080 # <control>
|
||||
0x81 0x0081 # <control>
|
||||
0x82 0x0082 # <control>
|
||||
0x83 0x0083 # <control>
|
||||
0x84 0x0084 # <control>
|
||||
0x85 0x0085 # <control>
|
||||
0x86 0x0086 # <control>
|
||||
0x87 0x0087 # <control>
|
||||
0x88 0x0088 # <control>
|
||||
0x89 0x0089 # <control>
|
||||
0x8A 0x008A # <control>
|
||||
0x8B 0x008B # <control>
|
||||
0x8C 0x008C # <control>
|
||||
0x8D 0x008D # <control>
|
||||
0x8E 0x008E # <control>
|
||||
0x8F 0x008F # <control>
|
||||
0x90 0x0090 # <control>
|
||||
0x91 0x0091 # <control>
|
||||
0x92 0x0092 # <control>
|
||||
0x93 0x0093 # <control>
|
||||
0x94 0x0094 # <control>
|
||||
0x95 0x0095 # <control>
|
||||
0x96 0x0096 # <control>
|
||||
0x97 0x0097 # <control>
|
||||
0x98 0x0098 # <control>
|
||||
0x99 0x0099 # <control>
|
||||
0x9A 0x009A # <control>
|
||||
0x9B 0x009B # <control>
|
||||
0x9C 0x009C # <control>
|
||||
0x9D 0x009D # <control>
|
||||
0x9E 0x009E # <control>
|
||||
0x9F 0x009F # <control>
|
||||
0xA0 0x00A0 # NO-BREAK SPACE
|
||||
0xA1 0x00A1 # INVERTED EXCLAMATION MARK
|
||||
0xA2 0x00A2 # CENT SIGN
|
||||
0xA3 0x00A3 # POUND SIGN
|
||||
0xA4 0x00A4 # CURRENCY SIGN
|
||||
0xA5 0x00A5 # YEN SIGN
|
||||
0xA6 0x00A6 # BROKEN BAR
|
||||
0xA7 0x00A7 # SECTION SIGN
|
||||
0xA8 0x00A8 # DIAERESIS
|
||||
0xA9 0x00A9 # COPYRIGHT SIGN
|
||||
0xAA 0x00AA # FEMININE ORDINAL INDICATOR
|
||||
0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xAC 0x00AC # NOT SIGN
|
||||
0xAD 0x00AD # SOFT HYPHEN
|
||||
0xAE 0x00AE # REGISTERED SIGN
|
||||
0xAF 0x00AF # MACRON
|
||||
0xB0 0x00B0 # DEGREE SIGN
|
||||
0xB1 0x00B1 # PLUS-MINUS SIGN
|
||||
0xB2 0x00B2 # SUPERSCRIPT TWO
|
||||
0xB3 0x00B3 # SUPERSCRIPT THREE
|
||||
0xB4 0x00B4 # ACUTE ACCENT
|
||||
0xB5 0x00B5 # MICRO SIGN
|
||||
0xB6 0x00B6 # PILCROW SIGN
|
||||
0xB7 0x00B7 # MIDDLE DOT
|
||||
0xB8 0x00B8 # CEDILLA
|
||||
0xB9 0x00B9 # SUPERSCRIPT ONE
|
||||
0xBA 0x00BA # MASCULINE ORDINAL INDICATOR
|
||||
0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xBC 0x00BC # VULGAR FRACTION ONE QUARTER
|
||||
0xBD 0x00BD # VULGAR FRACTION ONE HALF
|
||||
0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS
|
||||
0xBF 0x00BF # INVERTED QUESTION MARK
|
||||
0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE
|
||||
0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE
|
||||
0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE
|
||||
0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
|
||||
0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE
|
||||
0xC6 0x00C6 # LATIN CAPITAL LETTER AE
|
||||
0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE
|
||||
0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE
|
||||
0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
||||
0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS
|
||||
0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE
|
||||
0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE
|
||||
0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
||||
0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS
|
||||
0xD0 0x00D0 # LATIN CAPITAL LETTER ETH
|
||||
0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE
|
||||
0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE
|
||||
0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE
|
||||
0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
||||
0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE
|
||||
0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS
|
||||
0xD7 0x00D7 # MULTIPLICATION SIGN
|
||||
0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE
|
||||
0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE
|
||||
0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE
|
||||
0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
||||
0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS
|
||||
0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE
|
||||
0xDE 0x00DE # LATIN CAPITAL LETTER THORN
|
||||
0xDF 0x00DF # LATIN SMALL LETTER SHARP S
|
||||
0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE
|
||||
0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE
|
||||
0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE
|
||||
0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS
|
||||
0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE
|
||||
0xE6 0x00E6 # LATIN SMALL LETTER AE
|
||||
0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA
|
||||
0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE
|
||||
0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE
|
||||
0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS
|
||||
0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE
|
||||
0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE
|
||||
0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS
|
||||
0xF0 0x00F0 # LATIN SMALL LETTER ETH
|
||||
0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE
|
||||
0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE
|
||||
0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE
|
||||
0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE
|
||||
0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS
|
||||
0xF7 0x00F7 # DIVISION SIGN
|
||||
0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE
|
||||
0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE
|
||||
0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE
|
||||
0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS
|
||||
0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE
|
||||
0xFE 0x00FE # LATIN SMALL LETTER THORN
|
||||
0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
276
contrib/ttf2bdf/maps/iso8859.2
Normal file
276
contrib/ttf2bdf/maps/iso8859.2
Normal file
@@ -0,0 +1,276 @@
|
||||
#
|
||||
# $Id: iso8859.2,v 1.2 1999/06/16 16:13:11 mleisher Exp $
|
||||
#
|
||||
# SAMPLE TTF2BDF MAPPING TABLE
|
||||
#
|
||||
# Mapping table from Unicode to ISO8859-2. Names are from the Unicode
|
||||
# Character Database on ftp.unicode.org.
|
||||
#
|
||||
# Two keywords are used to specify the character set registry and encoding:
|
||||
# REGISTRY and ENCODING. These will be used when creating the XLFD name
|
||||
# for the font.
|
||||
#
|
||||
# Column 1 is the ISO8859-2 value, and column 2 is the Unicode value. The
|
||||
# columns can be separated by tabs or whitespace, and only the first two
|
||||
# columns are used.
|
||||
#
|
||||
# Empty lines and lines starting with '#' are ignored.
|
||||
#
|
||||
REGISTRY ISO8859
|
||||
ENCODING 2
|
||||
0x00 0x0000 # <control>
|
||||
0x01 0x0001 # <control>
|
||||
0x02 0x0002 # <control>
|
||||
0x03 0x0003 # <control>
|
||||
0x04 0x0004 # <control>
|
||||
0x05 0x0005 # <control>
|
||||
0x06 0x0006 # <control>
|
||||
0x07 0x0007 # <control>
|
||||
0x08 0x0008 # <control>
|
||||
0x09 0x0009 # <control>
|
||||
0x0A 0x000A # <control>
|
||||
0x0B 0x000B # <control>
|
||||
0x0C 0x000C # <control>
|
||||
0x0D 0x000D # <control>
|
||||
0x0E 0x000E # <control>
|
||||
0x0F 0x000F # <control>
|
||||
0x10 0x0010 # <control>
|
||||
0x11 0x0011 # <control>
|
||||
0x12 0x0012 # <control>
|
||||
0x13 0x0013 # <control>
|
||||
0x14 0x0014 # <control>
|
||||
0x15 0x0015 # <control>
|
||||
0x16 0x0016 # <control>
|
||||
0x17 0x0017 # <control>
|
||||
0x18 0x0018 # <control>
|
||||
0x19 0x0019 # <control>
|
||||
0x1A 0x001A # <control>
|
||||
0x1B 0x001B # <control>
|
||||
0x1C 0x001C # <control>
|
||||
0x1D 0x001D # <control>
|
||||
0x1E 0x001E # <control>
|
||||
0x1F 0x001F # <control>
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0x7F 0x007F # <control>
|
||||
0x80 0x0080 # <control>
|
||||
0x81 0x0081 # <control>
|
||||
0x82 0x0082 # <control>
|
||||
0x83 0x0083 # <control>
|
||||
0x84 0x0084 # <control>
|
||||
0x85 0x0085 # <control>
|
||||
0x86 0x0086 # <control>
|
||||
0x87 0x0087 # <control>
|
||||
0x88 0x0088 # <control>
|
||||
0x89 0x0089 # <control>
|
||||
0x8A 0x008A # <control>
|
||||
0x8B 0x008B # <control>
|
||||
0x8C 0x008C # <control>
|
||||
0x8D 0x008D # <control>
|
||||
0x8E 0x008E # <control>
|
||||
0x8F 0x008F # <control>
|
||||
0x90 0x0090 # <control>
|
||||
0x91 0x0091 # <control>
|
||||
0x92 0x0092 # <control>
|
||||
0x93 0x0093 # <control>
|
||||
0x94 0x0094 # <control>
|
||||
0x95 0x0095 # <control>
|
||||
0x96 0x0096 # <control>
|
||||
0x97 0x0097 # <control>
|
||||
0x98 0x0098 # <control>
|
||||
0x99 0x0099 # <control>
|
||||
0x9A 0x009A # <control>
|
||||
0x9B 0x009B # <control>
|
||||
0x9C 0x009C # <control>
|
||||
0x9D 0x009D # <control>
|
||||
0x9E 0x009E # <control>
|
||||
0x9F 0x009F # <control>
|
||||
0xA0 0x00A0 # NO-BREAK SPACE
|
||||
0xA1 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK
|
||||
0xA2 0x02D8 # BREVE
|
||||
0xA3 0x0141 # LATIN CAPITAL LETTER L WITH STROKE
|
||||
0xA4 0x00A4 # CURRENCY SIGN
|
||||
0xA5 0x013D # LATIN CAPITAL LETTER L WITH CARON
|
||||
0xA6 0x015A # LATIN CAPITAL LETTER S WITH ACUTE
|
||||
0xA7 0x00A7 # SECTION SIGN
|
||||
0xA8 0x00A8 # DIAERESIS
|
||||
0xA9 0x0160 # LATIN CAPITAL LETTER S WITH CARON
|
||||
0xAA 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA
|
||||
0xAB 0x0164 # LATIN CAPITAL LETTER T WITH CARON
|
||||
0xAC 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE
|
||||
0xAD 0x00AD # SOFT HYPHEN
|
||||
0xAE 0x017D # LATIN CAPITAL LETTER Z WITH CARON
|
||||
0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE
|
||||
0xB0 0x00B0 # DEGREE SIGN
|
||||
0xB1 0x0105 # LATIN SMALL LETTER A WITH OGONEK
|
||||
0xB2 0x02DB # OGONEK
|
||||
0xB3 0x0142 # LATIN SMALL LETTER L WITH STROKE
|
||||
0xB4 0x00B4 # ACUTE ACCENT
|
||||
0xB5 0x013E # LATIN SMALL LETTER L WITH CARON
|
||||
0xB6 0x015B # LATIN SMALL LETTER S WITH ACUTE
|
||||
0xB7 0x02C7 # CARON
|
||||
0xB8 0x00B8 # CEDILLA
|
||||
0xB9 0x0161 # LATIN SMALL LETTER S WITH CARON
|
||||
0xBA 0x015F # LATIN SMALL LETTER S WITH CEDILLA
|
||||
0xBB 0x0165 # LATIN SMALL LETTER T WITH CARON
|
||||
0xBC 0x017A # LATIN SMALL LETTER Z WITH ACUTE
|
||||
0xBD 0x02DD # DOUBLE ACUTE ACCENT
|
||||
0xBE 0x017E # LATIN SMALL LETTER Z WITH CARON
|
||||
0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE
|
||||
0xC0 0x0154 # LATIN CAPITAL LETTER R WITH ACUTE
|
||||
0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE
|
||||
0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
0xC3 0x0102 # LATIN CAPITAL LETTER A WITH BREVE
|
||||
0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
|
||||
0xC5 0x0139 # LATIN CAPITAL LETTER L WITH ACUTE
|
||||
0xC6 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE
|
||||
0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON
|
||||
0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE
|
||||
0xCA 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK
|
||||
0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS
|
||||
0xCC 0x011A # LATIN CAPITAL LETTER E WITH CARON
|
||||
0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE
|
||||
0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
||||
0xCF 0x010E # LATIN CAPITAL LETTER D WITH CARON
|
||||
0xD0 0x0110 # LATIN CAPITAL LETTER D WITH STROKE
|
||||
0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE
|
||||
0xD2 0x0147 # LATIN CAPITAL LETTER N WITH CARON
|
||||
0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE
|
||||
0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
||||
0xD5 0x0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
|
||||
0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS
|
||||
0xD7 0x00D7 # MULTIPLICATION SIGN
|
||||
0xD8 0x0158 # LATIN CAPITAL LETTER R WITH CARON
|
||||
0xD9 0x016E # LATIN CAPITAL LETTER U WITH RING ABOVE
|
||||
0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE
|
||||
0xDB 0x0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
|
||||
0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS
|
||||
0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE
|
||||
0xDE 0x0162 # LATIN CAPITAL LETTER T WITH CEDILLA
|
||||
0xDF 0x00DF # LATIN SMALL LETTER SHARP S
|
||||
0xE0 0x0155 # LATIN SMALL LETTER R WITH ACUTE
|
||||
0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE
|
||||
0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
0xE3 0x0103 # LATIN SMALL LETTER A WITH BREVE
|
||||
0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS
|
||||
0xE5 0x013A # LATIN SMALL LETTER L WITH ACUTE
|
||||
0xE6 0x0107 # LATIN SMALL LETTER C WITH ACUTE
|
||||
0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA
|
||||
0xE8 0x010D # LATIN SMALL LETTER C WITH CARON
|
||||
0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE
|
||||
0xEA 0x0119 # LATIN SMALL LETTER E WITH OGONEK
|
||||
0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS
|
||||
0xEC 0x011B # LATIN SMALL LETTER E WITH CARON
|
||||
0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE
|
||||
0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
0xEF 0x010F # LATIN SMALL LETTER D WITH CARON
|
||||
0xF0 0x0111 # LATIN SMALL LETTER D WITH STROKE
|
||||
0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE
|
||||
0xF2 0x0148 # LATIN SMALL LETTER N WITH CARON
|
||||
0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE
|
||||
0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
0xF5 0x0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE
|
||||
0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS
|
||||
0xF7 0x00F7 # DIVISION SIGN
|
||||
0xF8 0x0159 # LATIN SMALL LETTER R WITH CARON
|
||||
0xF9 0x016F # LATIN SMALL LETTER U WITH RING ABOVE
|
||||
0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE
|
||||
0xFB 0x0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE
|
||||
0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS
|
||||
0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE
|
||||
0xFE 0x0163 # LATIN SMALL LETTER T WITH CEDILLA
|
||||
0xFF 0x02D9 # DOT ABOVE
|
||||
271
contrib/ttf2bdf/maps/iso8859.3
Normal file
271
contrib/ttf2bdf/maps/iso8859.3
Normal file
@@ -0,0 +1,271 @@
|
||||
#
|
||||
# $Id: iso8859.3,v 1.2 1999/06/16 16:13:11 mleisher Exp $
|
||||
#
|
||||
# SAMPLE TTF2BDF MAPPING TABLE
|
||||
#
|
||||
# Mapping table from Unicode to ISO8859-3. Names are from the Unicode
|
||||
# Character Database on ftp.unicode.org.
|
||||
#
|
||||
# Two keywords are used to specify the character set registry and encoding:
|
||||
# REGISTRY and ENCODING. These will be used when creating the XLFD name
|
||||
# for the font.
|
||||
#
|
||||
# Column 1 is the ISO8859-3 value, and column 2 is the Unicode value. The
|
||||
# columns can be separated by tabs or whitespace, and only the first two
|
||||
# columns are used.
|
||||
#
|
||||
# Empty lines and lines starting with '#' are ignored.
|
||||
#
|
||||
# NOTE: prepared with material from "The ISO 8859 Alphabet Soup"
|
||||
#
|
||||
REGISTRY ISO8859
|
||||
ENCODING 3
|
||||
0x00 0x0000 # <control>
|
||||
0x01 0x0001 # <control>
|
||||
0x02 0x0002 # <control>
|
||||
0x03 0x0003 # <control>
|
||||
0x04 0x0004 # <control>
|
||||
0x05 0x0005 # <control>
|
||||
0x06 0x0006 # <control>
|
||||
0x07 0x0007 # <control>
|
||||
0x08 0x0008 # <control>
|
||||
0x09 0x0009 # <control>
|
||||
0x0A 0x000A # <control>
|
||||
0x0B 0x000B # <control>
|
||||
0x0C 0x000C # <control>
|
||||
0x0D 0x000D # <control>
|
||||
0x0E 0x000E # <control>
|
||||
0x0F 0x000F # <control>
|
||||
0x10 0x0010 # <control>
|
||||
0x11 0x0011 # <control>
|
||||
0x12 0x0012 # <control>
|
||||
0x13 0x0013 # <control>
|
||||
0x14 0x0014 # <control>
|
||||
0x15 0x0015 # <control>
|
||||
0x16 0x0016 # <control>
|
||||
0x17 0x0017 # <control>
|
||||
0x18 0x0018 # <control>
|
||||
0x19 0x0019 # <control>
|
||||
0x1A 0x001A # <control>
|
||||
0x1B 0x001B # <control>
|
||||
0x1C 0x001C # <control>
|
||||
0x1D 0x001D # <control>
|
||||
0x1E 0x001E # <control>
|
||||
0x1F 0x001F # <control>
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0x7F 0x007F # <control>
|
||||
0x80 0x0080 # <control>
|
||||
0x81 0x0081 # <control>
|
||||
0x82 0x0082 # <control>
|
||||
0x83 0x0083 # <control>
|
||||
0x84 0x0084 # <control>
|
||||
0x85 0x0085 # <control>
|
||||
0x86 0x0086 # <control>
|
||||
0x87 0x0087 # <control>
|
||||
0x88 0x0088 # <control>
|
||||
0x89 0x0089 # <control>
|
||||
0x8A 0x008A # <control>
|
||||
0x8B 0x008B # <control>
|
||||
0x8C 0x008C # <control>
|
||||
0x8D 0x008D # <control>
|
||||
0x8E 0x008E # <control>
|
||||
0x8F 0x008F # <control>
|
||||
0x90 0x0090 # <control>
|
||||
0x91 0x0091 # <control>
|
||||
0x92 0x0092 # <control>
|
||||
0x93 0x0093 # <control>
|
||||
0x94 0x0094 # <control>
|
||||
0x95 0x0095 # <control>
|
||||
0x96 0x0096 # <control>
|
||||
0x97 0x0097 # <control>
|
||||
0x98 0x0098 # <control>
|
||||
0x99 0x0099 # <control>
|
||||
0x9A 0x009A # <control>
|
||||
0x9B 0x009B # <control>
|
||||
0x9C 0x009C # <control>
|
||||
0x9D 0x009D # <control>
|
||||
0x9E 0x009E # <control>
|
||||
0x9F 0x009F # <control>
|
||||
0xA0 0x00A0 # NO-BREAK SPACE
|
||||
0xA1 0x0126 # LATIN CAPITAL LETTER H WITH STROKE
|
||||
0xA2 0x02D8 # BREVE
|
||||
0xA3 0x00A3 # POUND SIGN
|
||||
0xA4 0x00A4 # CURRENCY SIGN
|
||||
0xA6 0x0124 # LATIN CAPITAL LETTER H WITH CIRCUMFLEX
|
||||
0xA7 0x00A7 # SECTION SIGN
|
||||
0xA8 0x00A8 # DIAERESIS
|
||||
0xA9 0x0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
0xAA 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA
|
||||
0xAB 0x011E # LATIN CAPITAL LETTER G WITH BREVE
|
||||
0xAC 0x0134 # LATIN CAPITAL LETTER J WITH CIRCUMFLEX
|
||||
0xAD 0x00AD # SOFT HYPHEN
|
||||
0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE
|
||||
0xB0 0x00B0 # DEGREE SIGN
|
||||
0xB1 0x0127 # LATIN SMALL LETTER H WITH STROKE
|
||||
0xB2 0x00B2 # SUPERSCRIPT TWO
|
||||
0xB3 0x00B3 # SUPERSCRIPT THREE
|
||||
0xB4 0x00B4 # ACUTE ACCENT
|
||||
0xB5 0x00B5 # MICRO SIGN
|
||||
0xB6 0x0125 # LATIN SMALL LETTER H WITH CIRCUMFLEX
|
||||
0xB7 0x00B7 # MIDDLE DOT
|
||||
0xB8 0x00B8 # CEDILLA
|
||||
0xB9 0x0131 # LATIN SMALL LETTER DOTLESS I
|
||||
0xBA 0x015F # LATIN SMALL LETTER S WITH CEDILLA
|
||||
0xBB 0x011F # LATIN SMALL LETTER G WITH BREVE
|
||||
0xBC 0x0135 # LATIN SMALL LETTER J WITH CIRCUMFLEX
|
||||
0xBD 0x00BD # VULGAR FRACTION ONE HALF
|
||||
0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE
|
||||
0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE
|
||||
0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE
|
||||
0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
|
||||
0xC5 0x010A # LATIN CAPITAL LETTER C WITH DOT ABOVE
|
||||
0xC6 0x0108 # LATIN CAPITAL LETTER C WITH CIRCUMFLEX
|
||||
0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA
|
||||
0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE
|
||||
0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE
|
||||
0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
||||
0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS
|
||||
0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE
|
||||
0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE
|
||||
0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
|
||||
0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS
|
||||
0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE
|
||||
0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE
|
||||
0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE
|
||||
0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
||||
0xD5 0x0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE
|
||||
0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS
|
||||
0xD7 0x00D7 # MULTIPLICATION SIGN
|
||||
0xD8 0x011C # LATIN CAPITAL LETTER G WITH CIRCUMFLEX
|
||||
0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE
|
||||
0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE
|
||||
0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
|
||||
0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS
|
||||
0xDD 0x016C # LATIN CAPITAL LETTER U WITH BREVE
|
||||
0xDE 0x015C # LATIN CAPITAL LETTER S WITH CIRCUMFLEX
|
||||
0xDF 0x00DF # LATIN SMALL LETTER SHARP S
|
||||
0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE
|
||||
0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE
|
||||
0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS
|
||||
0xE5 0x010B # LATIN SMALL LETTER C WITH DOT ABOVE
|
||||
0xE6 0x0109 # LATIN SMALL LETTER C WITH CIRCUMFLEX
|
||||
0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA
|
||||
0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE
|
||||
0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE
|
||||
0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS
|
||||
0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE
|
||||
0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE
|
||||
0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX
|
||||
0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS
|
||||
0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE
|
||||
0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE
|
||||
0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE
|
||||
0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
0xF5 0x0121 # LATIN SMALL LETTER G WITH DOT ABOVE
|
||||
0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS
|
||||
0xF7 0x00F7 # DIVISION SIGN
|
||||
0xF8 0x011D # LATIN SMALL LETTER G WITH CIRCUMFLEX
|
||||
0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE
|
||||
0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE
|
||||
0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS
|
||||
0xFD 0x016D # LATIN SMALL LETTER U WITH BREVE
|
||||
0xFE 0x015D # LATIN SMALL LETTER S WITH CIRCUMFLEX
|
||||
0xFF 0x02D9 # DOT ABOVE
|
||||
265
contrib/ttf2bdf/maps/iso8859.5
Normal file
265
contrib/ttf2bdf/maps/iso8859.5
Normal file
@@ -0,0 +1,265 @@
|
||||
#/*
|
||||
# * Unicode 2.0 -> iso8859-5
|
||||
# *
|
||||
# * 04 Jan 98 | Eugene Bobin, <gene@ftim.ustu.ru>
|
||||
# *
|
||||
# * Modified 16 June 99 Mark Leisher <mleisher@crl.nmsu.edu>
|
||||
# */
|
||||
REGISTRY ISO8859
|
||||
ENCODING 5
|
||||
0x00 0x0000 # <control>
|
||||
0x01 0x0001 # <control>
|
||||
0x02 0x0002 # <control>
|
||||
0x03 0x0003 # <control>
|
||||
0x04 0x0004 # <control>
|
||||
0x05 0x0005 # <control>
|
||||
0x06 0x0006 # <control>
|
||||
0x07 0x0007 # <control>
|
||||
0x08 0x0008 # <control>
|
||||
0x09 0x0009 # <control>
|
||||
0x0A 0x000A # <control>
|
||||
0x0B 0x000B # <control>
|
||||
0x0C 0x000C # <control>
|
||||
0x0D 0x000D # <control>
|
||||
0x0E 0x000E # <control>
|
||||
0x0F 0x000F # <control>
|
||||
0x10 0x0010 # <control>
|
||||
0x11 0x0011 # <control>
|
||||
0x12 0x0012 # <control>
|
||||
0x13 0x0013 # <control>
|
||||
0x14 0x0014 # <control>
|
||||
0x15 0x0015 # <control>
|
||||
0x16 0x0016 # <control>
|
||||
0x17 0x0017 # <control>
|
||||
0x18 0x0018 # <control>
|
||||
0x19 0x0019 # <control>
|
||||
0x1A 0x001A # <control>
|
||||
0x1B 0x001B # <control>
|
||||
0x1C 0x001C # <control>
|
||||
0x1D 0x001D # <control>
|
||||
0x1E 0x001E # <control>
|
||||
0x1F 0x001F # <control>
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0x7F 0x007F # <control>
|
||||
0x80 0x0080 # <control>
|
||||
0x81 0x0081 # <control>
|
||||
0x82 0x0082 # <control>
|
||||
0x83 0x0083 # <control>
|
||||
0x84 0x0084 # <control>
|
||||
0x85 0x0085 # <control>
|
||||
0x86 0x0086 # <control>
|
||||
0x87 0x0087 # <control>
|
||||
0x88 0x0088 # <control>
|
||||
0x89 0x0089 # <control>
|
||||
0x8A 0x008A # <control>
|
||||
0x8B 0x008B # <control>
|
||||
0x8C 0x008C # <control>
|
||||
0x8D 0x008D # <control>
|
||||
0x8E 0x008E # <control>
|
||||
0x8F 0x008F # <control>
|
||||
0x90 0x0090 # <control>
|
||||
0x91 0x0091 # <control>
|
||||
0x92 0x0092 # <control>
|
||||
0x93 0x0093 # <control>
|
||||
0x94 0x0094 # <control>
|
||||
0x95 0x0095 # <control>
|
||||
0x96 0x0096 # <control>
|
||||
0x97 0x0097 # <control>
|
||||
0x98 0x0098 # <control>
|
||||
0x99 0x0099 # <control>
|
||||
0x9A 0x009A # <control>
|
||||
0x9B 0x009B # <control>
|
||||
0x9C 0x009C # <control>
|
||||
0x9D 0x009D # <control>
|
||||
0x9E 0x009E # <control>
|
||||
0x9F 0x009F # <control>
|
||||
0xA0 0x00A0 # NO-BREAK SPACE
|
||||
0xA1 0x0401 # CYRILLIC CAPITAL LETTER IO /* <20> */
|
||||
0xA2 0x00A2 # CENT SIGN
|
||||
0xA3 0x00A3 # POUND SIGN
|
||||
0xA4 0x00A4 # CURRENCY SIGN
|
||||
0xA5 0x00A5 # YEN SIGN
|
||||
0xA6 0x00A6 # BROKEN BAR
|
||||
0xA7 0x00A7 # SECTION SIGN
|
||||
0xA8 0x00A8 # DIAERESIS
|
||||
0xA9 0x00A9 # COPYRIGHT SIGN
|
||||
0xAA 0x00AA # FEMININE ORDINAL INDICATOR
|
||||
0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xAC 0x00AC # NOT SIGN
|
||||
0xAD 0x00AD # SOFT HYPHEN
|
||||
0xAE 0x00AE # REGISTERED SIGN
|
||||
0xAF 0x00AF # MACRON
|
||||
0xB0 0x0410 # CYRILLIC CAPITAL LETTER A /* <20> */
|
||||
0xB1 0x0411 # CYRILLIC CAPITAL LETTER BE /* <20> */
|
||||
0xB2 0x0412 # CYRILLIC CAPITAL LETTER VE /* <20> */
|
||||
0xB3 0x0413 # CYRILLIC CAPITAL LETTER GHE /* <20> */
|
||||
0xB4 0x0414 # CYRILLIC CAPITAL LETTER DE /* <20> */
|
||||
0xB5 0x0415 # CYRILLIC CAPITAL LETTER IE /* <20> */
|
||||
0xB6 0x0416 # CYRILLIC CAPITAL LETTER ZHE /* <20> */
|
||||
0xB7 0x0417 # CYRILLIC CAPITAL LETTER ZE /* <20> */
|
||||
0xB8 0x0418 # CYRILLIC CAPITAL LETTER I /* <20> */
|
||||
0xB9 0x0419 # CYRILLIC CAPITAL LETTER SHORT I /* <20> */
|
||||
0xBA 0x041A # CYRILLIC CAPITAL LETTER KA /* <20> */
|
||||
0xBB 0x041B # CYRILLIC CAPITAL LETTER EL /* <20> */
|
||||
0xBC 0x041C # CYRILLIC CAPITAL LETTER EM /* <20> */
|
||||
0xBD 0x041D # CYRILLIC CAPITAL LETTER EN /* <20> */
|
||||
0xBE 0x041E # CYRILLIC CAPITAL LETTER O /* <20> */
|
||||
0xBF 0x041F # CYRILLIC CAPITAL LETTER PE /* <20> */
|
||||
0xC0 0x0420 # CYRILLIC CAPITAL LETTER ER /* <20> */
|
||||
0xC1 0x0421 # CYRILLIC CAPITAL LETTER ES /* <20> */
|
||||
0xC2 0x0422 # CYRILLIC CAPITAL LETTER TE /* <20> */
|
||||
0xC3 0x0423 # CYRILLIC CAPITAL LETTER U /* <20> */
|
||||
0xC4 0x0424 # CYRILLIC CAPITAL LETTER EF /* <20> */
|
||||
0xC5 0x0425 # CYRILLIC CAPITAL LETTER HA /* <20> */
|
||||
0xC6 0x0426 # CYRILLIC CAPITAL LETTER TSE /* <20> */
|
||||
0xC7 0x0427 # CYRILLIC CAPITAL LETTER CHE /* <20> */
|
||||
0xC8 0x0428 # CYRILLIC CAPITAL LETTER SHA /* <20> */
|
||||
0xC9 0x0429 # CYRILLIC CAPITAL LETTER SHCHA /* <20> */
|
||||
0xCA 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN /* <20> */
|
||||
0xCB 0x042B # CYRILLIC CAPITAL LETTER YERU /* <20> */
|
||||
0xCC 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN /* <20> */
|
||||
0xCD 0x042D # CYRILLIC CAPITAL LETTER E /* <20> */
|
||||
0xCE 0x042E # CYRILLIC CAPITAL LETTER YU /* <20> */
|
||||
0xCF 0x042F # CYRILLIC CAPITAL LETTER YA /* <20> */
|
||||
0xD0 0x0430 # CYRILLIC SMALL LETTER A /* <20> */
|
||||
0xD1 0x0431 # CYRILLIC SMALL LETTER BE /* <20> */
|
||||
0xD2 0x0432 # CYRILLIC SMALL LETTER VE /* <20> */
|
||||
0xD3 0x0433 # CYRILLIC SMALL LETTER GHE /* <20> */
|
||||
0xD4 0x0434 # CYRILLIC SMALL LETTER DE /* <20> */
|
||||
0xD5 0x0435 # CYRILLIC SMALL LETTER IE /* <20> */
|
||||
0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE /* <20> */
|
||||
0xD7 0x0437 # CYRILLIC SMALL LETTER ZE /* <20> */
|
||||
0xD8 0x0438 # CYRILLIC SMALL LETTER I /* <20> */
|
||||
0xD9 0x0439 # CYRILLIC SMALL LETTER SHORT I /* <20> */
|
||||
0xDA 0x043A # CYRILLIC SMALL LETTER KA /* <20> */
|
||||
0xDB 0x043B # CYRILLIC SMALL LETTER EL /* <20> */
|
||||
0xDC 0x043C # CYRILLIC SMALL LETTER EM /* <20> */
|
||||
0xDD 0x043D # CYRILLIC SMALL LETTER EN /* <20> */
|
||||
0xDE 0x043E # CYRILLIC SMALL LETTER O /* <20> */
|
||||
0xDF 0x043F # CYRILLIC SMALL LETTER PE /* <20> */
|
||||
0xE0 0x0440 # CYRILLIC SMALL LETTER ER /* <20> */
|
||||
0xE1 0x0441 # CYRILLIC SMALL LETTER ES /* <20> */
|
||||
0xE2 0x0442 # CYRILLIC SMALL LETTER TE /* <20> */
|
||||
0xE3 0x0443 # CYRILLIC SMALL LETTER U /* <20> */
|
||||
0xE4 0x0444 # CYRILLIC SMALL LETTER EF /* <20> */
|
||||
0xE5 0x0445 # CYRILLIC SMALL LETTER HA /* <20> */
|
||||
0xE6 0x0446 # CYRILLIC SMALL LETTER TSE /* <20> */
|
||||
0xE7 0x0447 # CYRILLIC SMALL LETTER CHE /* <20> */
|
||||
0xE8 0x0448 # CYRILLIC SMALL LETTER SHA /* <20> */
|
||||
0xE9 0x0449 # CYRILLIC SMALL LETTER SHCHA /* <20> */
|
||||
0xEA 0x044A # CYRILLIC SMALL LETTER HARD SIGN /* <20> */
|
||||
0xEB 0x044B # CYRILLIC SMALL LETTER YERU /* <20> */
|
||||
0xEC 0x044C # CYRILLIC SMALL LETTER SOFT SIGN /* <20> */
|
||||
0xED 0x044D # CYRILLIC SMALL LETTER E /* <20> */
|
||||
0xEE 0x044E # CYRILLIC SMALL LETTER YU /* <20> */
|
||||
0xEF 0x044F # CYRILLIC SMALL LETTER YA /* <20> */
|
||||
0xF0 0x00F0 # LATIN SMALL LETTER ETH
|
||||
0xF1 0x0451 # CYRILLIC SMALL LETTER IO /* <20> */
|
||||
0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE
|
||||
0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE
|
||||
0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE
|
||||
0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS
|
||||
0xF7 0x00F7 # DIVISION SIGN
|
||||
0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE
|
||||
0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE
|
||||
0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE
|
||||
0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX
|
||||
0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS
|
||||
0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE
|
||||
0xFE 0x00FE # LATIN SMALL LETTER THORN
|
||||
0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS
|
||||
232
contrib/ttf2bdf/maps/koi8.r
Normal file
232
contrib/ttf2bdf/maps/koi8.r
Normal file
@@ -0,0 +1,232 @@
|
||||
#/*
|
||||
# * Unicode 2.0 -> KOI8-R
|
||||
# *
|
||||
# * 11 Jan 97 | Eugene Bobin, <gene@ftim.ustu.ru>
|
||||
# *
|
||||
# * Modified 16 June 99 Mark Leisher <mleisher@crl.nmsu.edu>
|
||||
# */
|
||||
REGISTRY KOI8
|
||||
ENCODING R
|
||||
0x00 0x0000 # <control>
|
||||
0x01 0x0001 # <control>
|
||||
0x02 0x0002 # <control>
|
||||
0x03 0x0003 # <control>
|
||||
0x04 0x0004 # <control>
|
||||
0x05 0x0005 # <control>
|
||||
0x06 0x0006 # <control>
|
||||
0x07 0x0007 # <control>
|
||||
0x08 0x0008 # <control>
|
||||
0x09 0x0009 # <control>
|
||||
0x0A 0x000A # <control>
|
||||
0x0B 0x000B # <control>
|
||||
0x0C 0x000C # <control>
|
||||
0x0D 0x000D # <control>
|
||||
0x0E 0x000E # <control>
|
||||
0x0F 0x000F # <control>
|
||||
0x10 0x0010 # <control>
|
||||
0x11 0x0011 # <control>
|
||||
0x12 0x0012 # <control>
|
||||
0x13 0x0013 # <control>
|
||||
0x14 0x0014 # <control>
|
||||
0x15 0x0015 # <control>
|
||||
0x16 0x0016 # <control>
|
||||
0x17 0x0017 # <control>
|
||||
0x18 0x0018 # <control>
|
||||
0x19 0x0019 # <control>
|
||||
0x1A 0x001A # <control>
|
||||
0x1B 0x001B # <control>
|
||||
0x1C 0x001C # <control>
|
||||
0x1D 0x001D # <control>
|
||||
0x1E 0x001E # <control>
|
||||
0x1F 0x001F # <control>
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0xA0 0x00A0 # NO-BREAK SPACE
|
||||
0xA1 0x00A1 # INVERTED EXCLAMATION MARK
|
||||
0xA2 0x00A2 # CENT SIGN
|
||||
0xA3 0x0451 # CYRILLIC SMALL LETTER IO /* <20> */
|
||||
0xA4 0x00A4 # CURRENCY SIGN
|
||||
0xA5 0x00A5 # YEN SIGN
|
||||
0xA6 0x00A6 # BROKEN BAR
|
||||
0xA7 0x00A7 # SECTION SIGN
|
||||
0xA8 0x00A8 # DIAERESIS
|
||||
0xA9 0x00A9 # COPYRIGHT SIGN
|
||||
0xAA 0x00AA # FEMININE ORDINAL INDICATOR
|
||||
0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xAC 0x00AC # NOT SIGN
|
||||
0xAD 0x00AD # SOFT HYPHEN
|
||||
0xAE 0x00AE # REGISTERED SIGN
|
||||
0xAF 0x00AF # MACRON
|
||||
0xB0 0x00B0 # DEGREE SIGN
|
||||
0xB1 0x00B1 # PLUS-MINUS SIGN
|
||||
0xB2 0x00B2 # SUPERSCRIPT TWO
|
||||
0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO /* <20> */
|
||||
0xB4 0x00B4 # ACUTE ACCENT
|
||||
0xB5 0x00B5 # MICRO SIGN
|
||||
0xB6 0x00B6 # PILCROW SIGN
|
||||
0xB7 0x00B7 # MIDDLE DOT
|
||||
0xB8 0x00B8 # CEDILLA
|
||||
0xB9 0x00B9 # SUPERSCRIPT ONE
|
||||
0xBA 0x00BA # MASCULINE ORDINAL INDICATOR
|
||||
0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xBC 0x00BC # VULGAR FRACTION ONE QUARTER
|
||||
0xBD 0x00BD # VULGAR FRACTION ONE HALF
|
||||
0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS
|
||||
0xBF 0x00BF # INVERTED QUESTION MARK
|
||||
0xC0 0x044E # CYRILLIC SMALL LETTER YU /* <20> */
|
||||
0xC1 0x0430 # CYRILLIC SMALL LETTER A /* <20> */
|
||||
0xC2 0x0431 # CYRILLIC SMALL LETTER BE /* <20> */
|
||||
0xC3 0x0446 # CYRILLIC SMALL LETTER TSE /* <20> */
|
||||
0xC4 0x0434 # CYRILLIC SMALL LETTER DE /* <20> */
|
||||
0xC5 0x0435 # CYRILLIC SMALL LETTER IE /* <20> */
|
||||
0xC6 0x0444 # CYRILLIC SMALL LETTER EF /* <20> */
|
||||
0xC7 0x0433 # CYRILLIC SMALL LETTER GHE /* <20> */
|
||||
0xC8 0x0445 # CYRILLIC SMALL LETTER HA /* <20> */
|
||||
0xC9 0x0438 # CYRILLIC SMALL LETTER I /* <20> */
|
||||
0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I /* <20> */
|
||||
0xCB 0x043A # CYRILLIC SMALL LETTER KA /* <20> */
|
||||
0xCC 0x043B # CYRILLIC SMALL LETTER EL /* <20> */
|
||||
0xCD 0x043C # CYRILLIC SMALL LETTER EM /* <20> */
|
||||
0xCE 0x043D # CYRILLIC SMALL LETTER EN /* <20> */
|
||||
0xCF 0x043E # CYRILLIC SMALL LETTER O /* <20> */
|
||||
0xD0 0x043F # CYRILLIC SMALL LETTER PE /* <20> */
|
||||
0xD1 0x044F # CYRILLIC SMALL LETTER YA /* <20> */
|
||||
0xD2 0x0440 # CYRILLIC SMALL LETTER ER /* <20> */
|
||||
0xD3 0x0441 # CYRILLIC SMALL LETTER ES /* <20> */
|
||||
0xD4 0x0442 # CYRILLIC SMALL LETTER TE /* <20> */
|
||||
0xD5 0x0443 # CYRILLIC SMALL LETTER U /* <20> */
|
||||
0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE /* <20> */
|
||||
0xD7 0x0432 # CYRILLIC SMALL LETTER VE /* <20> */
|
||||
0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN /* <20> */
|
||||
0xD9 0x044B # CYRILLIC SMALL LETTER YERU /* <20> */
|
||||
0xDA 0x0437 # CYRILLIC SMALL LETTER ZE /* <20> */
|
||||
0xDB 0x0448 # CYRILLIC SMALL LETTER SHA /* <20> */
|
||||
0xDC 0x044D # CYRILLIC SMALL LETTER E /* <20> */
|
||||
0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA /* <20> */
|
||||
0xDE 0x0447 # CYRILLIC SMALL LETTER CHE /* <20> */
|
||||
0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN /* <20> */
|
||||
0xE0 0x042E # CYRILLIC CAPITAL LETTER YU /* <20> */
|
||||
0xE1 0x0410 # CYRILLIC CAPITAL LETTER A /* <20> */
|
||||
0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE /* <20> */
|
||||
0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE /* <20> */
|
||||
0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE /* <20> */
|
||||
0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE /* <20> */
|
||||
0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF /* <20> */
|
||||
0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE /* <20> */
|
||||
0xE8 0x0425 # CYRILLIC CAPITAL LETTER HA /* <20> */
|
||||
0xE9 0x0418 # CYRILLIC CAPITAL LETTER I /* <20> */
|
||||
0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I /* <20> */
|
||||
0xEB 0x041A # CYRILLIC CAPITAL LETTER KA /* <20> */
|
||||
0xEC 0x041B # CYRILLIC CAPITAL LETTER EL /* <20> */
|
||||
0xED 0x041C # CYRILLIC CAPITAL LETTER EM /* <20> */
|
||||
0xEE 0x041D # CYRILLIC CAPITAL LETTER EN /* <20> */
|
||||
0xEF 0x041E # CYRILLIC CAPITAL LETTER O /* <20> */
|
||||
0xF0 0x041F # CYRILLIC CAPITAL LETTER PE /* <20> */
|
||||
0xF1 0x042F # CYRILLIC CAPITAL LETTER YA /* <20> */
|
||||
0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER /* <20> */
|
||||
0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES /* <20> */
|
||||
0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE /* <20> */
|
||||
0xF5 0x0423 # CYRILLIC CAPITAL LETTER U /* <20> */
|
||||
0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE /* <20> */
|
||||
0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE /* <20> */
|
||||
0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN /* <20> */
|
||||
0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU /* <20> */
|
||||
0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE /* <20> */
|
||||
0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA /* <20> */
|
||||
0xFC 0x042D # CYRILLIC CAPITAL LETTER E /* <20> */
|
||||
0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA /* <20> */
|
||||
0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE /* <20> */
|
||||
0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN /* <20> */
|
||||
233
contrib/ttf2bdf/maps/windows.1251
Normal file
233
contrib/ttf2bdf/maps/windows.1251
Normal file
@@ -0,0 +1,233 @@
|
||||
#/*
|
||||
# * Unicode 2.0 -> Windows CP_1251 (Must Die ;)
|
||||
# *
|
||||
# * 11 Jan 97 | Eugene Bobin, <gene@ftim.ustu.ru>
|
||||
# *
|
||||
# * Modified 16 June 99 Mark Leisher <mleisher@crl.nmsu.edu>
|
||||
# */
|
||||
#
|
||||
REGISTRY WINDOWS
|
||||
ENCODING 1251
|
||||
0x00 0x0000 # <control>
|
||||
0x01 0x0001 # <control>
|
||||
0x02 0x0002 # <control>
|
||||
0x03 0x0003 # <control>
|
||||
0x04 0x0004 # <control>
|
||||
0x05 0x0005 # <control>
|
||||
0x06 0x0006 # <control>
|
||||
0x07 0x0007 # <control>
|
||||
0x08 0x0008 # <control>
|
||||
0x09 0x0009 # <control>
|
||||
0x0A 0x000A # <control>
|
||||
0x0B 0x000B # <control>
|
||||
0x0C 0x000C # <control>
|
||||
0x0D 0x000D # <control>
|
||||
0x0E 0x000E # <control>
|
||||
0x0F 0x000F # <control>
|
||||
0x10 0x0010 # <control>
|
||||
0x11 0x0011 # <control>
|
||||
0x12 0x0012 # <control>
|
||||
0x13 0x0013 # <control>
|
||||
0x14 0x0014 # <control>
|
||||
0x15 0x0015 # <control>
|
||||
0x16 0x0016 # <control>
|
||||
0x17 0x0017 # <control>
|
||||
0x18 0x0018 # <control>
|
||||
0x19 0x0019 # <control>
|
||||
0x1A 0x001A # <control>
|
||||
0x1B 0x001B # <control>
|
||||
0x1C 0x001C # <control>
|
||||
0x1D 0x001D # <control>
|
||||
0x1E 0x001E # <control>
|
||||
0x1F 0x001F # <control>
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0xA0 0x00A0 # NO-BREAK SPACE
|
||||
0xA1 0x00A1 # INVERTED EXCLAMATION MARK
|
||||
0xA2 0x00A2 # CENT SIGN
|
||||
0xA3 0x0451 # CYRILLIC SMALL LETTER IO /* <20> */
|
||||
0xA4 0x00A4 # CURRENCY SIGN
|
||||
0xA5 0x00A5 # YEN SIGN
|
||||
0xA6 0x00A6 # BROKEN BAR
|
||||
0xA7 0x00A7 # SECTION SIGN
|
||||
0xA8 0x00A8 # DIAERESIS
|
||||
0xA9 0x00A9 # COPYRIGHT SIGN
|
||||
0xAA 0x00AA # FEMININE ORDINAL INDICATOR
|
||||
0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xAC 0x00AC # NOT SIGN
|
||||
0xAD 0x00AD # SOFT HYPHEN
|
||||
0xAE 0x00AE # REGISTERED SIGN
|
||||
0xAF 0x00AF # MACRON
|
||||
0xB0 0x00B0 # DEGREE SIGN
|
||||
0xB1 0x00B1 # PLUS-MINUS SIGN
|
||||
0xB2 0x00B2 # SUPERSCRIPT TWO
|
||||
0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO /* <20> */
|
||||
0xB4 0x00B4 # ACUTE ACCENT
|
||||
0xB5 0x00B5 # MICRO SIGN
|
||||
0xB6 0x00B6 # PILCROW SIGN
|
||||
0xB7 0x00B7 # MIDDLE DOT
|
||||
0xB8 0x00B8 # CEDILLA
|
||||
0xB9 0x00B9 # SUPERSCRIPT ONE
|
||||
0xBA 0x00BA # MASCULINE ORDINAL INDICATOR
|
||||
0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
0xBC 0x00BC # VULGAR FRACTION ONE QUARTER
|
||||
0xBD 0x00BD # VULGAR FRACTION ONE HALF
|
||||
0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS
|
||||
0xBF 0x00BF # INVERTED QUESTION MARK
|
||||
0xC0 0x044E # CYRILLIC SMALL LETTER YU /* <20> */
|
||||
0xC1 0x0430 # CYRILLIC SMALL LETTER A /* <20> */
|
||||
0xC2 0x0431 # CYRILLIC SMALL LETTER BE /* <20> */
|
||||
0xC3 0x0446 # CYRILLIC SMALL LETTER TSE /* <20> */
|
||||
0xC4 0x0434 # CYRILLIC SMALL LETTER DE /* <20> */
|
||||
0xC5 0x0435 # CYRILLIC SMALL LETTER IE /* <20> */
|
||||
0xC6 0x0444 # CYRILLIC SMALL LETTER EF /* <20> */
|
||||
0xC7 0x0433 # CYRILLIC SMALL LETTER GHE /* <20> */
|
||||
0xC8 0x0445 # CYRILLIC SMALL LETTER HA /* <20> */
|
||||
0xC9 0x0438 # CYRILLIC SMALL LETTER I /* <20> */
|
||||
0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I /* <20> */
|
||||
0xCB 0x043A # CYRILLIC SMALL LETTER KA /* <20> */
|
||||
0xCC 0x043B # CYRILLIC SMALL LETTER EL /* <20> */
|
||||
0xCD 0x043C # CYRILLIC SMALL LETTER EM /* <20> */
|
||||
0xCE 0x043D # CYRILLIC SMALL LETTER EN /* <20> */
|
||||
0xCF 0x043E # CYRILLIC SMALL LETTER O /* <20> */
|
||||
0xD0 0x043F # CYRILLIC SMALL LETTER PE /* <20> */
|
||||
0xD1 0x044F # CYRILLIC SMALL LETTER YA /* <20> */
|
||||
0xD2 0x0440 # CYRILLIC SMALL LETTER ER /* <20> */
|
||||
0xD3 0x0441 # CYRILLIC SMALL LETTER ES /* <20> */
|
||||
0xD4 0x0442 # CYRILLIC SMALL LETTER TE /* <20> */
|
||||
0xD5 0x0443 # CYRILLIC SMALL LETTER U /* <20> */
|
||||
0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE /* <20> */
|
||||
0xD7 0x0432 # CYRILLIC SMALL LETTER VE /* <20> */
|
||||
0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN /* <20> */
|
||||
0xD9 0x044B # CYRILLIC SMALL LETTER YERU /* <20> */
|
||||
0xDA 0x0437 # CYRILLIC SMALL LETTER ZE /* <20> */
|
||||
0xDB 0x0448 # CYRILLIC SMALL LETTER SHA /* <20> */
|
||||
0xDC 0x044D # CYRILLIC SMALL LETTER E /* <20> */
|
||||
0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA /* <20> */
|
||||
0xDE 0x0447 # CYRILLIC SMALL LETTER CHE /* <20> */
|
||||
0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN /* <20> */
|
||||
0xE0 0x042E # CYRILLIC CAPITAL LETTER YU /* <20> */
|
||||
0xE1 0x0410 # CYRILLIC CAPITAL LETTER A /* <20> */
|
||||
0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE /* <20> */
|
||||
0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE /* <20> */
|
||||
0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE /* <20> */
|
||||
0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE /* <20> */
|
||||
0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF /* <20> */
|
||||
0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE /* <20> */
|
||||
0xE8 0x0425 # CYRILLIC CAPITAL LETTER HA /* <20> */
|
||||
0xE9 0x0418 # CYRILLIC CAPITAL LETTER I /* <20> */
|
||||
0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I /* <20> */
|
||||
0xEB 0x041A # CYRILLIC CAPITAL LETTER KA /* <20> */
|
||||
0xEC 0x041B # CYRILLIC CAPITAL LETTER EL /* <20> */
|
||||
0xED 0x041C # CYRILLIC CAPITAL LETTER EM /* <20> */
|
||||
0xEE 0x041D # CYRILLIC CAPITAL LETTER EN /* <20> */
|
||||
0xEF 0x041E # CYRILLIC CAPITAL LETTER O /* <20> */
|
||||
0xF0 0x041F # CYRILLIC CAPITAL LETTER PE /* <20> */
|
||||
0xF1 0x042F # CYRILLIC CAPITAL LETTER YA /* <20> */
|
||||
0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER /* <20> */
|
||||
0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES /* <20> */
|
||||
0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE /* <20> */
|
||||
0xF5 0x0423 # CYRILLIC CAPITAL LETTER U /* <20> */
|
||||
0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE /* <20> */
|
||||
0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE /* <20> */
|
||||
0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN /* <20> */
|
||||
0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU /* <20> */
|
||||
0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE /* <20> */
|
||||
0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA /* <20> */
|
||||
0xFC 0x042D # CYRILLIC CAPITAL LETTER E /* <20> */
|
||||
0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA /* <20> */
|
||||
0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE /* <20> */
|
||||
0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN /* <20> */
|
||||
690
contrib/ttf2bdf/remap.c
Normal file
690
contrib/ttf2bdf/remap.c
Normal file
@@ -0,0 +1,690 @@
|
||||
/*
|
||||
* Copyright 1996, 1997, 1998, 1999 Computing Research Labs,
|
||||
* New Mexico State University
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
|
||||
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
||||
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef lint
|
||||
#ifdef __GNUC__
|
||||
static char rcsid[] __attribute__ ((unused)) = "$Id: remap.c,v 1.9 1999/06/16 16:13:11 mleisher Exp $";
|
||||
#else
|
||||
static char rcsid[] = "$Id: remap.c,v 1.9 1999/06/16 16:13:11 mleisher Exp $";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Structure for managing simple lists in place.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned char *bfield;
|
||||
unsigned long bsize;
|
||||
unsigned long bused;
|
||||
unsigned char **field;
|
||||
unsigned long size;
|
||||
unsigned long used;
|
||||
} list_t;
|
||||
|
||||
/*
|
||||
* Callback type used with the high speed text file reader function.
|
||||
*/
|
||||
typedef int (*scanlines_callback_t)(
|
||||
#ifdef __STDC__
|
||||
unsigned char *line,
|
||||
unsigned long linelen,
|
||||
unsigned long lineno,
|
||||
void *client_data
|
||||
#endif
|
||||
);
|
||||
|
||||
/*
|
||||
* Various utility routines.
|
||||
*/
|
||||
|
||||
#define setsbit(m, cc) (m[(cc) >> 3] |= (1 << ((cc) & 7)))
|
||||
#define sbitset(m, cc) (m[(cc) >> 3] & (1 << ((cc) & 7)))
|
||||
|
||||
/*
|
||||
* An empty string for empty fields.
|
||||
*/
|
||||
static unsigned char empty[1] = { 0 };
|
||||
|
||||
/*
|
||||
* Assume the line is NULL terminated and that the `list' parameter was
|
||||
* initialized the first time it was used.
|
||||
*/
|
||||
static void
|
||||
#ifdef __STDC__
|
||||
splitline(unsigned char *separators, unsigned char *line,
|
||||
unsigned long linelen, list_t *list)
|
||||
#else
|
||||
splitline(separators, line, linelen, list)
|
||||
unsigned char *separators, *line;
|
||||
unsigned long linelen;
|
||||
list_t *list;
|
||||
#endif
|
||||
{
|
||||
int mult, final_empty;
|
||||
unsigned char *sp, *ep, *end;
|
||||
unsigned char seps[32];
|
||||
|
||||
/*
|
||||
* Initialize the list.
|
||||
*/
|
||||
list->used = list->bused = 0;
|
||||
|
||||
/*
|
||||
* If the line is empty, then simply return.
|
||||
*/
|
||||
if (linelen == 0 || line[0] == 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the `separators' parameter is NULL or empty, split the list into
|
||||
* individual bytes.
|
||||
*/
|
||||
if (separators == 0 || *separators == 0) {
|
||||
if (linelen > list->bsize) {
|
||||
if (list->bsize)
|
||||
list->bfield = (unsigned char *) malloc(linelen);
|
||||
else
|
||||
list->bfield = (unsigned char *) realloc(list->bfield, linelen);
|
||||
list->bsize = linelen;
|
||||
}
|
||||
list->bused = linelen;
|
||||
(void) memcpy(list->bfield, line, linelen);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare the separator bitmap.
|
||||
*/
|
||||
(void) memset((char *) seps, 0, 32);
|
||||
|
||||
/*
|
||||
* If the very last character of the separator string is a plus, then set
|
||||
* the `mult' flag to indicate that multiple separators should be
|
||||
* collapsed into one.
|
||||
*/
|
||||
for (mult = 0, sp = separators; sp && *sp; sp++) {
|
||||
if (*sp == '+' && *(sp + 1) == 0)
|
||||
mult = 1;
|
||||
else
|
||||
setsbit(seps, *sp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Break the line up into fields.
|
||||
*/
|
||||
for (final_empty = 0, sp = ep = line, end = sp + linelen;
|
||||
sp < end && *sp;) {
|
||||
/*
|
||||
* Collect everything that is not a separator.
|
||||
*/
|
||||
for (; ep < end && *ep && !sbitset(seps, *ep); ep++) ;
|
||||
|
||||
/*
|
||||
* Resize the list if necessary.
|
||||
*/
|
||||
if (list->used == list->size) {
|
||||
if (list->size == 0)
|
||||
list->field = (unsigned char **)
|
||||
malloc(sizeof(unsigned char *) << 3);
|
||||
else
|
||||
list->field = (unsigned char **)
|
||||
realloc((char *) list->field,
|
||||
sizeof(unsigned char *) * (list->size + 8));
|
||||
|
||||
list->size += 8;
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign the field appropriately.
|
||||
*/
|
||||
list->field[list->used++] = (ep > sp) ? sp : empty;
|
||||
|
||||
sp = ep;
|
||||
if (mult) {
|
||||
/*
|
||||
* If multiple separators should be collapsed, do it now by
|
||||
* setting all the separator characters to 0.
|
||||
*/
|
||||
for (; ep < end && *ep && sbitset(seps, *ep); ep++)
|
||||
*ep = 0;
|
||||
} else
|
||||
/*
|
||||
* Don't collapse multiple separators by making them 0, so just
|
||||
* make the one encountered 0.
|
||||
*/
|
||||
*ep++ = 0;
|
||||
final_empty = (ep > sp && *ep == 0);
|
||||
sp = ep;
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally, NULL terminate the list.
|
||||
*/
|
||||
if (list->used + final_empty + 1 >= list->size) {
|
||||
if (list->used == list->size) {
|
||||
if (list->size == 0)
|
||||
list->field = (unsigned char **)
|
||||
malloc(sizeof(unsigned char *) << 3);
|
||||
else
|
||||
list->field = (unsigned char **)
|
||||
realloc((unsigned char *) list->field,
|
||||
sizeof(char *) * (list->size + 8));
|
||||
list->size += 8;
|
||||
}
|
||||
}
|
||||
if (final_empty)
|
||||
list->field[list->used++] = empty;
|
||||
|
||||
if (list->used == list->size) {
|
||||
if (list->size == 0)
|
||||
list->field = (unsigned char **)
|
||||
malloc(sizeof(unsigned char *) << 3);
|
||||
else
|
||||
list->field = (unsigned char **)
|
||||
realloc((char *) list->field,
|
||||
sizeof(unsigned char *) * (list->size + 8));
|
||||
list->size += 8;
|
||||
}
|
||||
list->field[list->used] = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
#ifdef __STDC__
|
||||
scanlines(int fd, scanlines_callback_t callback, void *client_data,
|
||||
unsigned long *lineno)
|
||||
#else
|
||||
scanlines(fd, callback, client_data, lineno)
|
||||
int fd;
|
||||
scanlines_callback_t callback;
|
||||
void *client_data;
|
||||
unsigned long *lineno;
|
||||
#endif
|
||||
{
|
||||
unsigned long lno;
|
||||
int n, res, done, refill, bytes, hold;
|
||||
char *ls, *le, *pp, *pe, *hp;
|
||||
char buf[65536];
|
||||
|
||||
if (callback == 0)
|
||||
return -1;
|
||||
|
||||
lno = 1;
|
||||
(void) memset(buf, 0, 65536);
|
||||
res = done = 0;
|
||||
pp = ls = le = buf;
|
||||
bytes = 65536;
|
||||
while (!done && (n = read(fd, pp, bytes)) > 0) {
|
||||
/*
|
||||
* Determine the new end of the buffer pages.
|
||||
*/
|
||||
pe = pp + n;
|
||||
|
||||
for (refill = 0; done == 0 && refill == 0; ) {
|
||||
while (le < pe && *le != '\n' && *le != '\r')
|
||||
le++;
|
||||
|
||||
if (le == pe) {
|
||||
/*
|
||||
* Hit the end of the last page in the buffer.
|
||||
* Need to find out how many pages to shift
|
||||
* and how many pages need to be read in.
|
||||
* Adjust the line start and end pointers down
|
||||
* to point to the right places in the pages.
|
||||
*/
|
||||
pp = buf + (((ls - buf) >> 13) << 13);
|
||||
n = pp - buf;
|
||||
ls -= n;
|
||||
le -= n;
|
||||
n = pe - pp;
|
||||
(void) memcpy(buf, pp, n);
|
||||
pp = buf + n;
|
||||
bytes = 65536 - n;
|
||||
refill = 1;
|
||||
} else {
|
||||
/*
|
||||
* Temporarily NULL terminate the line.
|
||||
*/
|
||||
hp = le;
|
||||
hold = *le;
|
||||
*le = 0;
|
||||
|
||||
if (callback && *ls != '#' && *ls != 0x1a && le > ls &&
|
||||
(res = (*callback)((unsigned char *) ls, le - ls, lno,
|
||||
client_data)) != 0)
|
||||
done = 1;
|
||||
else {
|
||||
ls = ++le;
|
||||
/*
|
||||
* Handle the case of DOS CRLF sequences.
|
||||
*/
|
||||
if (le < pe && hold == '\n' && *le =='\r')
|
||||
ls = ++le;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increment the line number.
|
||||
*/
|
||||
lno++;
|
||||
|
||||
/*
|
||||
* Restore the character at the end of the line.
|
||||
*/
|
||||
*hp = hold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return with the last line number processed.
|
||||
*/
|
||||
*lineno = lno;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static unsigned char a2i[128] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static unsigned char odigits[32] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static unsigned char ddigits[32] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static unsigned char hdigits[32] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03,
|
||||
0x7e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
#define isdigok(m, d) (m[(d) >> 3] & (1 << ((d) & 7)))
|
||||
|
||||
static unsigned short
|
||||
#ifdef __STDC__
|
||||
my_atous(unsigned char *s, unsigned char **end, int base)
|
||||
#else
|
||||
my_atous(s, end, base)
|
||||
unsigned char *s, **end;
|
||||
int base;
|
||||
#endif
|
||||
{
|
||||
unsigned short v;
|
||||
unsigned char *dmap;
|
||||
|
||||
if (s == 0 || *s == 0)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Make sure the radix is something recognizable. Default to 10.
|
||||
*/
|
||||
switch (base) {
|
||||
case 8: dmap = odigits; break;
|
||||
case 16: dmap = hdigits; break;
|
||||
default: base = 10; dmap = ddigits; break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for the special hex prefix.
|
||||
*/
|
||||
if (*s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X')) {
|
||||
base = 16;
|
||||
dmap = hdigits;
|
||||
s += 2;
|
||||
}
|
||||
|
||||
for (v = 0; isdigok(dmap, *s); s++)
|
||||
v = (v * base) + a2i[(int) *s];
|
||||
|
||||
if (end != 0)
|
||||
*end = s;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
*
|
||||
* Routines to load, unload, and use mapping tables to remap BDF fonts
|
||||
* generated using ttf2bdf.
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
/*
|
||||
* Strings used to store the registry and encoding values specified
|
||||
* in the mapping table.
|
||||
*/
|
||||
static char *registry;
|
||||
static char *encoding;
|
||||
|
||||
/*
|
||||
* Trie node structure.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned short key; /* Key value. */
|
||||
unsigned short val; /* Data for the key. */
|
||||
unsigned long sibs; /* Offset of siblings from trie beginning. */
|
||||
unsigned long kids; /* Offset of children from trie beginning. */
|
||||
} node_t;
|
||||
|
||||
/*
|
||||
* The trie used for remapping codes.
|
||||
*/
|
||||
static node_t *nodes;
|
||||
static unsigned long nodes_size = 0;
|
||||
static unsigned long nodes_used = 0;
|
||||
|
||||
/*
|
||||
* Gets the next available node in the trie.
|
||||
*/
|
||||
static unsigned long
|
||||
#ifdef __STDC__
|
||||
getnode(unsigned short key)
|
||||
#else
|
||||
getnode(key)
|
||||
unsigned short key;
|
||||
#endif
|
||||
{
|
||||
unsigned long loc;
|
||||
node_t *np;
|
||||
|
||||
if (nodes_used == nodes_size) {
|
||||
if (nodes_size == 0)
|
||||
nodes = (node_t *) malloc(sizeof(node_t) << 7);
|
||||
else
|
||||
nodes = (node_t *) realloc((char *) nodes, sizeof(node_t) *
|
||||
(nodes_size + 128));
|
||||
np = nodes + nodes_size;
|
||||
nodes_size += 128;
|
||||
(void) memset((char *) np, 0, sizeof(node_t) << 7);
|
||||
}
|
||||
|
||||
loc = nodes_used++;
|
||||
np = nodes + loc;
|
||||
np->kids = np->sibs = 0;
|
||||
np->key = key;
|
||||
return loc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Inserts a node in the trie.
|
||||
*/
|
||||
static void
|
||||
#ifdef __STDC__
|
||||
trie_insert(unsigned short key, unsigned short val)
|
||||
#else
|
||||
trie_insert(key, val)
|
||||
unsigned short key, val;
|
||||
#endif
|
||||
{
|
||||
unsigned long i, n, t, l;
|
||||
unsigned short codes[2];
|
||||
|
||||
/*
|
||||
* Convert the incoming key into two codes to make the trie lookup more
|
||||
* efficient.
|
||||
*/
|
||||
codes[0] = (key >> 8) & 0xff;
|
||||
codes[1] = key & 0xff;
|
||||
|
||||
for (i = t = 0; i < 2; i++) {
|
||||
if (nodes[t].kids == 0) {
|
||||
n = getnode(codes[i]);
|
||||
nodes[t].kids = t = n;
|
||||
} else if (nodes[nodes[t].kids].key == codes[i])
|
||||
t = nodes[t].kids;
|
||||
else if (nodes[nodes[t].kids].key > codes[i]) {
|
||||
n = getnode(codes[i]);
|
||||
nodes[n].sibs = nodes[t].kids;
|
||||
nodes[t].kids = t = n;
|
||||
} else {
|
||||
t = nodes[t].kids;
|
||||
for (l = t; nodes[t].sibs && nodes[t].key < codes[i]; ) {
|
||||
l = t;
|
||||
t = nodes[t].sibs;
|
||||
}
|
||||
if (nodes[t].key < codes[i]) {
|
||||
n = getnode(codes[i]);
|
||||
nodes[t].sibs = t = n;
|
||||
} else if (nodes[t].key > codes[i]) {
|
||||
n = getnode(codes[i]);
|
||||
nodes[n].sibs = t;
|
||||
nodes[l].sibs = t = n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the value in the leaf node.
|
||||
*/
|
||||
nodes[t].val = val;
|
||||
}
|
||||
|
||||
/*
|
||||
* List used by the routine that parses the map lines.
|
||||
*/
|
||||
static list_t list;
|
||||
|
||||
/*
|
||||
* Routine to parse each line of the mapping file.
|
||||
*/
|
||||
static int
|
||||
#ifdef __STDC__
|
||||
add_mapping(unsigned char *line, unsigned long linelen, unsigned long lineno,
|
||||
void *client_data)
|
||||
#else
|
||||
add_mapping(line, linelen, lineno, client_data)
|
||||
unsigned char *line;
|
||||
unsigned long linelen, lineno;
|
||||
void *client_data;
|
||||
#endif
|
||||
{
|
||||
unsigned short key, val;
|
||||
|
||||
/*
|
||||
* Split the line into parts separted by one or more spaces or tabs.
|
||||
*/
|
||||
splitline((unsigned char *) " \t+", line, linelen, &list);
|
||||
|
||||
/*
|
||||
* Check to see if the line starts with one of the keywords.
|
||||
*/
|
||||
if (memcmp((char *) list.field[0], "REGISTRY", 8) == 0) {
|
||||
/*
|
||||
* Collect the XLFD CHARSET_REGISTRY value.
|
||||
*/
|
||||
if (registry != 0)
|
||||
free((char *) registry);
|
||||
if ((val = strlen((char *) list.field[1])) == 0)
|
||||
registry = 0;
|
||||
else {
|
||||
registry = (char *) malloc(val + 1);
|
||||
(void) memcpy(registry, (char *) list.field[1], val + 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (memcmp((char *) list.field[0], "ENCODING", 8) == 0) {
|
||||
/*
|
||||
* Collect the XLFD CHARSET_ENCODING value.
|
||||
*/
|
||||
if (encoding != 0)
|
||||
free((char *) encoding);
|
||||
if ((val = strlen((char *) list.field[1])) == 0)
|
||||
encoding = 0;
|
||||
else {
|
||||
encoding = (char *) malloc(val + 1);
|
||||
(void) memcpy(encoding, (char *) list.field[1], val + 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the second field value as the key (the Unicode value). Always
|
||||
* assume the values are in hex.
|
||||
*/
|
||||
key = my_atous(list.field[1], 0, 16);
|
||||
val = my_atous(list.field[0], 0, 16);
|
||||
|
||||
trie_insert(key, val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
*
|
||||
* API for mapping table support.
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
int
|
||||
#ifdef __STDC__
|
||||
ttf2bdf_load_map(FILE *in)
|
||||
#else
|
||||
ttf2bdf_load_map(in)
|
||||
FILE *in;
|
||||
#endif
|
||||
{
|
||||
unsigned long lineno;
|
||||
|
||||
/*
|
||||
* Allocate some nodes initially.
|
||||
*/
|
||||
if (nodes_size == 0) {
|
||||
nodes = (node_t *) malloc(sizeof(node_t) << 7);
|
||||
nodes_size = 128;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the trie in case more than one gets loaded for some reason.
|
||||
*/
|
||||
if (nodes_size > 0)
|
||||
(void) memset((char *) nodes, 0, sizeof(node_t) * nodes_size);
|
||||
nodes_used = 1;
|
||||
|
||||
return scanlines(fileno(in), add_mapping, 0, &lineno);
|
||||
}
|
||||
|
||||
/*
|
||||
* Routine that deallocates the mapping trie.
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
ttf2bdf_free_map(void)
|
||||
#else
|
||||
ttf2bdf_free_map()
|
||||
#endif
|
||||
{
|
||||
if (registry != 0)
|
||||
free((char *) registry);
|
||||
if (encoding != 0)
|
||||
free((char *) encoding);
|
||||
registry = encoding = 0;
|
||||
|
||||
if (list.size > 0)
|
||||
free((char *) list.field);
|
||||
list.size = list.used = 0;
|
||||
|
||||
if (nodes_size > 0)
|
||||
free((char *) nodes);
|
||||
nodes_size = nodes_used = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The routine that actually remaps the code by looking it up in the trie.
|
||||
*/
|
||||
int
|
||||
#ifdef __STDC__
|
||||
ttf2bdf_remap(unsigned short *code)
|
||||
#else
|
||||
ttf2bdf_remap(code)
|
||||
unsigned short *code;
|
||||
#endif
|
||||
{
|
||||
unsigned long i, n, t;
|
||||
unsigned short c, codes[2];
|
||||
|
||||
/*
|
||||
* If no mapping table was loaded, then simply return the code.
|
||||
*/
|
||||
if (nodes_used == 0)
|
||||
return 1;
|
||||
|
||||
c = *code;
|
||||
codes[0] = (c >> 8) & 0xff;
|
||||
codes[1] = c & 0xff;
|
||||
|
||||
for (i = n = 0; i < 2; i++) {
|
||||
t = nodes[n].kids;
|
||||
if (t == 0)
|
||||
return 0;
|
||||
for (; nodes[t].sibs && nodes[t].key != codes[i]; t = nodes[t].sibs);
|
||||
if (nodes[t].key != codes[i])
|
||||
return 0;
|
||||
n = t;
|
||||
}
|
||||
|
||||
*code = nodes[n].val;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
#ifdef __STDC__
|
||||
ttf2bdf_remap_charset(char **registry_name, char **encoding_name)
|
||||
#else
|
||||
ttf2bdf_remap_charset(registry_name, encoding_name)
|
||||
char **registry_name, **encoding_name;
|
||||
#endif
|
||||
{
|
||||
if (registry_name != 0)
|
||||
*registry_name = registry;
|
||||
if (encoding_name != 0)
|
||||
*encoding_name = encoding;
|
||||
}
|
||||
64
contrib/ttf2bdf/remap.h
Normal file
64
contrib/ttf2bdf/remap.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 1996, 1997, 1998, 1999 Computing Research Labs,
|
||||
* New Mexico State University
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
|
||||
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
||||
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _h_remap
|
||||
#define _h_remap
|
||||
|
||||
/*
|
||||
* $Id: remap.h,v 1.4 1999/05/03 17:07:04 mleisher Exp $
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int ttf2bdf_load_map(
|
||||
#ifdef __STDC__
|
||||
FILE *in
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void ttf2bdf_free_map(
|
||||
#ifdef __STDC__
|
||||
void
|
||||
#endif
|
||||
);
|
||||
|
||||
extern int ttf2bdf_remap(
|
||||
#ifdef __STDC__
|
||||
unsigned short *code
|
||||
#endif
|
||||
);
|
||||
|
||||
extern void ttf2bdf_remap_charset(
|
||||
#ifdef __STDC__
|
||||
char **registry_name,
|
||||
char **encoding_name
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _h_remap */
|
||||
1581
contrib/ttf2bdf/ttf2bdf.c
Normal file
1581
contrib/ttf2bdf/ttf2bdf.c
Normal file
File diff suppressed because it is too large
Load Diff
196
contrib/ttf2bdf/ttf2bdf.man
Normal file
196
contrib/ttf2bdf/ttf2bdf.man
Normal file
@@ -0,0 +1,196 @@
|
||||
.\"
|
||||
.\" $Id: ttf2bdf.man,v 1.14 1999/10/21 16:31:54 mleisher Exp $
|
||||
.\"
|
||||
.TH TTF2BDF 1 "21 October 1999" "X Version 11"
|
||||
.SH NAME
|
||||
ttf2bdf \- TrueType to BDF font converter
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B ttf2bdf
|
||||
[\fIoptions\fP] [\fIfont.ttf\fP]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.I ttf2bdf
|
||||
will convert a TrueType font to a BDF font using the FreeType renderer.
|
||||
|
||||
.SH OPTIONS
|
||||
.I ttf2bdf
|
||||
accepts the following command line arguments:
|
||||
|
||||
.PP
|
||||
.TP 8
|
||||
.I -v
|
||||
print warning messages when the font is converted.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -p n
|
||||
set the desired point size (see default value by running the program with the
|
||||
-h option).
|
||||
.PP
|
||||
.TP 8
|
||||
.I -r n
|
||||
set both the horizontal and the vertical resolution (see default value by
|
||||
running the program with the -h option). The minimum is 10dpi and the maximum
|
||||
is 1200dpi.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -rh n
|
||||
set the horizontal resolution (see default value by running the program with
|
||||
the -h option). The minimum is 10dpi and the maximum is 1200dpi.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -rv n
|
||||
set the vertical resolution (see default value by running the program with
|
||||
the -h option). The minimum is 10dpi and the maximum is 1200dpi.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -o outfile
|
||||
sets the output filename (default output is to stdout).
|
||||
.PP
|
||||
.TP 8
|
||||
.I -pid id
|
||||
set the platform id for selecting the character map (see default value by
|
||||
running the program with the -h option).
|
||||
.PP
|
||||
.TP 8
|
||||
.I -eid id
|
||||
set the encoding id for selecting the character map (see default value by
|
||||
running the program with the -h option).
|
||||
.PP
|
||||
.TP 8
|
||||
.I -c c
|
||||
set the character spacing. This should be one of `P' for proportional,
|
||||
`M' for monospace, or `C' for character cell. By default, the spacing
|
||||
of a font will be automatically determined to be either `M' or `P'
|
||||
according to values provided in the font.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -f name
|
||||
set the foundry name used in the XLFD name. The default value is
|
||||
`Freetype'.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -t name
|
||||
set the typeface name used in the XLFD name. By default,
|
||||
.I ttf2bdf
|
||||
will attempt to get a name from the font first and then it will use the
|
||||
name supplied with this command line option, and if all else fails, it
|
||||
will use the name `Unknown'.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -w name
|
||||
set the weight name used in the XLFD name. If this value is not
|
||||
supplied, the default value is assumed to be `Medium'. Some common
|
||||
values for this are `Thin', `Delicate', `ExtraLight', `Light', `Normal',
|
||||
`Medium', `SemiCondensed', `Condensed', `SemiBold', `Bold', `Heavy',
|
||||
`ExtraBold', and `ExtraHeavy'.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -s name
|
||||
set the slant name used in the XLFD name. If this value is not
|
||||
supplied, the default value is assumed to be `R', for Roman. Some common
|
||||
values for this are `R' for Roman, `I' for Italic, `O' for Oblique, `RI'
|
||||
for Reverse Italic, and `RO' for Reverse Oblique.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -k name
|
||||
set the width name used in the XLFD name. The default is `Normal'.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -d name
|
||||
set the additional style name used in the XLFD name. The default is an empty
|
||||
string.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -u char
|
||||
set the character used to replace the dashes/spaces in a font name. The
|
||||
default is the space character.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -l subset
|
||||
define a list of character codes which will be used to select a subset
|
||||
of glyphs from the font. The syntax of the subset string is the same
|
||||
as the syntax for selecting subsets in X11 XLFD font names. Example:
|
||||
.sp
|
||||
% ttf2bdf -l '60 70 80_90' font.ttf -o font.bdf
|
||||
.sp
|
||||
The command above will only generate the glyphs for codes 60, 70, and 80
|
||||
through 90 inclusive. Glyphs that are not in the subset are not
|
||||
generated.
|
||||
.PP
|
||||
.TP 8
|
||||
.I -m mapfile
|
||||
specifies a mapping file which will reencode the BDF font when it is
|
||||
generated. Any glyphs with codes that do not have a mapping will not
|
||||
be generated.
|
||||
.sp
|
||||
The remapping file should begin with two lines, one which starts with
|
||||
REGISTRY followed by the character set registry and one which starts
|
||||
with ENCODING followed by the encoding. An example from the
|
||||
iso8859.2 file:
|
||||
.sp
|
||||
REGISTRY ISO8859
|
||||
.br
|
||||
ENCODING 2
|
||||
.sp
|
||||
The remapping data should be two columns of hexadecimal numbers, separated by
|
||||
spaces or tabs. The first column should have the code which should be used in
|
||||
the BDF font. The second column should be the hexadecimal code of the glyph
|
||||
in the "cmap" table ttf2bdf is using. An example mapping file is provided
|
||||
which will map fonts from Unicode (the default "cmap" table) to ISO8859-2.
|
||||
.sp
|
||||
Unicode is not the only option. If you choose another platform and
|
||||
encoding ID on the command line, then the remapping is assumed to map
|
||||
from the chosen platform and encoding to some other character set.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
xmbdfed(1), xfed(1), bdftopcf(1), bdftosnf(1)
|
||||
.br
|
||||
\fIGlyph Bitmap Distribution Format (BDF) Specification\fP, Application
|
||||
Note 5005, Adobe System Inc, 1993
|
||||
.br
|
||||
\fIX Logical Font Description Conventions\fP, X Consortium
|
||||
|
||||
.SH ACKNOWLEDGMENTS
|
||||
|
||||
The FreeType project for providing the renderer!
|
||||
.br
|
||||
Robert Wilhelm <robert@physiol.med.tu-muenchen.de> for pointing out a
|
||||
crucial problem with the pre-1.0 code.
|
||||
.br
|
||||
Lho Li-Da <ollie@ms1.hinet.net> for problem reports.
|
||||
.br
|
||||
Adrian Havill <havill@threeweb.ad.jp> for unintentionally pointing out a
|
||||
missing feature.
|
||||
.br
|
||||
Richard Verhoeven <rcb5@win.tue.nl> for problem reports and patches.
|
||||
.br
|
||||
Choi Jun Ho <junker@jazz.snu.ac.kr> whose implementation provided some
|
||||
nice new features.
|
||||
.br
|
||||
Pavel Kankovsky <peak@kerberos.troja.mff.cuni.cz> for providing some
|
||||
critical metrics fixes and other improvements.
|
||||
.br
|
||||
Matti Koskinen <mjkoskin@sci.fi> for pointing out a problem.
|
||||
.br
|
||||
Eugene Bobin <gene@ftim.ustu.ru> for mapping tables and shell scripts.
|
||||
.br
|
||||
Oleg N. Yakovlev <yashka@optima.dnepropetrovsk.ua> for pointing out a problem.
|
||||
.br
|
||||
Bertrand Petit <elrond@phoe.frmug.org> for additional functionality.
|
||||
.br
|
||||
Roman Czyborra <czyborra@cs.tu-berlin.de> for pointing out some problems.
|
||||
.br
|
||||
Mike Blazer <blazer@mail.nevalink.ru> for some Window's compilation advice.
|
||||
.br
|
||||
Solofo Ramangalahy <solofo@mpi-sb.mpg.de> for contributing some mapping
|
||||
tables.
|
||||
Antoine Leca <Antoine.Leca@renault.fr> for mapping table suggestions.
|
||||
.SH AUTHOR
|
||||
Mark Leisher
|
||||
.br
|
||||
Computing Research Lab
|
||||
.br
|
||||
New Mexico State University
|
||||
.br
|
||||
Email: mleisher@crl.nmsu.edu
|
||||
3
contrib/ttf2pfb/.cvsignore
Normal file
3
contrib/ttf2pfb/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
t1asm
|
||||
ttf2pfb
|
||||
Makefile
|
||||
16
contrib/ttf2pfb/Makefile.emx
Normal file
16
contrib/ttf2pfb/Makefile.emx
Normal file
@@ -0,0 +1,16 @@
|
||||
# Makefile for ttf2pfb and t1asm
|
||||
|
||||
all: ttf2pfb.exe t1asm.exe
|
||||
|
||||
|
||||
ttf2pfb.exe: ttf2pfb.o
|
||||
gcc -O -o ttf2pfb.exe ttf2pfb.o -lttf
|
||||
|
||||
ttf2pfb.o: ttf2pfb.c
|
||||
gcc -O -c ttf2pfb.c
|
||||
|
||||
t1asm.exe: t1asm.o
|
||||
gcc -O -o t1asm.exe t1asm.o -lttf
|
||||
|
||||
t1asm.o: t1asm.c
|
||||
gcc -O -c t1asm.c
|
||||
74
contrib/ttf2pfb/Makefile.in
Normal file
74
contrib/ttf2pfb/Makefile.in
Normal file
@@ -0,0 +1,74 @@
|
||||
# Makefile for ttf2pfb
|
||||
#
|
||||
# This Makefile assumes that you've already built and installed
|
||||
# the FreeType library.
|
||||
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
RM = @RM@
|
||||
RMF = @RM@ -f
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
|
||||
LIBTOOL = ../../libtool
|
||||
MKINSTALLDIRS = $(srcdir)/../../mkinstalldirs
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
|
||||
CFLAGS = @CFLAGS@ @XX_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ @DEFS@
|
||||
FT_CFLAGS = $(CFLAGS) $(CPPFLAGS)
|
||||
LDFLAGS = @LDFLAGS@ @LIBS@
|
||||
LIBDIR = ../../lib
|
||||
|
||||
SRC = t1asm.c ttf2pfb.c
|
||||
|
||||
PROGRAMS = t1asm ttf2pfb
|
||||
|
||||
default all: $(PROGRAMS)
|
||||
|
||||
t1asm: t1asm.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
ttf2pfb: ttf2pfb.o $(LIBDIR)/libttf.la
|
||||
$(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o $@ $< \
|
||||
$(LIBDIR)/libttf.la $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
$(RMF) *.o *BAK *CKP *~ a.out core
|
||||
|
||||
realclean: clean
|
||||
$(RMF) $(PROGRAMS)
|
||||
$(RM) -rf .libs/
|
||||
|
||||
distclean: realclean
|
||||
$(RMF) *~ *.orig core *.core
|
||||
$(RMF) config.cache config.log config.status Makefile
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(FT_CFLAGS) $<
|
||||
|
||||
install: $(PROGRAMS)
|
||||
$(MKINSTALLDIRS) $(bindir)
|
||||
for P in $(PROGRAMS) ; do \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$P $(bindir)/$$P ; \
|
||||
done
|
||||
$(INSTALL_PROGRAM) $(srcdir)/getafm $(bindir)/getafm
|
||||
|
||||
uninstall:
|
||||
-for P in $(PROGRAMS) ; do \
|
||||
$(LIBTOOL) --mode=uninstall $(RM) $(bindir)/$$P ; \
|
||||
done
|
||||
|
||||
.PHONY: all clean realclean distclean install uninstall
|
||||
|
||||
# end of Makefile
|
||||
40
contrib/ttf2pfb/TODO
Normal file
40
contrib/ttf2pfb/TODO
Normal file
@@ -0,0 +1,40 @@
|
||||
ttf2pfb is oriented towards support for CJK fonts containing several
|
||||
thousand glyphs to be splitted into subfonts with 256 characters each usable
|
||||
by TeX. Nevertheless, it is quite generic and works with normal ttf files
|
||||
too.
|
||||
|
||||
Some features are still missing or should be added for convenience:
|
||||
|
||||
. Documentation. ttf2pbf explains itself; t1asm is a filter which converts
|
||||
the (disassembled) pseudo font created by ttf2pfb into a real PFA font
|
||||
(or PFB if you use the `-b' command line switch).
|
||||
|
||||
Example for an ordinary font:
|
||||
|
||||
ttf2pfb -v -m -enc Uni-T1.enc -f FooBar -o foobar.ps foobar.ttf
|
||||
t1asm -b < foobar.ps > foobar.pfb
|
||||
printafm foobar.pfb > foobar.afm
|
||||
afm2tfm foobar.afm
|
||||
|
||||
Example for a CJK font in Big 5 encoding to be used with the CJK package
|
||||
for LaTeX (note that the call creates just the first subfont):
|
||||
|
||||
ttf2pfb -c -pid 3 -eid 4 -plane 1 -f FooBar01 -o foobar01.ps foobar.ttf
|
||||
t1asm -b < foobar01.ps > foobar01.pfb
|
||||
printafm foobar01.pfb > foobar01.afm
|
||||
afm2tfm foobar01.afm
|
||||
|
||||
. Inclusion of t1asm and t1binary into ttf2pfb so that ttf2pfb can directly
|
||||
produce PFA and PFB files.
|
||||
|
||||
. Overlapping outlines produce incorrect shapes: The overlapping areas
|
||||
appear white instead of black.
|
||||
|
||||
. A more flexible encoding file format (maybe similar to ttf2tfm) which can
|
||||
handle glyph names.
|
||||
|
||||
. [t1asm has been slightly patched to allow partial font downloading with
|
||||
dvips.]
|
||||
|
||||
. Note that compiling ttf2pfb with `-O2' doesn't work, most probably due to
|
||||
a compiler bug (we've tested with gcc 2.7.2.1 and 2.7.2.3).
|
||||
397
contrib/ttf2pfb/Uni-T1.enc
Normal file
397
contrib/ttf2pfb/Uni-T1.enc
Normal file
@@ -0,0 +1,397 @@
|
||||
#
|
||||
# This file is a hack to provide some mapping for standard (non-CJK)
|
||||
# TrueType fonts. It is intended as an intermediate step towards a
|
||||
# `correct' implementation as in ttf2tfm.
|
||||
#
|
||||
# Here, we have Unicode to LaTeX's T1 encoding. An example call would be
|
||||
#
|
||||
# ttf2pfb -m -enc Uni-T1.enc ...
|
||||
#
|
||||
# Glyph names which can't be represented in Unicode have the character code
|
||||
# 0xfffe.
|
||||
|
||||
|
||||
# 0x00
|
||||
|
||||
0x00:
|
||||
0x60 # /grave
|
||||
0xb4 # /acute
|
||||
0x02:
|
||||
0xc6 # /circumflex
|
||||
0xdc # /tilde
|
||||
|
||||
0x00:
|
||||
0xa8 # /dieresis
|
||||
0x02:
|
||||
0xdd # /hungarumlaut
|
||||
0xda # /ring
|
||||
0xc7 # /caron
|
||||
|
||||
0xd8 # /breve
|
||||
0xc9 # /macron
|
||||
0xd9 # /dotaccent
|
||||
0x00:
|
||||
0xb8 # /cedilla
|
||||
|
||||
0x02:
|
||||
0xdb # /ogonek
|
||||
0x20:
|
||||
0x1a # /quotesinglbase
|
||||
0x39 # /guilsinglleft
|
||||
0x3a # /guilsinglright
|
||||
|
||||
# 0x10
|
||||
|
||||
0x1c # /quotedblleft
|
||||
0x1d # /quotedblright
|
||||
0x1e # /quotedblbase
|
||||
0x00:
|
||||
0xab # /guillemotleft
|
||||
|
||||
0xbb # /guillemotright
|
||||
0x20:
|
||||
0x13 # /endash
|
||||
0x14 # /emdash
|
||||
0xff:
|
||||
0xfe # /compwordmark
|
||||
|
||||
0xfe # /perthousandzero
|
||||
0x01:
|
||||
0x31 # /dotlessi
|
||||
0xff:
|
||||
0xfe # /dotlessj
|
||||
0xfe # /ff
|
||||
|
||||
0xf0:
|
||||
0x01 # /fi
|
||||
0x02 # /fl
|
||||
0xff:
|
||||
0xfe # /ffi
|
||||
0xfe # /ffl
|
||||
|
||||
# 0x20
|
||||
|
||||
0xfe # /visualspace
|
||||
0x00:
|
||||
0x21 # /exclam
|
||||
0x22 # /quotedbl
|
||||
0x23 # /numbersign
|
||||
|
||||
0x24 # /dollar
|
||||
0x25 # /percent
|
||||
0x26 # /ampersand
|
||||
0x20:
|
||||
0x19 # /quoteright
|
||||
|
||||
0x00:
|
||||
0x28 # /parenleft
|
||||
0x29 # /parenright
|
||||
0x2a # /asterisk
|
||||
0x2b # /plus
|
||||
|
||||
0x2c # /comma
|
||||
0x2d # /hyphen
|
||||
0x2e # /period
|
||||
0x2f # /slash
|
||||
|
||||
# 0x30
|
||||
|
||||
0x30 # /zero
|
||||
0x31 # /one
|
||||
0x32 # /two
|
||||
0x33 # /three
|
||||
|
||||
0x34 # /four
|
||||
0x35 # /five
|
||||
0x36 # /six
|
||||
0x37 # /seven
|
||||
|
||||
0x38 # /eight
|
||||
0x39 # /nine
|
||||
0x3a # /colon
|
||||
0x3b # /semicolon
|
||||
|
||||
0x3c # /less
|
||||
0x3d # /equal
|
||||
0x3e # /greater
|
||||
0x3f # /question
|
||||
|
||||
# 0x40
|
||||
|
||||
0x40 # /at
|
||||
0x41 # /A
|
||||
0x42 # /B
|
||||
0x43 # /C
|
||||
|
||||
0x44 # /D
|
||||
0x45 # /E
|
||||
0x46 # /F
|
||||
0x47 # /G
|
||||
|
||||
0x48 # /H
|
||||
0x49 # /I
|
||||
0x4a # /J
|
||||
0x4b # /K
|
||||
|
||||
0x4c # /L
|
||||
0x4d # /M
|
||||
0x4e # /N
|
||||
0x4f # /O
|
||||
|
||||
# 0x50
|
||||
|
||||
0x50 # /P
|
||||
0x51 # /Q
|
||||
0x52 # /R
|
||||
0x53 # /S
|
||||
|
||||
0x54 # /T
|
||||
0x55 # /U
|
||||
0x56 # /V
|
||||
0x57 # /W
|
||||
|
||||
0x58 # /X
|
||||
0x59 # /Y
|
||||
0x5a # /Z
|
||||
0x5b # /bracketleft
|
||||
|
||||
0x5c # /backslash
|
||||
0x5d # /bracketright
|
||||
0x5e # /asciicircum
|
||||
0x5f # /underscore
|
||||
|
||||
# 0x60
|
||||
|
||||
0x20:
|
||||
0x18 # /quoteleft
|
||||
0x00:
|
||||
0x61 # /a
|
||||
0x62 # /b
|
||||
0x63 # /c
|
||||
|
||||
0x64 # /d
|
||||
0x65 # /e
|
||||
0x66 # /f
|
||||
0x67 # /g
|
||||
|
||||
0x68 # /h
|
||||
0x69 # /i
|
||||
0x6a # /j
|
||||
0x6b # /k
|
||||
|
||||
0x6c # /l
|
||||
0x6d # /m
|
||||
0x6e # /n
|
||||
0x6f # /o
|
||||
|
||||
# 0x70
|
||||
|
||||
0x70 # /p
|
||||
0x71 # /q
|
||||
0x72 # /r
|
||||
0x73 # /s
|
||||
|
||||
0x74 # /t
|
||||
0x75 # /u
|
||||
0x76 # /v
|
||||
0x77 # /w
|
||||
|
||||
0x78 # /x
|
||||
0x79 # /y
|
||||
0x7a # /z
|
||||
0x7b # /braceleft
|
||||
|
||||
0x7c # /bar
|
||||
0x7d # /braceright
|
||||
0x7e # /asciitilde
|
||||
0x2d # /hyphen
|
||||
|
||||
# 0x80
|
||||
|
||||
0x01:
|
||||
0x02 # /Abreve
|
||||
0x04 # /Aogonek
|
||||
0x06 # /Cacute
|
||||
0x0c # /Ccaron
|
||||
|
||||
0x0e # /Dcaron
|
||||
0x1a # /Ecaron
|
||||
0x18 # /Eogonek
|
||||
0x1e # /Gbreve
|
||||
|
||||
0x39 # /Lacute
|
||||
0x3d # /Lcaron
|
||||
0x41 # /Lslash
|
||||
0x43 # /Nacute
|
||||
|
||||
0x47 # /Ncaron
|
||||
0x4a # /Eng
|
||||
0x50 # /Odblacute
|
||||
0x54 # /Racute
|
||||
|
||||
# 0x90
|
||||
|
||||
0x58 # /Rcaron
|
||||
0x5a # /Sacute
|
||||
0x60 # /Scaron
|
||||
0x5e # /Scedilla
|
||||
|
||||
0x64 # /Tcaron
|
||||
0x62 # /Tcedilla
|
||||
0x70 # /Udblacute
|
||||
0x6e # /Uring
|
||||
|
||||
0x78 # /Ydieresis
|
||||
0x79 # /Zacute
|
||||
0x7d # /Zcaron
|
||||
0x7b # /Zdot
|
||||
|
||||
0x32 # /IJ
|
||||
0x30 # /Idot
|
||||
0x11 # /dmacron
|
||||
0x00:
|
||||
0xa7 # /section
|
||||
|
||||
# 0xA0
|
||||
|
||||
0x01:
|
||||
0x03 # /abreve
|
||||
0x05 # /aogonek
|
||||
0x07 # /cacute
|
||||
0x0d # /ccaron
|
||||
|
||||
0x0f # /dcaron
|
||||
0x1b # /ecaron
|
||||
0x19 # /eogonek
|
||||
0x1f # /gbreve
|
||||
|
||||
0x3a # /lacute
|
||||
0x3e # /lcaron
|
||||
0x42 # /lslash
|
||||
0x44 # /nacute
|
||||
|
||||
0x48 # /ncaron
|
||||
0x4b # /eng
|
||||
0x51 # /odblacute
|
||||
0x55 # /racute
|
||||
|
||||
# 0xB0
|
||||
|
||||
0x59 # /rcaron
|
||||
0x5b # /sacute
|
||||
0x61 # /scaron
|
||||
0x5f # /scedilla
|
||||
|
||||
0x65 # /tcaron
|
||||
0x63 # /tcedilla
|
||||
0x71 # /udblacute
|
||||
0x6f # /uring
|
||||
|
||||
0x00:
|
||||
0xff # /ydieresis
|
||||
0x01:
|
||||
0x7a # /zacute
|
||||
0x7e # /zcaron
|
||||
0x7c # /zdot
|
||||
|
||||
0x33 # /ij
|
||||
0x00:
|
||||
0xa1 # /exclamdown
|
||||
0xbf # /questiondown
|
||||
0xa3 # /sterling
|
||||
|
||||
# 0xC0
|
||||
|
||||
0xc0 # /Agrave
|
||||
0xc1 # /Aacute
|
||||
0xc2 # /Acircumflex
|
||||
0xc3 # /Atilde
|
||||
|
||||
0xc4 # /Adieresis
|
||||
0xc5 # /Aring
|
||||
0xc6 # /AE
|
||||
0xc7 # /Ccedilla
|
||||
|
||||
0xc8 # /Egrave
|
||||
0xc9 # /Eacute
|
||||
0xca # /Ecircumflex
|
||||
0xcb # /Edieresis
|
||||
|
||||
0xcc # /Igrave
|
||||
0xcd # /Iacute
|
||||
0xce # /Icircumflex
|
||||
0xcf # /Idieresis
|
||||
|
||||
# 0xD0
|
||||
|
||||
0xd0 # /Eth
|
||||
0xd1 # /Ntilde
|
||||
0xd2 # /Ograve
|
||||
0xd3 # /Oacute
|
||||
|
||||
0xd4 # /Ocircumflex
|
||||
0xd5 # /Otilde
|
||||
0xd6 # /Odieresis
|
||||
0x01:
|
||||
0x52 # /OE
|
||||
|
||||
0x00:
|
||||
0xd8 # /Oslash
|
||||
0xd9 # /Ugrave
|
||||
0xda # /Uacute
|
||||
0xdb # /Ucircumflex
|
||||
|
||||
0xdc # /Udieresis
|
||||
0xdd # /Yacute
|
||||
0xde # /Thorn
|
||||
0xff:
|
||||
0xfe # /Germandbls
|
||||
|
||||
# 0xE0
|
||||
|
||||
0x00:
|
||||
0xe0 # /agrave
|
||||
0xe1 # /aacute
|
||||
0xe2 # /acircumflex
|
||||
0xe3 # /atilde
|
||||
|
||||
0xe4 # /adieresis
|
||||
0xe5 # /aring
|
||||
0xe6 # /ae
|
||||
0xe7 # /ccedilla
|
||||
|
||||
0xe8 # /egrave
|
||||
0xe9 # /eacute
|
||||
0xea # /ecircumflex
|
||||
0xeb # /edieresis
|
||||
|
||||
0xec # /igrave
|
||||
0xed # /iacute
|
||||
0xee # /icircumflex
|
||||
0xef # /idieresis
|
||||
|
||||
# 0xF0
|
||||
|
||||
0xf0 # /eth
|
||||
0xf1 # /ntilde
|
||||
0xf2 # /ograve
|
||||
0xf3 # /oacute
|
||||
|
||||
0xf4 # /ocircumflex
|
||||
0xf5 # /otilde
|
||||
0xf6 # /odieresis
|
||||
0x01:
|
||||
0x53 # /oe
|
||||
|
||||
0x00:
|
||||
0xf8 # /oslash
|
||||
0xf9 # /ugrave
|
||||
0xfa # /uacute
|
||||
0xfb # /ucircumflex
|
||||
|
||||
0xfc # /udieresis
|
||||
0xfd # /yacute
|
||||
0xfe # /thorn
|
||||
0xdf # /germandbls
|
||||
|
||||
#eof
|
||||
1553
contrib/ttf2pfb/configure
vendored
Normal file
1553
contrib/ttf2pfb/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
45
contrib/ttf2pfb/configure.in
Normal file
45
contrib/ttf2pfb/configure.in
Normal file
@@ -0,0 +1,45 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(../../lib/freetype.h)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
|
||||
CFLAGS="-g -O -DDEBUG"
|
||||
OLDLIBS=$LIBS
|
||||
LIBS="$LIBS -L../../lib/.libs"
|
||||
CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS"
|
||||
AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[
|
||||
AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])])
|
||||
LIBS=$OLDLIBS
|
||||
|
||||
dnl get Compiler flags right.
|
||||
|
||||
if test "x$CC" = xgcc; then
|
||||
XX_CFLAGS="-Wall -ansi -pedantic"
|
||||
else
|
||||
case "$host" in
|
||||
alpha-dec-osf*)
|
||||
XX_CFLAGS="-std1 -O2 -g3"
|
||||
;;
|
||||
*)
|
||||
XX_CFLAGS=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(XX_CFLAGS)
|
||||
|
||||
AC_CHECK_PROG(RM, rm, rm)
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
dnl end of configure.in
|
||||
364
contrib/ttf2pfb/getafm
Normal file
364
contrib/ttf2pfb/getafm
Normal file
@@ -0,0 +1,364 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "usage: $0 font-name | gsnd -q - >font-name.afm" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
%!
|
||||
% produce .afm for $1
|
||||
% (c) 1993 by Robert Joop <rj@rainbow.in-berlin.de>
|
||||
% inspired by two other versions of this theme which are
|
||||
% getafm 1.00 (c) AJCD
|
||||
% and getafm.ps by an unknown author,
|
||||
% modified by J. Daniel Smith <dsmith@mailhost.aa.cad.slb.com>
|
||||
%
|
||||
% modified by Joachim H. Kaiser <jhk@cmpnetmail.com>:
|
||||
% - suggest a quiet gs run in usage
|
||||
% - get font version info (from 'version', not 'Version')
|
||||
% - add copyright field to output
|
||||
|
||||
% Metrics dictionary code added by AJCD, 7/6/93
|
||||
|
||||
/getafmdict 100 dict dup begin
|
||||
|
||||
/buf 256 string def
|
||||
/buf2 16 string def
|
||||
|
||||
/prany % dict dictname printname -> dict
|
||||
{
|
||||
2 index 2 index cvn known
|
||||
{
|
||||
print % printname
|
||||
( ) print
|
||||
1 index exch cvn get =
|
||||
}
|
||||
{
|
||||
(Comment /FontInfo contains no /) print
|
||||
2 copy eq
|
||||
{
|
||||
= % printname
|
||||
pop % dictname
|
||||
}
|
||||
{
|
||||
exch
|
||||
print % dictname
|
||||
(, therefore no ) print
|
||||
= % printname
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
bind def
|
||||
|
||||
/printfontname
|
||||
{
|
||||
(FontName)dup prany
|
||||
}
|
||||
bind def
|
||||
|
||||
/printfontinfo
|
||||
{
|
||||
dup /FontInfo known
|
||||
{
|
||||
dup /FontInfo get
|
||||
(FullName)dup prany
|
||||
(FamilyName)dup prany
|
||||
(Weight)dup prany
|
||||
(ItalicAngle)dup prany
|
||||
(isFixedPitch)(IsFixedPitch) prany
|
||||
(UnderlinePosition)dup prany
|
||||
(UnderlineThickness)dup prany
|
||||
(version)(Version) prany
|
||||
(Notice)dup prany
|
||||
(Copyright)dup prany
|
||||
pop
|
||||
}
|
||||
{
|
||||
(Comment Font lacks a /FontInfo!)=
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
bind def
|
||||
|
||||
/prbbox % llx lly urx ury -> -
|
||||
{
|
||||
4 1 roll 3 1 roll exch % swap top 4 elements
|
||||
4 { ( ) print buf cvs print } repeat
|
||||
}
|
||||
bind def
|
||||
|
||||
/getbbox % fontdict chardict character -> fontdict chardict llx lly urx ury
|
||||
{
|
||||
gsave
|
||||
2 index setfont 0 0 moveto
|
||||
false charpath flattenpath pathbbox
|
||||
grestore
|
||||
}
|
||||
bind def
|
||||
|
||||
/printmiscinfo
|
||||
{
|
||||
dup /FontBBox known
|
||||
{
|
||||
(FontBBox) print
|
||||
dup /FontBBox get aload pop prbbox ()=
|
||||
}
|
||||
{
|
||||
(Comment missing required /FontBBox)=
|
||||
quit
|
||||
}
|
||||
ifelse
|
||||
2 copy exch get
|
||||
dup /H known
|
||||
1 index /x known and
|
||||
1 index /d known and
|
||||
1 index /p known and
|
||||
dup /looksRoman exch def
|
||||
{
|
||||
(CapHeight ) print
|
||||
(H) getbbox
|
||||
ceiling cvi = pop pop pop
|
||||
(XHeight ) print
|
||||
(x) getbbox
|
||||
ceiling cvi = pop pop pop
|
||||
(Ascender ) print
|
||||
(d) getbbox
|
||||
ceiling cvi = pop pop pop
|
||||
(Descender ) print
|
||||
(p) getbbox
|
||||
pop pop floor cvi = pop
|
||||
}
|
||||
{
|
||||
(Comment font doesn't contain H, x, d and p; therefore no CapHeight, XHeight, Ascender and Descender)=
|
||||
}
|
||||
ifelse
|
||||
pop
|
||||
dup /Encoding get
|
||||
[
|
||||
[ (ISOLatin1Encoding) /ISOLatin1Encoding ]
|
||||
[ (AdobeStandardEncoding) /StandardEncoding ]
|
||||
]
|
||||
{
|
||||
aload pop dup where
|
||||
{
|
||||
exch get 2 index eq
|
||||
{
|
||||
(EncodingScheme ) print
|
||||
buf cvs =
|
||||
}
|
||||
{
|
||||
pop
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
{
|
||||
pop pop
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
forall
|
||||
pop
|
||||
}
|
||||
bind def
|
||||
|
||||
/printcharmetric
|
||||
{
|
||||
% chardictname fontdict charnamedict encoding charindex charname
|
||||
|
||||
4 index dup length dict dup begin exch
|
||||
{
|
||||
1 index /FID ne
|
||||
2 index /UniqueID ne
|
||||
and
|
||||
{
|
||||
1 index /Encoding eq { 256 array copy } if
|
||||
def
|
||||
}
|
||||
{ pop pop }
|
||||
ifelse
|
||||
}
|
||||
forall
|
||||
end
|
||||
dup /Encoding get 32 3 index put
|
||||
/f2 exch definefont
|
||||
setfont
|
||||
|
||||
(C ) print
|
||||
1 index buf cvs print
|
||||
|
||||
( ; WX ) print
|
||||
% Metrics entries are:
|
||||
% 1 number: which is the character width
|
||||
% an array of 2 numbers: which are the left sidebearing and width
|
||||
% an array of 4 numbers: x & y left sidebearing, width and height
|
||||
dup 5 index % /charname fontdict
|
||||
dup /Metrics known {
|
||||
/Metrics get exch 2 copy known {
|
||||
get dup type /arraytype eq {
|
||||
dup length 2 eq
|
||||
{1 get} {2 get} ifelse
|
||||
} if
|
||||
round cvi buf cvs print
|
||||
} {
|
||||
pop pop ( ) stringwidth pop round cvi buf cvs print
|
||||
} ifelse
|
||||
} {
|
||||
pop pop ( ) stringwidth pop round cvi buf cvs print
|
||||
} ifelse
|
||||
|
||||
( ; N ) print
|
||||
dup buf cvs print
|
||||
|
||||
( ; B) print
|
||||
gsave
|
||||
newpath 0 0 moveto
|
||||
( ) true charpath flattenpath pathbbox
|
||||
grestore
|
||||
2 { ceiling cvi 4 1 roll } repeat
|
||||
2 { floor cvi 4 1 roll } repeat
|
||||
prbbox
|
||||
|
||||
looksRoman
|
||||
{
|
||||
[
|
||||
[ /f [ /i /f /l ] ]
|
||||
[ /ff [ /i /l ] ]
|
||||
]
|
||||
{
|
||||
aload pop 1 index 3 index eq
|
||||
{
|
||||
{
|
||||
1 index buf cvs
|
||||
length
|
||||
1 index buf2 cvs dup length
|
||||
2 index add
|
||||
buf
|
||||
4 2 roll putinterval
|
||||
buf 0
|
||||
3 -1 roll getinterval
|
||||
dup cvn
|
||||
7 index
|
||||
exch known
|
||||
{
|
||||
exch
|
||||
( ; L ) print
|
||||
buf2 cvs print
|
||||
( ) print
|
||||
print
|
||||
}
|
||||
{
|
||||
pop pop
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
forall
|
||||
pop
|
||||
}
|
||||
{
|
||||
pop pop
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
forall
|
||||
}
|
||||
if
|
||||
pop
|
||||
|
||||
( ;)=
|
||||
}
|
||||
bind def
|
||||
|
||||
/printcharmetrics
|
||||
{
|
||||
(StartCharMetrics ) print
|
||||
2 copy exch get length 1 sub buf cvs =
|
||||
|
||||
256 dict dup begin
|
||||
1 index /Encoding get
|
||||
{ null def }
|
||||
forall
|
||||
end
|
||||
% chardictname fontdict charnamedict
|
||||
1 index /Encoding get
|
||||
0 1 255
|
||||
{
|
||||
% encoding index
|
||||
2 copy get
|
||||
dup /.notdef eq { pop } { printcharmetric } ifelse
|
||||
pop % index
|
||||
} for
|
||||
|
||||
-1
|
||||
3 index 5 index get
|
||||
{
|
||||
pop
|
||||
dup /.notdef eq
|
||||
{ pop }
|
||||
{
|
||||
% chardictname fontdict charnamedict encoding charindex charname
|
||||
dup 4 index exch known
|
||||
{ pop }
|
||||
{ printcharmetric }
|
||||
ifelse
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
forall
|
||||
% charnamedict encoding index
|
||||
pop pop pop
|
||||
|
||||
(EndCharMetrics)=
|
||||
}
|
||||
bind def
|
||||
|
||||
/printfontmetrics
|
||||
{
|
||||
(StartFontMetrics 3.0)=
|
||||
(Comment Produced by getafm 3.0 (which is by rj@rainbow.in-berlin.de))=
|
||||
|
||||
printfontname
|
||||
printfontinfo
|
||||
printmiscinfo
|
||||
printcharmetrics
|
||||
|
||||
(EndFontMetrics)=
|
||||
}
|
||||
bind def
|
||||
|
||||
end def
|
||||
|
||||
/getafm
|
||||
{
|
||||
getafmdict begin
|
||||
save exch
|
||||
findfont 1000 scalefont
|
||||
|
||||
null
|
||||
[ /CharDefs /CharData /CharProcs /CharStrings ]
|
||||
{
|
||||
2 index 1 index known { exch } if
|
||||
pop
|
||||
}
|
||||
forall
|
||||
dup null eq
|
||||
{
|
||||
(can't find dictionary with character data!)=
|
||||
quit
|
||||
}
|
||||
if
|
||||
exch % dictname fontdict
|
||||
|
||||
printfontmetrics
|
||||
|
||||
pop pop
|
||||
restore
|
||||
end
|
||||
}
|
||||
bind def
|
||||
|
||||
/$1 getafm
|
||||
|
||||
EOF
|
||||
529
contrib/ttf2pfb/t1asm.c
Normal file
529
contrib/ttf2pfb/t1asm.c
Normal file
@@ -0,0 +1,529 @@
|
||||
/* t1asm
|
||||
**
|
||||
** This program `assembles' Adobe Type-1 font programs in pseudo-PostScript
|
||||
** form into either PFB or PFA format. The human readable/editable input is
|
||||
** charstring- and eexec-encrypted as specified in the `Adobe Type 1 Font
|
||||
** Format' version 1.1 (the `black book'). There is a companion program,
|
||||
** t1disasm, which `disassembles' PFB and PFA files into a pseudo-PostScript
|
||||
** file.
|
||||
**
|
||||
** Copyright (c) 1992 by I. Lee Hetherington, all rights reserved.
|
||||
**
|
||||
** Permission is hereby granted to use, modify, and distribute this program
|
||||
** for any purpose provided this copyright notice and the one below remain
|
||||
** intact.
|
||||
**
|
||||
** author: I. Lee Hetherington (ilh@lcs.mit.edu)
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] =
|
||||
"@(#) t1asm.c 1.2 10:09:46 5/22/92";
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1992 by I. Lee Hetherington, all rights reserved.";
|
||||
#endif
|
||||
|
||||
/* Note: this is ANSI C. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef MSDOS
|
||||
#define WB "wb"
|
||||
#else
|
||||
#define WB "w"
|
||||
#endif
|
||||
|
||||
#define BANNER "This is t1asm 1.2.\n"
|
||||
#define LINESIZE 256
|
||||
|
||||
#define MAXBLOCKLEN ((1<<17)-6)
|
||||
#define MINBLOCKLEN ((1<<8)-6)
|
||||
|
||||
#define MARKER 128
|
||||
#define ASCII 1
|
||||
#define BINARY 2
|
||||
#define DONE 3
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
static FILE *ifp = stdin;
|
||||
static FILE *ofp = stdout;
|
||||
|
||||
/* flags */
|
||||
static int pfb = 0;
|
||||
static int active = 0;
|
||||
static int start_charstring = 0;
|
||||
static int in_eexec = 0;
|
||||
|
||||
static char line[LINESIZE + 1];
|
||||
|
||||
/* lenIV and charstring start command */
|
||||
static int lenIV = 4;
|
||||
static char cs_start[10];
|
||||
|
||||
/* for charstring buffering */
|
||||
static byte charstring_buf[65535];
|
||||
static byte *charstring_bp;
|
||||
|
||||
/* for PFB block buffering */
|
||||
static byte blockbuf[MAXBLOCKLEN];
|
||||
static int blocklen = MAXBLOCKLEN;
|
||||
static int blockpos = -1;
|
||||
static int blocktyp = ASCII;
|
||||
|
||||
/* decryption stuff */
|
||||
static unsigned short er, cr;
|
||||
static unsigned short c1 = 52845, c2 = 22719;
|
||||
|
||||
/* table of charstring commands */
|
||||
static struct command {
|
||||
char *name;
|
||||
int one, two;
|
||||
} command_table[] = {
|
||||
{ "callothersubr", 12, 16 },
|
||||
{ "callsubr", 10, -1 },
|
||||
{ "closepath", 9, -1 },
|
||||
{ "div", 12, 12 },
|
||||
{ "dotsection", 12, 0 },
|
||||
{ "endchar", 14, -1 },
|
||||
{ "escape", 12, -1 },
|
||||
{ "hlineto", 6, -1 },
|
||||
{ "hmoveto", 22, -1 },
|
||||
{ "hsbw", 13, -1 },
|
||||
{ "hstem", 1, -1 },
|
||||
{ "hstem3", 12, 2 },
|
||||
{ "hvcurveto", 31, -1 },
|
||||
{ "pop", 12, 17 },
|
||||
{ "return", 11, -1 },
|
||||
{ "rlineto", 5, -1 },
|
||||
{ "rmoveto", 21, -1 },
|
||||
{ "rrcurveto", 8, -1 },
|
||||
{ "sbw", 12, 7 },
|
||||
{ "seac", 12, 6 },
|
||||
{ "setcurrentpoint", 12, 33 },
|
||||
{ "vhcurveto", 30, -1 },
|
||||
{ "vlineto", 7, -1 },
|
||||
{ "vmoveto", 4, -1 },
|
||||
{ "vstem", 3, -1 },
|
||||
{ "vstem3", 12, 1 },
|
||||
}; /* alphabetical */
|
||||
|
||||
/* Two separate decryption functions because eexec and charstring decryption
|
||||
must proceed in parallel. */
|
||||
|
||||
static byte eencrypt(byte plain)
|
||||
{
|
||||
byte cipher;
|
||||
|
||||
cipher = (plain ^ (er >> 8));
|
||||
er = (cipher + er) * c1 + c2;
|
||||
return cipher;
|
||||
}
|
||||
|
||||
static byte cencrypt(byte plain)
|
||||
{
|
||||
byte cipher;
|
||||
|
||||
cipher = (plain ^ (cr >> 8));
|
||||
cr = (cipher + cr) * c1 + c2;
|
||||
return cipher;
|
||||
}
|
||||
|
||||
/* This function flushes a buffered PFB block. */
|
||||
|
||||
static void output_block()
|
||||
{
|
||||
int i;
|
||||
|
||||
/* output four-byte block length */
|
||||
fputc(blockpos & 0xff, ofp);
|
||||
fputc((blockpos >> 8) & 0xff, ofp);
|
||||
fputc((blockpos >> 16) & 0xff, ofp);
|
||||
fputc((blockpos >> 24) & 0xff, ofp);
|
||||
|
||||
/* output block data */
|
||||
for (i = 0; i < blockpos; i++)
|
||||
fputc(blockbuf[i], ofp);
|
||||
|
||||
/* mark block buffer empty and uninitialized */
|
||||
blockpos = -1;
|
||||
}
|
||||
|
||||
/* This function outputs a single byte. If output is in PFB format then output
|
||||
is buffered through blockbuf[]. If output is in PFA format, then output
|
||||
will be hexadecimal if in_eexec is set, ASCII otherwise. */
|
||||
|
||||
static void output_byte(byte b)
|
||||
{
|
||||
static char *hexchar = "0123456789ABCDEF";
|
||||
static int hexcol = 0;
|
||||
|
||||
if (pfb) {
|
||||
/* PFB */
|
||||
if (blockpos < 0) {
|
||||
fputc(MARKER, ofp);
|
||||
fputc(blocktyp, ofp);
|
||||
blockpos = 0;
|
||||
}
|
||||
blockbuf[blockpos++] = b;
|
||||
if (blockpos == blocklen)
|
||||
output_block();
|
||||
} else {
|
||||
/* PFA */
|
||||
if (in_eexec) {
|
||||
/* trim hexadecimal lines to 64 columns */
|
||||
if (hexcol >= 64) {
|
||||
fputc('\n', ofp);
|
||||
hexcol = 0;
|
||||
}
|
||||
fputc(hexchar[(b >> 4) & 0xf], ofp);
|
||||
fputc(hexchar[b & 0xf], ofp);
|
||||
hexcol += 2;
|
||||
} else {
|
||||
fputc(b, ofp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This function outputs a byte through possible eexec encryption. */
|
||||
|
||||
static void eexec_byte(byte b)
|
||||
{
|
||||
if (in_eexec)
|
||||
output_byte(eencrypt(b));
|
||||
else
|
||||
output_byte(b);
|
||||
}
|
||||
|
||||
/* This function outputs a null-terminated string through possible eexec
|
||||
encryption. */
|
||||
|
||||
static void eexec_string(char *string)
|
||||
{
|
||||
while (*string)
|
||||
eexec_byte((byte) *string++);
|
||||
}
|
||||
|
||||
/* This function gets ready for the eexec-encrypted data. If output is in
|
||||
PFB format then flush current ASCII block and get ready for binary block.
|
||||
We start encryption with four random (zero) bytes. */
|
||||
|
||||
static void eexec_start()
|
||||
{
|
||||
eexec_string(line);
|
||||
if (pfb) {
|
||||
output_block();
|
||||
blocktyp = BINARY;
|
||||
}
|
||||
|
||||
in_eexec = 1;
|
||||
er = 55665;
|
||||
eexec_byte(0);
|
||||
eexec_byte(0);
|
||||
eexec_byte(0);
|
||||
eexec_byte(0);
|
||||
}
|
||||
|
||||
/* This function wraps-up the eexec-encrypted data and writes ASCII trailer.
|
||||
If output is in PFB format then this entails flushing binary block and
|
||||
starting an ASCII block. */
|
||||
|
||||
static void eexec_end()
|
||||
{
|
||||
int i, j;
|
||||
|
||||
if (pfb) {
|
||||
output_block();
|
||||
blocktyp = ASCII;
|
||||
} else {
|
||||
fputc('\n', ofp);
|
||||
}
|
||||
in_eexec = 0;
|
||||
for (i = 0; i < 7; i++) {
|
||||
for (j = 0; j < 64; j++)
|
||||
eexec_byte('0');
|
||||
eexec_byte('\n');
|
||||
}
|
||||
eexec_string("cleartomark\n");
|
||||
if (pfb) {
|
||||
output_block();
|
||||
fputc(MARKER, ofp);
|
||||
fputc(DONE, ofp);
|
||||
}
|
||||
}
|
||||
|
||||
/* This function returns an input line of characters. A line is terminated by
|
||||
length (including terminating null) greater than LINESIZE, a newline \n, or
|
||||
when active (looking for charstrings) by '{'. When terminated by a newline
|
||||
the newline is put into line[]. When terminated by '{', the '{' is not put
|
||||
into line[], and the flag start_charstring is set to 1. */
|
||||
|
||||
static void getline()
|
||||
{
|
||||
int c;
|
||||
char *p = line;
|
||||
int comment = 0;
|
||||
|
||||
start_charstring = 0;
|
||||
while (p < line + LINESIZE) {
|
||||
c = fgetc(ifp);
|
||||
if (c == EOF)
|
||||
break;
|
||||
if (c == '%')
|
||||
comment = 1;
|
||||
if (active && !comment && c == '{') {
|
||||
start_charstring = 1;
|
||||
break;
|
||||
}
|
||||
*p++ = (char) c;
|
||||
if (c == '\n')
|
||||
break;
|
||||
}
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
/* This function is used by the binary search, bsearch(), for command names in
|
||||
the command table. */
|
||||
|
||||
static int command_compare(const void *key, const void *item)
|
||||
{
|
||||
return strcmp((char *) key, ((struct command *) item)->name);
|
||||
}
|
||||
|
||||
/* This function returns 1 if the string is an integer and 0 otherwise. */
|
||||
|
||||
static int is_integer(char *string)
|
||||
{
|
||||
if (isdigit(string[0]) || string[0] == '-' || string[0] == '+') {
|
||||
while (*++string && isdigit(*string))
|
||||
; /* deliberately empty */
|
||||
if (!*string)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This function initializes charstring encryption. Note that this is called
|
||||
at the beginning of every charstring. */
|
||||
|
||||
static void charstring_start()
|
||||
{
|
||||
int i;
|
||||
|
||||
charstring_bp = charstring_buf;
|
||||
cr = 4330;
|
||||
for (i = 0; i < lenIV; i++)
|
||||
*charstring_bp++ = cencrypt((byte) 0);
|
||||
}
|
||||
|
||||
/* This function encrypts and buffers a single byte of charstring data. */
|
||||
|
||||
static void charstring_byte(v)
|
||||
int v;
|
||||
{
|
||||
byte b = ((unsigned int)v) & 0xff;
|
||||
|
||||
if (charstring_bp - charstring_buf > sizeof(charstring_buf)) {
|
||||
fprintf(stderr, "error: charstring_buf full (%d bytes)\n",
|
||||
sizeof(charstring_buf));
|
||||
exit(1);
|
||||
}
|
||||
*charstring_bp++ = cencrypt(b);
|
||||
}
|
||||
|
||||
/* This function outputs buffered, encrypted charstring data through possible
|
||||
eexec encryption. */
|
||||
|
||||
static void charstring_end()
|
||||
{
|
||||
byte *bp;
|
||||
|
||||
sprintf(line, "%d %s ", charstring_bp - charstring_buf, cs_start);
|
||||
eexec_string(line);
|
||||
for (bp = charstring_buf; bp < charstring_bp; bp++)
|
||||
eexec_byte(*bp);
|
||||
}
|
||||
|
||||
/* This function generates the charstring representation of an integer. */
|
||||
|
||||
static void charstring_int(int num)
|
||||
{
|
||||
int x;
|
||||
|
||||
if (num >= -107 && num <= 107) {
|
||||
charstring_byte(num + 139);
|
||||
} else if (num >= 108 && num <= 1131) {
|
||||
x = num - 108;
|
||||
charstring_byte(x / 256 + 247);
|
||||
charstring_byte(x % 256);
|
||||
} else if (num >= -1131 && num <= -108) {
|
||||
x = abs(num) - 108;
|
||||
charstring_byte(x / 256 + 251);
|
||||
charstring_byte(x % 256);
|
||||
} else if (num >= (-2147483647-1) && num <= 2147483647) {
|
||||
charstring_byte(255);
|
||||
charstring_byte(num >> 24);
|
||||
charstring_byte(num >> 16);
|
||||
charstring_byte(num >> 8);
|
||||
charstring_byte(num);
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"error: cannot format the integer %d, too large\n", num);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* This function parses an entire charstring into integers and commands,
|
||||
outputting bytes through the charstring buffer. */
|
||||
|
||||
static void parse_charstring()
|
||||
{
|
||||
struct command *cp;
|
||||
|
||||
charstring_start();
|
||||
while (fscanf(ifp, "%s", line) == 1) {
|
||||
if (line[0] == '%') {
|
||||
/* eat comment to end of line */
|
||||
while (fgetc(ifp) != '\n' && !feof(ifp))
|
||||
; /* deliberately empty */
|
||||
continue;
|
||||
}
|
||||
if (line[0] == '}')
|
||||
break;
|
||||
if (is_integer(line)) {
|
||||
charstring_int(atoi(line));
|
||||
} else {
|
||||
cp = (struct command *)
|
||||
bsearch((void *) line, (void *) command_table,
|
||||
sizeof(command_table) / sizeof(struct command),
|
||||
sizeof(struct command),
|
||||
command_compare);
|
||||
if (cp) {
|
||||
charstring_byte(cp->one);
|
||||
if (cp->two >= 0)
|
||||
charstring_byte(cp->two);
|
||||
} else {
|
||||
fprintf(stderr, "error: cannot use `%s' in charstring\n", cp->name);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
charstring_end();
|
||||
}
|
||||
|
||||
static void usage()
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: t1asm [-b] [-l block-length] [input [output]]\n");
|
||||
fprintf(stderr,
|
||||
"\n-b means output in PFB format, otherwise PFA format.\n");
|
||||
fprintf(stderr,
|
||||
"The block length applies to the length of blocks in the\n");
|
||||
fprintf(stderr,
|
||||
"PFB output file; the default is to use the largest possible.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *p, *q, *r;
|
||||
int c;
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
extern int getopt(int argc, char **argv, char *optstring);
|
||||
|
||||
fprintf(stderr, "%s", BANNER);
|
||||
|
||||
/* interpret command line arguments using getopt */
|
||||
while ((c = getopt(argc, argv, "bl:")) != -1)
|
||||
switch (c) {
|
||||
case 'b':
|
||||
pfb = 1;
|
||||
break;
|
||||
case 'l':
|
||||
blocklen = atoi(optarg);
|
||||
if (blocklen < MINBLOCKLEN) {
|
||||
blocklen = MINBLOCKLEN;
|
||||
fprintf(stderr,
|
||||
"warning: using minimum block length of %d\n",
|
||||
blocklen);
|
||||
} else if (blocklen > MAXBLOCKLEN) {
|
||||
blocklen = MAXBLOCKLEN;
|
||||
fprintf(stderr,
|
||||
"warning: using maximum block length of %d\n",
|
||||
blocklen);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
if (argc - optind > 2)
|
||||
usage();
|
||||
|
||||
/* possibly open input & output files */
|
||||
if (argc - optind >= 1) {
|
||||
ifp = fopen(argv[optind], "r");
|
||||
if (!ifp) {
|
||||
fprintf(stderr, "error: cannot open %s for reading\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if (argc - optind >= 2) {
|
||||
ofp = fopen(argv[optind + 1], WB);
|
||||
if (!ofp) {
|
||||
fprintf(stderr, "error: cannot open %s for writing\n", argv[2]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally, we loop until no more input. Some special things to look for
|
||||
are the `currentfile eexec' line, the beginning of the `/Subrs'
|
||||
definition, the definition of `/lenIV', and the definition of the
|
||||
charstring start command which has `...string currentfile...' in it. */
|
||||
|
||||
while (!feof(ifp) && !ferror(ifp)) {
|
||||
getline();
|
||||
if (strcmp(line, "currentfile eexec\n") == 0) {
|
||||
eexec_start();
|
||||
continue;
|
||||
} else if (strstr(line, "/Subrs") && isspace(line[6])) {
|
||||
active = 1;
|
||||
} else if ((p = strstr(line, "/lenIV"))) {
|
||||
sscanf(p, "%*s %d", &lenIV);
|
||||
} else if ((p = strstr(line, "string currentfile"))) {
|
||||
/* locate the name of the charstring start command */
|
||||
*p = '\0'; /* damage line[] */
|
||||
q = strrchr(line, '/');
|
||||
if (q) {
|
||||
r = cs_start;
|
||||
++q;
|
||||
while (!isspace(*q) && *q != '{')
|
||||
*r++ = *q++;
|
||||
*r = '\0';
|
||||
}
|
||||
*p = 's'; /* repair line[] */
|
||||
}
|
||||
/* output line data */
|
||||
eexec_string(line);
|
||||
if (start_charstring) {
|
||||
if (!cs_start[0]) {
|
||||
fprintf(stderr, "error: couldn't find charstring start command\n");
|
||||
exit(1);
|
||||
}
|
||||
parse_charstring();
|
||||
}
|
||||
}
|
||||
eexec_end();
|
||||
|
||||
fclose(ifp);
|
||||
fclose(ofp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
1725
contrib/ttf2pfb/ttf2pfb.c
Normal file
1725
contrib/ttf2pfb/ttf2pfb.c
Normal file
File diff suppressed because it is too large
Load Diff
8
contrib/ttf2pk/.cvsignore
Normal file
8
contrib/ttf2pk/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
||||
ttf2tfm
|
||||
ttf2pk
|
||||
.libs
|
||||
MakeSub
|
||||
config.status
|
||||
config.cache
|
||||
config.log
|
||||
Makefile
|
||||
3
contrib/ttf2pk/BUGS
Normal file
3
contrib/ttf2pk/BUGS
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
Some characters (Arial A) have a bounding box that extends outside the
|
||||
character width... such a character will get an italic correction.
|
||||
6
contrib/ttf2pk/MakeSub.in
Normal file
6
contrib/ttf2pk/MakeSub.in
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file is part of the ttf2pk package
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
71
contrib/ttf2pk/Makefile.dm
Normal file
71
contrib/ttf2pk/Makefile.dm
Normal file
@@ -0,0 +1,71 @@
|
||||
# Makefile for ttf2pk -- loyer@enst.fr, wl@gnu.org
|
||||
#
|
||||
# This Makefile assumes that you've already built and installed
|
||||
# the FreeType library.
|
||||
#
|
||||
# It builds the ttf2pk and ttf2tfm for emx-gcc.
|
||||
#
|
||||
# You will need dmake.
|
||||
#
|
||||
# Use this file while with the following statement:
|
||||
#
|
||||
# dmake -r -f Makefile.dm
|
||||
|
||||
|
||||
.IMPORT: COMSPEC
|
||||
SHELL := $(COMSPEC)
|
||||
SHELLFLAGS := /c
|
||||
GROUPSHELL := $(SHELL)
|
||||
GROUPFLAGS := $(SHELLFLAGS)
|
||||
GROUPSUFFIX := .bat
|
||||
SHELLMETAS := *"?<>&|
|
||||
|
||||
CC = gcc
|
||||
LIBDIR = ../../lib
|
||||
INCDIR = -I$(LIBDIR) -I.
|
||||
|
||||
# CFLAGS = -Wall -O2 -g $(INCDIR) -fbounds-checking -DHAVE_EMTEXDIR -DMSDOS
|
||||
CFLAGS = -Wall -O2 -s $(INCDIR) -DHAVE_EMTEXDIR -DMSDOS
|
||||
|
||||
SRC = case.c emdir.c emtexdir.c errormsg.c filesrch.c ligkern.c newobj.c \
|
||||
parse.c pklib.c subfont.c texenc.c tfmaux.c ttf2pk.c ttf2tfm.c \
|
||||
ttfaux.c ttfenc.c ttflib.c vplaux.c
|
||||
|
||||
ttf2pkobjs = emdir.o emtexdir.o errormsg.o filesrch.o ligkern.o newobj.o \
|
||||
parse.o pklib.o subfont.o texenc.o ttf2pk.o ttfenc.o ttflib.o
|
||||
ttf2tfmobjs = case.o emdir.o emtexdir.o errormsg.o filesrch.o ligkern.o \
|
||||
newobj.o parse.o subfont.o texenc.o tfmaux.o ttf2tfm.o \
|
||||
ttfaux.o ttfenc.o vplaux.o
|
||||
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
%.exe:
|
||||
$(CC) $(CFLAGS) -o $@ @$(mktmp $(&:t"\n")\n)
|
||||
|
||||
|
||||
PROGRAMS = ttf2pk.exe ttf2tfm.exe
|
||||
|
||||
.PHONY: all clean distclean
|
||||
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
ttf2pk.exe: $(ttf2pkobjs) $(LIBDIR)/libttf.a
|
||||
ttf2tfm.exe: $(ttf2tfmobjs) $(LIBDIR)/libttf.a
|
||||
|
||||
|
||||
clean:
|
||||
-[
|
||||
del *.o
|
||||
]
|
||||
|
||||
distclean: clean
|
||||
-[
|
||||
del dep.end
|
||||
del *.exe
|
||||
del core
|
||||
]
|
||||
|
||||
#end of Makefile.dm
|
||||
116
contrib/ttf2pk/Makefile.in
Normal file
116
contrib/ttf2pk/Makefile.in
Normal file
@@ -0,0 +1,116 @@
|
||||
# Makefile for ttf2pk -- loyer@enst.fr, wl@gnu.org
|
||||
#
|
||||
# This Makefile assumes that you've already built and installed
|
||||
# the FreeType library.
|
||||
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
RM = @RM@
|
||||
RMF = @RM@ -f
|
||||
RMDIR = @RMDIR@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
|
||||
LIBTOOL = ../../libtool
|
||||
MKINSTALLDIRS = $(srcdir)/../../mkinstalldirs
|
||||
|
||||
include MakeSub
|
||||
|
||||
CFLAGS = @CFLAGS@ @XX_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ @DEFS@
|
||||
FT_CFLAGS = $(CFLAGS) $(CPPFLAGS)
|
||||
LDFLAGS = @LDFLAGS@ @LIBS@
|
||||
LIBDIR = ../../lib
|
||||
|
||||
SRC = $(srcdir)/case.c \
|
||||
$(srcdir)/errormsg.c \
|
||||
$(srcdir)/filesrch.c \
|
||||
$(srcdir)/ligkern.c \
|
||||
$(srcdir)/newobj.c \
|
||||
$(srcdir)/parse.c \
|
||||
$(srcdir)/pklib.c \
|
||||
$(srcdir)/subfont.c \
|
||||
$(srcdir)/texenc.c \
|
||||
$(srcdir)/tfmaux.c \
|
||||
$(srcdir)/ttf2pk.c \
|
||||
$(srcdir)/ttf2tfm.c \
|
||||
$(srcdir)/ttfaux.c \
|
||||
$(srcdir)/ttfenc.c \
|
||||
$(srcdir)/ttflib.c \
|
||||
$(srcdir)/vplaux.c
|
||||
|
||||
ttf2pkobjs = errormsg.o filesrch.o ligkern.o newobj.o parse.o pklib.o \
|
||||
subfont.o texenc.o ttf2pk.o ttfenc.o ttflib.o
|
||||
ttf2tfmobjs = case.o errormsg.o filesrch.o ligkern.o newobj.o parse.o \
|
||||
subfont.o texenc.o tfmaux.o ttf2tfm.o ttfaux.o ttfenc.o \
|
||||
vplaux.o
|
||||
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(FT_CFLAGS) $<
|
||||
|
||||
|
||||
PROGRAMS = ttf2pk ttf2tfm
|
||||
|
||||
default all: $(PROGRAMS)
|
||||
|
||||
ttf2pk: $(ttf2pkobjs) $(LIBDIR)/libttf.la
|
||||
$(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o ttf2pk $(ttf2pkobjs) \
|
||||
$(LIBDIR)/libttf.la $(LDFLAGS)
|
||||
|
||||
ttf2tfm: $(ttf2tfmobjs) $(LIBDIR)/libttf.la
|
||||
$(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o ttf2tfm $(ttf2tfmobjs) \
|
||||
$(LIBDIR)/libttf.la $(LDFLAGS)
|
||||
|
||||
install: $(PROGRAMS)
|
||||
$(MKINSTALLDIRS) $(bindir) $(mandir)/man1
|
||||
for P in $(PROGRAMS) ; do \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$P $(bindir)/$$P ; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$P.1 $(mandir)/man1 ; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
-for P in $(PROGRAMS) ; do \
|
||||
$(LIBTOOL) --mode=uninstall $(RM) $(bindir)/$$P ; \
|
||||
$(RMF) $(mandir)/man1/$$P.1 ; \
|
||||
done
|
||||
|
||||
clean: do_clean
|
||||
|
||||
distclean: do_clean
|
||||
-$(RMF) dep.end $(PROGRAMS)
|
||||
-$(RMF) *~ *.orig core *.core
|
||||
-$(RMF) config.cache config.log config.status Makefile MakeSub
|
||||
-$(RMF) .libs/*
|
||||
-$(RMDIR) .libs
|
||||
|
||||
do_clean:
|
||||
-$(RMF) *.o
|
||||
|
||||
|
||||
depend:
|
||||
(echo '/^#.* PUT NO STUFF BELOW/,$$d' ; echo w ; echo q) | \
|
||||
ed - Makefile
|
||||
echo '# Dependencies generated by make depend: PUT NO STUFF BELOW' \
|
||||
>> Makefile
|
||||
for file in $(SRC) ; do \
|
||||
$(CPP) $(CPPFLAGS) $$file | \
|
||||
sed -n -e 's|^# [1-9][0-9]* "\([^/].*\.h\)".*|\1|p' \
|
||||
-e 's|^# [1-9][0-9]* "\($(srcdir)/.*\.h\)".*|\1|p' | \
|
||||
sed -e 's|/\./|.|g' -e "s/^/`basename $$file .c`.o: /" ; \
|
||||
done | \
|
||||
sort -u | \
|
||||
awk '{ if (LINE == 1) \
|
||||
{ line = last = $$1 } \
|
||||
else if ($$1 != last) \
|
||||
{ print line ; line = last = $$1 } \
|
||||
line = line " " $$2 } \
|
||||
END { print line }' >> Makefile
|
||||
|
||||
# Dependencies generated by make depend: PUT NO STUFF BELOW
|
||||
104
contrib/ttf2pk/README
Normal file
104
contrib/ttf2pk/README
Normal file
@@ -0,0 +1,104 @@
|
||||
This directory contains ttf2tfm and ttf2pk, two utilities based on
|
||||
|
||||
afm2tfm (dvipsk distribution),
|
||||
gsftopkk (dvipsk distribution),
|
||||
and the FreeType rasterizer for TrueType fonts.
|
||||
|
||||
|
||||
Compile the FreeType library first! It is recommended to use the kpathsea
|
||||
library if you want to use the programs with web2c resp. teTeX. Source files
|
||||
for emTeX-like search routines are included; similarly, support for MiKTeX
|
||||
file searching routines is available if `MIKTEX' is defined during
|
||||
compilation. Nevertheless, as a last resort, you can compile both programs
|
||||
without a search library too.
|
||||
|
||||
The kpathsea library is *not* part of the ttf2pk package (see notes below).
|
||||
|
||||
|
||||
|
||||
Under UNIX-like systems say
|
||||
|
||||
./configure --prefix=/usr/local/TeX --with-kpathsea-dir=<DIR>
|
||||
make
|
||||
make install
|
||||
|
||||
for a normal compilation and installation. Replace `/usr/local/TeX' with a
|
||||
path to your TeX distribution.
|
||||
|
||||
|
||||
[Note 1:
|
||||
Try to find `libkpathsea.*' on your system. Use the directory above this
|
||||
one as the argument for --with-kpathsea-dir. This should work in most
|
||||
cases. If you can't find the library, you probably have a web2c package
|
||||
with statically linked binaries. This means that you have to get the web2c
|
||||
sources from CTAN, configure it with something like
|
||||
|
||||
./configure --prefix=/usr/local/TeX --datadir=/usr/local/TeX \
|
||||
--enable-shared --disable-static
|
||||
|
||||
according to your setup; then change to the kpathsea directory and say
|
||||
`make' and `make install' (Do the latter with caution not to overwrite
|
||||
binaries like kpsewhich).
|
||||
|
||||
It even works with the source tree from the TeX Live CD 3! You just have
|
||||
to add a proper --srcdir option to the configure script.
|
||||
|
||||
Unfortunately, teTeX-0.4 uses a very old kpathsea library version without
|
||||
automatical shared-library support, thus you have to install the static
|
||||
libraries:
|
||||
|
||||
.) unpack the sources (basically you need only the contents of kpse-2.6
|
||||
and the two subdirs `kpathsea' and `make'.
|
||||
|
||||
.) say
|
||||
|
||||
./configure --prefix=...
|
||||
make
|
||||
|
||||
in the kpse-2.6 directory
|
||||
|
||||
.) say
|
||||
|
||||
make install-library
|
||||
|
||||
in the kpathsea subdirectory. See Note 2 also.
|
||||
|
||||
DON'T USE A NEWER KPATHSEA VERSION IF YOU USE teTeX 0.4 BINARIES! Newer
|
||||
kpathsea versions are not compatible with version 2.6.
|
||||
|
||||
Note 2:
|
||||
It seems that c-auto.h created during the kpathsea library compiling
|
||||
process won't be installed for some older web2c versions. You should add
|
||||
it manually, i.e., copy <web2c source tree>/kpathsea/c-auto.h to the
|
||||
location where the other kpathsea header files have been installed.
|
||||
|
||||
Note 3:
|
||||
If you want to use the --srcdir option of the configure script, you must
|
||||
compile FreeType with --srcdir too. You have to use the same directory
|
||||
structure to make it work (i.e., if you have said for FreeType
|
||||
`./configure --srcdir=foo', and you are in the `bar' directory, FreeType's
|
||||
configure script will generate all the needed subdirs for compiling
|
||||
FreeType. You've then manually to add the directory `bar/contrib/ttf2pk';
|
||||
there you should start to say ./configure --srcdir=foo/contrib/ttf2pk').]
|
||||
|
||||
|
||||
|
||||
Use Makefile.dm for emx + dmake and say
|
||||
|
||||
dmake -r -f Makefile.dm
|
||||
|
||||
[Note: It should work with djgpp too, but I haven't tested this.]
|
||||
|
||||
|
||||
ttf2pk and ttf2tfm are already part of MiKTeX.
|
||||
|
||||
|
||||
|
||||
Primary author of afm2tfm: T. Rokicki,
|
||||
Primary author of gsftopk: P.Vojta
|
||||
Primary author of the kpathsea library,
|
||||
afm2tfm/gsftopk adaptation: K. Berry.
|
||||
|
||||
--
|
||||
Frederic Loyer <loyer@ensta.fr>
|
||||
Werner Lemberg <wl@gnu.org>
|
||||
22
contrib/ttf2pk/TODO
Normal file
22
contrib/ttf2pk/TODO
Normal file
@@ -0,0 +1,22 @@
|
||||
. multiple configuration files similar to newer versions of gsftopk(k).
|
||||
|
||||
. support for different horizontal and vertical resolutions.
|
||||
|
||||
. character composition via the vpl file.
|
||||
|
||||
. using GSUB for accessing small caps (if available).
|
||||
|
||||
. enabling -v and -V at the same time.
|
||||
|
||||
. Omega support
|
||||
|
||||
. afm output
|
||||
|
||||
. possibility to create `real' fonts, i.e., avoiding virtual fonts for small
|
||||
caps etc. -- some dvi previewers still can't handle virtual fonts. Due to
|
||||
the huge amount of work to support this it is rather unlikely that I'll do
|
||||
it.
|
||||
|
||||
. using hash tables to store glyph names for better performance
|
||||
|
||||
. show replacement glyphs too in glyph listings
|
||||
23
contrib/ttf2pk/c-auto.h
Normal file
23
contrib/ttf2pk/c-auto.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* c-auto.h
|
||||
*
|
||||
* This file is part of the ttf2pk package.
|
||||
*
|
||||
* Copyright 1997-1999 by
|
||||
* Frederic Loyer <loyer@ensta.fr>
|
||||
* Werner Lemberg <wl@gnu.org>
|
||||
*/
|
||||
|
||||
#ifndef C_AUTO_H
|
||||
#define C_AUTO_H
|
||||
|
||||
/*
|
||||
* We need to get kpathsea's configuration file.
|
||||
*/
|
||||
|
||||
#include "kpathsea/c-auto.h"
|
||||
|
||||
#endif /* C_AUTO_H */
|
||||
|
||||
|
||||
/* end */
|
||||
179
contrib/ttf2pk/case.c
Normal file
179
contrib/ttf2pk/case.c
Normal file
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* case.c
|
||||
*
|
||||
* This file is part of the ttf2pk package.
|
||||
*
|
||||
* Copyright 1997-1999 by
|
||||
* Frederic Loyer <loyer@ensta.fr>
|
||||
* Werner Lemberg <wl@gnu.org>
|
||||
*/
|
||||
|
||||
#include <stdlib.h> /* for definition of NULL */
|
||||
|
||||
#include "case.h"
|
||||
|
||||
|
||||
/* This is a table of uppercase/lowercase pairs which can't be deduced */
|
||||
/* by lowercasing the uppercase Adobe glyph name. */
|
||||
/* It has been extracted from the ucs2ps.um database compiled by */
|
||||
/* Bjorn Brox <brox@corena.no>. */
|
||||
|
||||
Case casetable[] =
|
||||
{
|
||||
{"afii10017", "afii10065"},
|
||||
{"afii10018", "afii10066"},
|
||||
{"afii10019", "afii10067"},
|
||||
{"afii10020", "afii10068"},
|
||||
{"afii10021", "afii10069"},
|
||||
{"afii10022", "afii10070"},
|
||||
{"afii10023", "afii10071"},
|
||||
{"afii10024", "afii10072"},
|
||||
{"afii10025", "afii10073"},
|
||||
{"afii10026", "afii10074"},
|
||||
{"afii10027", "afii10075"},
|
||||
{"afii10028", "afii10076"},
|
||||
{"afii10029", "afii10077"},
|
||||
{"afii10030", "afii10078"},
|
||||
{"afii10031", "afii10079"},
|
||||
{"afii10032", "afii10080"},
|
||||
{"afii10033", "afii10081"},
|
||||
{"afii10034", "afii10082"},
|
||||
{"afii10035", "afii10083"},
|
||||
{"afii10036", "afii10084"},
|
||||
{"afii10037", "afii10085"},
|
||||
{"afii10038", "afii10086"},
|
||||
{"afii10039", "afii10087"},
|
||||
{"afii10040", "afii10088"},
|
||||
{"afii10041", "afii10089"},
|
||||
{"afii10042", "afii10090"},
|
||||
{"afii10043", "afii10091"},
|
||||
{"afii10044", "afii10092"},
|
||||
{"afii10045", "afii10093"},
|
||||
{"afii10046", "afii10094"},
|
||||
{"afii10047", "afii10095"},
|
||||
{"afii10048", "afii10096"},
|
||||
{"afii10049", "afii10097"},
|
||||
{"afii10050", "afii10098"},
|
||||
{"afii10051", "afii10099"},
|
||||
{"afii10052", "afii10100"},
|
||||
{"afii10053", "afii10101"},
|
||||
{"afii10054", "afii10102"},
|
||||
{"afii10055", "afii10103"},
|
||||
{"afii10056", "afii10104"},
|
||||
{"afii10057", "afii10105"},
|
||||
{"afii10058", "afii10106"},
|
||||
{"afii10059", "afii10107"},
|
||||
{"afii10060", "afii10108"},
|
||||
{"afii10061", "afii10109"},
|
||||
{"afii10062", "afii10110"},
|
||||
{"afii10145", "afii10193"},
|
||||
{"afii10146", "afii10194"},
|
||||
{"afii10147", "afii10195"},
|
||||
{"afii10148", "afii10196"},
|
||||
{"afii10149", "afii10197"},
|
||||
{"afii10152", "afii10200"},
|
||||
{"afii10202", "afii10154"},
|
||||
{"afii10155", "afii10203"},
|
||||
{"afii10156", "afii10204"},
|
||||
{"afii10157", "afii10205"},
|
||||
{"afii10158", "afii10206"},
|
||||
{"afii10160", "afii10208"},
|
||||
{"afii10161", "afii10209"},
|
||||
{"afii10162", "afii10210"},
|
||||
{"afii10163", "afii10211"},
|
||||
{"afii10164", "afii10212"},
|
||||
{"afii10166", "afii10214"},
|
||||
{"afii10167", "afii10215"},
|
||||
{"afii10168", "afii10216"},
|
||||
{"afii10170", "afii10218"},
|
||||
{"afii10171", "afii10219"},
|
||||
{"afii10172", "afii10220"},
|
||||
{"afii10173", "afii10221"},
|
||||
{"afii10174", "afii10222"},
|
||||
{"afii10176", "afii10224"},
|
||||
{"afii10178", "afii10226"},
|
||||
{"afii10179", "afii10227"},
|
||||
{"afii10181", "afii10229"},
|
||||
{"afii10182", "afii10230"},
|
||||
{"afii10184", "afii10232"},
|
||||
{"afii10185", "afii10233"},
|
||||
{"afii10187", "afii10235"},
|
||||
{"afii10188", "afii10236"},
|
||||
{"afii10190", "afii10238"},
|
||||
{"afii10785", "afii10833"},
|
||||
{"afii10786", "afii10834"},
|
||||
{"afii10787", "afii10835"},
|
||||
{"afii10795", "afii10843"},
|
||||
{"afii10798", "afii10846"},
|
||||
{"afii10799", "afii10847"},
|
||||
{"afii10800", "afii10848"},
|
||||
{"afii10801", "afii10849"},
|
||||
{"afii64308", "afii64436"},
|
||||
{"afii10803", "afii10851"},
|
||||
{"afii10808", "afii10856"},
|
||||
{"afii10809", "afii10857"},
|
||||
{"afii10810", "afii10858"},
|
||||
{"afii10811", "afii10859"},
|
||||
{"afii10817", "afii10865"},
|
||||
{"afii10818", "afii10866"},
|
||||
{"afii10819", "afii10867"},
|
||||
{"afii10822", "afii10870"},
|
||||
{"afii10827", "afii10875"},
|
||||
{"afii10914", "afii10962"},
|
||||
{"afii10920", "afii10968"},
|
||||
{"afii10924", "afii10972"},
|
||||
{"afii10927", "afii10975"},
|
||||
{"afii10929", "afii10977"},
|
||||
{"afii10930", "afii10978"},
|
||||
{"afii10931", "afii10979"},
|
||||
{"afii10932", "afii10980"},
|
||||
{"afii10934", "afii10982"},
|
||||
{"afii10943", "afii10991"},
|
||||
{"afii10944", "afii10992"},
|
||||
{"afii10951", "afii10967"},
|
||||
/*{? "ash"} */
|
||||
{"Beta", "beta1"},
|
||||
{"Bhook", "bhooktop"},
|
||||
{"Chook", "chooktop"},
|
||||
/*{"Oopen" "cturn" ?} */
|
||||
{"Dbar1", "dbar"},
|
||||
{"Dhook", "dhooktop"},
|
||||
{"Dmacron", "dmacron3"},
|
||||
{"Dslash", "dmacron"},
|
||||
{"I", "dotlessi"},
|
||||
{"J", "dotlessj"},
|
||||
/*{"Dbar", "drighttail" ?} */
|
||||
/*{"Dbar" "drthook" ?} */
|
||||
/*{"Dslash", ?} */
|
||||
{"Fhook", "fscript"},
|
||||
{"Ghook", "ghooktop"},
|
||||
{"Ibar", "ibarred"},
|
||||
{"I", "iundotted"},
|
||||
{"Kappa", "kappa1"},
|
||||
{"Khook", "khooktop"},
|
||||
{"S", "longs"},
|
||||
{"mcapturn", "mturn"},
|
||||
{"mcapturn", "mturned"},
|
||||
{"Mu", "mu1"},
|
||||
{"Nhook", "nlefthookatleft"},
|
||||
{"Nhook", "nlftlfthook"},
|
||||
{"Obar", "obarred"},
|
||||
{"Pi", "omega1"},
|
||||
{"Phi", "phi1"},
|
||||
{"Phi", "philatin"},
|
||||
{"Pi", "pi1"},
|
||||
{"Rho", "rho1"},
|
||||
{"Sigma", "sigma1"},
|
||||
{"Sigma", "sigmafinal"},
|
||||
{"Sigma", "sigmalunate"},
|
||||
{"S", "slong"},
|
||||
{"Theta", "theta1"},
|
||||
{"Thook", "thooktop"},
|
||||
{"Trthook", "trighttail"},
|
||||
{"Upsilon2", "upsilon"},
|
||||
{"Vcursive", "vscript"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
/* end */
|
||||
27
contrib/ttf2pk/case.h
Normal file
27
contrib/ttf2pk/case.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* case.h
|
||||
*
|
||||
* This file is part of the ttf2pk package.
|
||||
*
|
||||
* Copyright 1997-1999 by
|
||||
* Frederic Loyer <loyer@ensta.fr>
|
||||
* Werner Lemberg <wl@gnu.org>
|
||||
*/
|
||||
|
||||
#ifndef CASE_H
|
||||
#define CASE_H
|
||||
|
||||
struct _Case
|
||||
{
|
||||
char *upper;
|
||||
char *lower;
|
||||
};
|
||||
typedef struct _Case Case;
|
||||
|
||||
|
||||
extern Case casetable[];
|
||||
|
||||
#endif /* CASE_H */
|
||||
|
||||
|
||||
/* end */
|
||||
1700
contrib/ttf2pk/configure
vendored
Normal file
1700
contrib/ttf2pk/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
87
contrib/ttf2pk/configure.in
Normal file
87
contrib/ttf2pk/configure.in
Normal file
@@ -0,0 +1,87 @@
|
||||
dnl This file is part of the ttf2pk package
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Some tests are omitted since we assume that you've built the
|
||||
dnl FreeType library successfully.
|
||||
|
||||
AC_INIT(../../lib/freetype.h)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
|
||||
AC_ARG_WITH(kpathsea-dir,
|
||||
[ --with-kpathsea-dir=DIR Location of the kpathsea base dir (/usr/local)],[
|
||||
if test x$withval = xyes; then
|
||||
AC_MSG_WARN(Usage is: --with-kpathsea-dir=basedir)
|
||||
else
|
||||
if test x$withval = xno; then
|
||||
AC_MSG_WARN(Usage is: --with-kpathsea-dir=basedir)
|
||||
else
|
||||
kpathsea_dir=$withval
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
if test -n "$kpathsea_dir"; then
|
||||
LIBS="$LIBS -L$kpathsea_dir/lib"
|
||||
CPPFLAGS="$CPPFLAGS -I$kpathsea_dir/include -I$srcdir"
|
||||
|
||||
dnl the function kpse_set_program_name() is available since kpathsea 3.2
|
||||
AC_CHECK_LIB(kpathsea, kpse_set_program_name, [[]], AC_DEFINE(OLD_KPATHSEA))
|
||||
|
||||
AC_CHECK_LIB(kpathsea, kpse_init_prog, ,[
|
||||
AC_MSG_ERROR([Can't find kpathsea library! Use --with-kpathsea-dir option.])])
|
||||
|
||||
dnl the header file kpathsea.h doesn't exist in kpathsea 2.6 and before
|
||||
AC_CHECK_HEADER(kpathsea/kpathsea.h, [[]], AC_DEFINE(VERY_OLD_KPATHSEA))
|
||||
|
||||
AC_CHECK_HEADER(kpathsea/c-auto.h, ,[
|
||||
AC_MSG_ERROR([Can't find kpathsea include files! Use --with-kpathsea-dir option.])])
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS -I$srcdir"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(m, floor)
|
||||
AC_CHECK_LIB(intl, gettext)
|
||||
|
||||
OLDLIBS=$LIBS
|
||||
LIBS="$LIBS -L../../lib/.libs"
|
||||
CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS"
|
||||
AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[
|
||||
AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])])
|
||||
LIBS=$OLDLIBS
|
||||
|
||||
dnl get Compiler flags right.
|
||||
|
||||
if test "x$CC" = xgcc; then
|
||||
XX_CFLAGS="-Wall -pedantic"
|
||||
else
|
||||
case "$host" in
|
||||
alpha-dec-osf*)
|
||||
XX_CFLAGS="-std1 -O2 -g3"
|
||||
;;
|
||||
*)
|
||||
XX_CFLAGS=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(XX_CFLAGS)
|
||||
|
||||
AC_CHECK_PROG(RM, rm, rm)
|
||||
AC_CHECK_PROG(RMDIR, rmdir, rmdir)
|
||||
AC_PROG_INSTALL
|
||||
|
||||
if test -z "$kpathsea_dir"; then
|
||||
AC_MSG_WARN([
|
||||
|
||||
The binaries will be compiled without file search library support!
|
||||
For kpathsea support use the --with-kpathsea-dir option.
|
||||
])
|
||||
fi
|
||||
|
||||
AC_OUTPUT(Makefile MakeSub)
|
||||
|
||||
dnl end of configure.in
|
||||
65
contrib/ttf2pk/data/Big5.sfd
Normal file
65
contrib/ttf2pk/data/Big5.sfd
Normal file
@@ -0,0 +1,65 @@
|
||||
# Big5.sfd
|
||||
#
|
||||
# subfont numbers for Big 5 encoding and its corresponding code ranges
|
||||
# to be used with the CJK package for LaTeX.
|
||||
|
||||
01 0xA140_0xA17E 0xA1A1_0xA1FE 0xA240_0xA27E 0xA2A1_0xA2C4
|
||||
02 0xA2C5_0xA2FE 0xA340_0xA37E 0xA3A1_0xA3FE 0xA440_0xA468
|
||||
03 0xA469_0xA47E 0xA4A1_0xA4FE 0xA540_0xA57E 0xA5A1_0xA5ED
|
||||
04 0xA5EE_0xA5FE 0xA640_0xA67E 0xA6A1_0xA6FE 0xA740_0xA77E 0xA7A1_0xA7B3
|
||||
05 0xA7B4_0xA7FE 0xA840_0xA87E 0xA8A1_0xA8FE 0xA940_0xA957
|
||||
06 0xA958_0xA97E 0xA9A1_0xA9FE 0xAA40_0xAA7E 0xAAA1_0xAADC
|
||||
07 0xAADD_0xAAFE 0xAB40_0xAB7E 0xABA1_0xABFE 0xAC40_0xAC7E 0xACA1_0xACA2
|
||||
08 0xACA3_0xACFE 0xAD40_0xAD7E 0xADA1_0xADFE 0xAE40_0xAE46
|
||||
09 0xAE47_0xAE7E 0xAEA1_0xAEFE 0xAF40_0xAF7E 0xAFA1_0xAFCB
|
||||
10 0xAFCC_0xAFFE 0xB040_0xB07E 0xB0A1_0xB0FE 0xB140_0xB16F
|
||||
11 0xB170_0xB17E 0xB1A1_0xB1FE 0xB240_0xB27E 0xB2A1_0xB2F4
|
||||
12 0xB2F5_0xB2FE 0xB340_0xB37E 0xB3A1_0xB3FE 0xB440_0xB47E 0xB4A1_0xB4BA
|
||||
13 0xB4BB_0xB4FE 0xB540_0xB57E 0xB5A1_0xB5FE 0xB640_0xB65E
|
||||
14 0xB65F_0xB67E 0xB6A1_0xB6FE 0xB740_0xB77E 0xB7A1_0xB7E3
|
||||
15 0xB7E4_0xB7FE 0xB840_0xB87E 0xB8A1_0xB8FE 0xB940_0xB97E 0xB9A1_0xB9A9
|
||||
16 0xB9AA_0xB9FE 0xBA40_0xBA7E 0xBAA1_0xBAFE 0xBB40_0xBB4D
|
||||
17 0xBB4E_0xBB7E 0xBBA1_0xBBFE 0xBC40_0xBC7E 0xBCA1_0xBCD2
|
||||
18 0xBCD3_0xBCFE 0xBD40_0xBD7E 0xBDA1_0xBDFE 0xBE40_0xBE76
|
||||
19 0xBE77_0xBE7E 0xBEA1_0xBEFE 0xBF40_0xBF7E 0xBFA1_0xBFFB
|
||||
20 0xBFFC_0xBFFE 0xC040_0xC07E 0xC0A1_0xC0FE 0xC140_0xC17E 0xC1A1_0xC1C1
|
||||
21 0xC1C2_0xC1FE 0xC240_0xC27E 0xC2A1_0xC2FE 0xC340_0xC365
|
||||
22 0xC366_0xC37E 0xC3A1_0xC3FE 0xC440_0xC47E 0xC4A1_0xC4EA
|
||||
23 0xC4EB_0xC4FE 0xC540_0xC57E 0xC5A1_0xC5FE 0xC640_0xC67E 0xC6A1_0xC6B0
|
||||
24 0xC6B1_0xC6FE 0xC740_0xC77E 0xC7A1_0xC7FE 0xC840_0xC854
|
||||
25 0xC855_0xC87E 0xC8A1_0xC8FE 0xC940_0xC97E 0xC9A1_0xC9D9
|
||||
26 0xC9DA_0xC9FE 0xCA40_0xCA7E 0xCAA1_0xCAFE 0xCB40_0xCB7D
|
||||
27 0xCB7E 0xCBA1_0xCBFE 0xCC40_0xCC7E 0xCCA1_0xCCFE 0xCD40_0xCD43
|
||||
28 0xCD44_0xCD7E 0xCDA1_0xCDFE 0xCE40_0xCE7E 0xCEA1_0xCEC8
|
||||
29 0xCEC9_0xCEFE 0xCF40_0xCF7E 0xCFA1_0xCFFE 0xD040_0xD06C
|
||||
30 0xD06D_0xD07E 0xD0A1_0xD0FE 0xD140_0xD17E 0xD1A1_0xD1F1
|
||||
31 0xD1F2_0xD1FE 0xD240_0xD27E 0xD2A1_0xD2FE 0xD340_0xD37E 0xD3A1_0xD3B7
|
||||
32 0xD3B8_0xD3FE 0xD440_0xD47E 0xD4A1_0xD4FE 0xD540_0xD55B
|
||||
33 0xD55C_0xD57E 0xD5A1_0xD5FE 0xD640_0xD67E 0xD6A1_0xD6E0
|
||||
34 0xD6E1_0xD6FE 0xD740_0xD77E 0xD7A1_0xD7FE 0xD840_0xD87E 0xD8A1_0xD8A6
|
||||
35 0xD8A7_0xD8FE 0xD940_0xD97E 0xD9A1_0xD9FE 0xDA40_0xDA4A
|
||||
36 0xDA4B_0xDA7E 0xDAA1_0xDAFE 0xDB40_0xDB7E 0xDBA1_0xDBCF
|
||||
37 0xDBD0_0xDBFE 0xDC40_0xDC7E 0xDCA1_0xDCFE 0xDD40_0xDD73
|
||||
38 0xDD74_0xDD7E 0xDDA1_0xDDFE 0xDE40_0xDE7E 0xDEA1_0xDEF8
|
||||
39 0xDEF9_0xDEFE 0xDF40_0xDF7E 0xDFA1_0xDFFE 0xE040_0xE07E 0xE0A1_0xE0BE
|
||||
40 0xE0BF_0xE0FE 0xE140_0xE17E 0xE1A1_0xE1FE 0xE240_0xE262
|
||||
41 0xE263_0xE27E 0xE2A1_0xE2FE 0xE340_0xE37E 0xE3A1_0xE3E7
|
||||
42 0xE3E8_0xE3FE 0xE440_0xE47E 0xE4A1_0xE4FE 0xE540_0xE57E 0xE5A1_0xE5AD
|
||||
43 0xE5AE_0xE5FE 0xE640_0xE67E 0xE6A1_0xE6FE 0xE740_0xE751
|
||||
44 0xE752_0xE77E 0xE7A1_0xE7FE 0xE840_0xE87E 0xE8A1_0xE8D6
|
||||
45 0xE8D7_0xE8FE 0xE940_0xE97E 0xE9A1_0xE9FE 0xEA40_0xEA7A
|
||||
46 0xEA7B_0xEA7E 0xEAA1_0xEAFE 0xEB40_0xEB7E 0xEBA1_0xEBFE 0xEC40
|
||||
47 0xEC41_0xEC7E 0xECA1_0xECFE 0xED40_0xED7E 0xEDA1_0xEDC5
|
||||
48 0xEDC6_0xEDFE 0xEE40_0xEE7E 0xEEA1_0xEEFE 0xEF40_0xEF69
|
||||
49 0xEF6A_0xEF7E 0xEFA1_0xEFFE 0xF040_0xF07E 0xF0A1_0xF0EE
|
||||
50 0xF0EF_0xF0FE 0xF140_0xF17E 0xF1A1_0xF1FE 0xF240_0xF27E 0xF2A1_0xF2B4
|
||||
51 0xF2B5_0xF2FE 0xF340_0xF37E 0xF3A1_0xF3FE 0xF440_0xF458
|
||||
52 0xF459_0xF47E 0xF4A1_0xF4FE 0xF540_0xF57E 0xF5A1_0xF5DD
|
||||
53 0xF5DE_0xF5FE 0xF640_0xF67E 0xF6A1_0xF6FE 0xF740_0xF77E 0xF7A1_0xF7A3
|
||||
54 0xF7A4_0xF7FE 0xF840_0xF87E 0xF8A1_0xF8FE 0xF940_0xF947
|
||||
55 0xF948_0xF97E 0xF9A1_0xF9FE 0xFA40_0xFA7E 0xFAA1_0xFACC
|
||||
56 0xFACD_0xFAFE 0xFB40_0xFB7E 0xFBA1_0xFBFE 0xFC40_0xFC70
|
||||
57 0xFC71_0xFC7E 0xFCA1_0xFCFE 0xFD40_0xFD7E 0xFDA1_0xFDF5
|
||||
58 0xFDF6_0xFDFE 0xFE40_0xFE7E 0xFEA1_0xFEFE
|
||||
|
||||
# eof
|
||||
119
contrib/ttf2pk/data/ET5.enc
Normal file
119
contrib/ttf2pk/data/ET5.enc
Normal file
@@ -0,0 +1,119 @@
|
||||
% ET5.enc
|
||||
%
|
||||
%
|
||||
% This is LaTeX ET5 encoding for Vietnamese.
|
||||
%
|
||||
%
|
||||
% LIGKERN question quoteleft =: questiondown ;
|
||||
% LIGKERN exclam quoteleft =: exclamdown ;
|
||||
% LIGKERN hyphen hyphen =: endash ;
|
||||
% LIGKERN endash hyphen =: emdash ;
|
||||
% LIGKERN quoteleft quoteleft =: quotedblleft ;
|
||||
% LIGKERN quoteright quoteright =: quotedblright ;
|
||||
% LIGKERN comma comma =: quotedblbase ;
|
||||
%
|
||||
% LIGKERN f i =: fi ;
|
||||
% LIGKERN f l =: fl ;
|
||||
% LIGKERN f f =: ff ;
|
||||
% LIGKERN ff i =: ffi ;
|
||||
% LIGKERN ff l =: ffl ;
|
||||
%
|
||||
% We blow away kerns to and from spaces (TeX doesn't have a
|
||||
% space) and also remove any kerns from the numbers.
|
||||
%
|
||||
% LIGKERN space {} * ; * {} space ;
|
||||
% LIGKERN zero {} * ; * {} zero ;
|
||||
% LIGKERN one {} * ; * {} one ;
|
||||
% LIGKERN two {} * ; * {} two ;
|
||||
% LIGKERN three {} * ; * {} three ;
|
||||
% LIGKERN four {} * ; * {} four ;
|
||||
% LIGKERN five {} * ; * {} five ;
|
||||
% LIGKERN six {} * ; * {} six ;
|
||||
% LIGKERN seven {} * ; * {} seven ;
|
||||
% LIGKERN eight {} * ; * {} eight ;
|
||||
% LIGKERN nine {} * ; * {} nine ;
|
||||
|
||||
/ET5encoding [
|
||||
% 0x00
|
||||
/Abrevehookabove /Abrevetilde /Acircumflextilde /Yhookabove
|
||||
/Ytilde /Ydotbelow /Sigma /Upsilon
|
||||
/Phi /Psi /Omega /ff
|
||||
/fi /fl /ffi /ffl
|
||||
% 0x10
|
||||
/dotlessi /dotlessj /grave /acute
|
||||
/caron /breve /macron /ring
|
||||
/cedilla /germandbls /ae /oe
|
||||
/oslash /AE /OE /Oslash
|
||||
% 0x20
|
||||
/.notdef /exclam /quotedblright /numbersign
|
||||
/dollar /percent /ampersand /quoteright
|
||||
/parenleft /parenright /asterisk /plus
|
||||
/comma /hyphen /period /slash
|
||||
% 0x30
|
||||
/zero /one /two /three
|
||||
/four /five /six /seven
|
||||
/eight /nine /colon /semicolon
|
||||
/exclamdown /equal /questiondown /question
|
||||
% 0x40
|
||||
/at /A /B /C
|
||||
/D /E /F /G
|
||||
/H /I /J /K
|
||||
/L /M /N /O
|
||||
% 0x50
|
||||
/P /Q /R /S
|
||||
/T /U /V /W
|
||||
/X /Y /Z /bracketleft
|
||||
/quotedblleft /bracketright /circumflex /dotaccent
|
||||
% 0x60
|
||||
/quoteleft /a /b /c
|
||||
/d /e /f /g
|
||||
/h /i /j /k
|
||||
/l /m /n /o
|
||||
% 0x70
|
||||
/p /q /r /s
|
||||
/t /u /v /w
|
||||
/x /y /z /endash
|
||||
/emdash /hungarumlaut /tilde /dieresis
|
||||
% 0x80
|
||||
/Adotbelow /Abreveacute /Abrevegrave /Abrevedotbelow
|
||||
/Acircumflexacute /Acircumflexgrave /Acircumflexhookabove /Acircumflexdotbelow
|
||||
/Etilde /Edotbelow /Ecircumflexacute /Ecircumflexgrave
|
||||
/Ecircumflexhookabove /Ecircumflextilde /Ecircumflexdotbelow /Ocircumflexacute
|
||||
% 0x90
|
||||
/Ocircumflexgrave /Ocircumflexhookabove /Ocircumflextilde /Ocircumflexdotbelow
|
||||
/Ohorndotbelow /Ohornacute /Ohorngrave /Ohornhookabove
|
||||
/Idotbelow /Ohookabove /Odotbelow /Ihookabove
|
||||
/Uhookabove /Utilde /Udotbelow /Ygrave
|
||||
% 0xA0
|
||||
/Otilde /abreveacute /abrevegrave /abrevedotbelow
|
||||
/acircumflexacute /acircumflexgrave /acircumflexhookabove /acircumflexdotbelow
|
||||
/etilde /edotbelow /ecircumflexacute /ecircumflexgrave
|
||||
/ecircumflexhookabove /ecircumflextilde /ecircumflexdotbelow /ocircumflexacute
|
||||
% 0xB0
|
||||
/ocircumflexgrave /ocircumflexhookabove /ocircumflextilde /Ohorntilde
|
||||
/Ohorn /ocircumflexdotbelow /ohorngrave /ohornhookabove
|
||||
/idotbelow /Uhorndotbelow /Uhornacute /Uhorngrave
|
||||
/Uhornhookabove /ohorn /ohornacute /Uhorn
|
||||
% 0xC0
|
||||
/Agrave /Aacute /Acircumflex /Atilde
|
||||
/Ahookabove /Abreve /abrevehookabove /abrevetilde
|
||||
/Egrave /Eacute /Ecircumflex /Ehookabove
|
||||
/Igrave /Iacute /Itilde /ygrave
|
||||
% 0xD0
|
||||
/Dbar /uhornacute /Ograve /Oacute
|
||||
/Ocircumflex /adotbelow /yhookabove /uhorngrave
|
||||
/uhornhookabove /Ugrave /Uacute /ytilde
|
||||
/ydotbelow /Yacute /ohorntilde /uhorn
|
||||
% 0xE0
|
||||
/agrave /aacute /acircumflex /atilde
|
||||
/ahookabove /abreve /uhorntilde /acircumflextilde
|
||||
/egrave /eacute /ecircumflex /ehookabove
|
||||
/igrave /iacute /itilde /ihookabove
|
||||
% 0xF0
|
||||
/dbar /uhorndotbelow /ograve /oacute
|
||||
/ocircumflex /otilde /ohookabove /odotbelow
|
||||
/udotbelow /ugrave /uacute /utilde
|
||||
/uhookabove /yacute /ohorndotbelow /Uhorntilde
|
||||
] def
|
||||
|
||||
% eof
|
||||
49
contrib/ttf2pk/data/EUC.sfd
Normal file
49
contrib/ttf2pk/data/EUC.sfd
Normal file
@@ -0,0 +1,49 @@
|
||||
# EUC.sfd
|
||||
#
|
||||
# subfont numbers for character sets in EUC encoding and its corresponding
|
||||
# code ranges to be used with the CJK package for LaTeX.
|
||||
#
|
||||
# Examples for such character sets:
|
||||
#
|
||||
# GB 2312-1980,
|
||||
# KS X 1001:1992 (=KS C 5601-1992),
|
||||
# JIS X 0208:1997,
|
||||
# CNS 11643-1992 planes 1-7.
|
||||
|
||||
01 0xA1A1_0xA1FE 0xA2A1_0xA2FE 0xA3A1_0xA3E4
|
||||
02 0xA3E5_0xA3FE 0xA4A1_0xA4FE 0xA5A1_0xA5FE 0xA6A1_0xA6CA
|
||||
03 0xA6CB_0xA6FE 0xA7A1_0xA7FE 0xA8A1_0xA8FE 0xA9A1_0xA9B0
|
||||
04 0xA9B1_0xA9FE 0xAAA1_0xAAFE 0xABA1_0xABF4
|
||||
05 0xABF5_0xABFE 0xACA1_0xACFE 0xADA1_0xADFE 0xAEA1_0xAEDA
|
||||
06 0xAEDB_0xAEFE 0xAFA1_0xAFFE 0xB0A1_0xB0FE 0xB1A1_0xB1C0
|
||||
07 0xB1C1_0xB1FE 0xB2A1_0xB2FE 0xB3A1_0xB3FE 0xB4A1_0xB4A6
|
||||
08 0xB4A7_0xB4FE 0xB5A1_0xB5FE 0xB6A1_0xB6EA
|
||||
09 0xB6EB_0xB6FE 0xB7A1_0xB7FE 0xB8A1_0xB8FE 0xB9A1_0xB9D0
|
||||
10 0xB9D1_0xB9FE 0xBAA1_0xBAFE 0xBBA1_0xBBFE 0xBCA1_0xBCB6
|
||||
11 0xBCB7_0xBCFE 0xBDA1_0xBDFE 0xBEA1_0xBEFA
|
||||
12 0xBEFB_0xBEFE 0xBFA1_0xBFFE 0xC0A1_0xC0FE 0xC1A1_0xC1E0
|
||||
13 0xC1E1_0xC1FE 0xC2A1_0xC2FE 0xC3A1_0xC3FE 0xC4A1_0xC4C6
|
||||
14 0xC4C7_0xC4FE 0xC5A1_0xC5FE 0xC6A1_0xC6FE 0xC7A1_0xC7AC
|
||||
15 0xC7AD_0xC7FE 0xC8A1_0xC8FE 0xC9A1_0xC9F0
|
||||
16 0xC9F1_0xC9FE 0xCAA1_0xCAFE 0xCBA1_0xCBFE 0xCCA1_0xCCD6
|
||||
17 0xCCD7_0xCCFE 0xCDA1_0xCDFE 0xCEA1_0xCEFE 0xCFA1_0xCFBC
|
||||
18 0xCFBD_0xCFFE 0xD0A1_0xD0FE 0xD1A1_0xD1FE 0xD2A1_0xD2A2
|
||||
19 0xD2A3_0xD2FE 0xD3A1_0xD3FE 0xD4A1_0xD4E6
|
||||
20 0xD4E7_0xD4FE 0xD5A1_0xD5FE 0xD6A1_0xD6FE 0xD7A1_0xD7CC
|
||||
21 0xD7CD_0xD7FE 0xD8A1_0xD8FE 0xD9A1_0xD9FE 0xDAA1_0xDAB2
|
||||
22 0xDAB3_0xDAFE 0xDBA1_0xDBFE 0xDCA1_0xDCF6
|
||||
23 0xDCF7_0xDCFE 0xDDA1_0xDDFE 0xDEA1_0xDEFE 0xDFA1_0xDFDC
|
||||
24 0xDFDD_0xDFFE 0xE0A1_0xE0FE 0xE1A1_0xE1FE 0xE2A1_0xE2C2
|
||||
25 0xE2C3_0xE2FE 0xE3A1_0xE3FE 0xE4A1_0xE4FE 0xE5A1_0xE5A8
|
||||
26 0xE5A9_0xE5FE 0xE6A1_0xE6FE 0xE7A1_0xE7EC
|
||||
27 0xE7ED_0xE7FE 0xE8A1_0xE8FE 0xE9A1_0xE9FE 0xEAA1_0xEAD2
|
||||
28 0xEAD3_0xEAFE 0xEBA1_0xEBFE 0xECA1_0xECFE 0xEDA1_0xEDB8
|
||||
29 0xEDB9_0xEDFE 0xEEA1_0xEEFE 0xEFA1_0xEFFC
|
||||
30 0xEFFD_0xEFFE 0xF0A1_0xF0FE 0xF1A1_0xF1FE 0xF2A1_0xF2E2
|
||||
31 0xF2E3_0xF2FE 0xF3A1_0xF3FE 0xF4A1_0xF4FE 0xF5A1_0xF5C8
|
||||
32 0xF5C9_0xF5FE 0xF6A1_0xF6FE 0xF7A1_0xF7FE 0xF8A1_0xF8AE
|
||||
33 0xF8AF_0xF8FE 0xF9A1_0xF9FE 0xFAA1_0xFAF2
|
||||
34 0xFAF3_0xFAFE 0xFBA1_0xFBFE 0xFCA1_0xFCFE 0xFDA1_0xFDD8
|
||||
35 0xFDD9_0xFDFE 0xFEA1_0xFEFE
|
||||
|
||||
# eof
|
||||
52
contrib/ttf2pk/data/SJIS.sfd
Normal file
52
contrib/ttf2pk/data/SJIS.sfd
Normal file
@@ -0,0 +1,52 @@
|
||||
# SJIS.sfd
|
||||
#
|
||||
# subfont numbers for SJIS encoding and its corresponding code ranges
|
||||
# to be used with the CJK package for LaTeX.
|
||||
|
||||
01 0x8140_0x817E 0x8180_0x81FC 0x8240_0x827E 0x8280_0x8284
|
||||
02 0x8285_0x82FC 0x8340_0x837E 0x8380_0x83C8
|
||||
03 0x83C9_0x83FC 0x8440_0x847E 0x8480_0x84FC 0x8540_0x854F
|
||||
04 0x8550_0x857E 0x8580_0x85FC 0x8640_0x867E 0x8680_0x8694
|
||||
05 0x8695_0x86FC 0x8740_0x877E 0x8780_0x87D8
|
||||
06 0x87D9_0x87FC 0x8840_0x887E 0x8880_0x88FC 0x8940_0x895F
|
||||
07 0x8960_0x897E 0x8980_0x89FC 0x8A40_0x8A7E 0x8A80_0x8AA4
|
||||
08 0x8AA5_0x8AFC 0x8B40_0x8B7E 0x8B80_0x8BE8
|
||||
09 0x8BE9_0x8BFC 0x8C40_0x8C7E 0x8C80_0x8CFC 0x8D40_0x8D6F
|
||||
10 0x8D70_0x8D7E 0x8D80_0x8DFC 0x8E40_0x8E7E 0x8E80_0x8EB4
|
||||
11 0x8EB5_0x8EFC 0x8F40_0x8F7E 0x8F80_0x8FF8
|
||||
12 0x8FF9_0x8FFC 0x9040_0x907E 0x9080_0x90FC 0x9140_0x917E 0x9180
|
||||
13 0x9181_0x91FC 0x9240_0x927E 0x9280_0x92C4
|
||||
14 0x92C5_0x92FC 0x9340_0x937E 0x9380_0x93FC 0x9440_0x944B
|
||||
15 0x944C_0x947E 0x9480_0x94FC 0x9540_0x957E 0x9580_0x9590
|
||||
16 0x9591_0x95FC 0x9640_0x967E 0x9680_0x96D4
|
||||
17 0x96D5_0x96FC 0x9740_0x977E 0x9780_0x97FC 0x9840_0x985B
|
||||
18 0x985C_0x987E 0x9880_0x98FC 0x9940_0x997E 0x9980_0x99A0
|
||||
19 0x99A1_0x99FC 0x9A40_0x9A7E 0x9A80_0x9AE4
|
||||
20 0x9AE5_0x9AFC 0x9B40_0x9B7E 0x9B80_0x9BFC 0x9C40_0x9C6B
|
||||
21 0x9C6C_0x9C7E 0x9C80_0x9CFC 0x9D40_0x9D7E 0x9D80_0x9DB0
|
||||
22 0x9DB1_0x9DFC 0x9E40_0x9E7E 0x9E80_0x9EF4
|
||||
23 0x9EF5_0x9EFC 0x9F40_0x9F7E 0x9F80_0x9FFC 0xE040_0xE07B
|
||||
24 0xE07C_0xE07E 0xE080_0xE0FC 0xE140_0xE17E 0xE180_0xE1C0
|
||||
25 0xE1C1_0xE1FC 0xE240_0xE27E 0xE280_0xE2FC 0xE340_0xE347
|
||||
26 0xE348_0xE37E 0xE380_0xE3FC 0xE440_0xE47E 0xE480_0xE48C
|
||||
27 0xE48D_0xE4FC 0xE540_0xE57E 0xE580_0xE5D0
|
||||
28 0xE5D1_0xE5FC 0xE640_0xE67E 0xE680_0xE6FC 0xE740_0xE757
|
||||
29 0xE758_0xE77E 0xE780_0xE7FC 0xE840_0xE87E 0xE880_0xE89C
|
||||
30 0xE89D_0xE8FC 0xE940_0xE97E 0xE980_0xE9E0
|
||||
31 0xE9E1_0xE9FC 0xEA40_0xEA7E 0xEA80_0xEAFC 0xEB40_0xEB67
|
||||
32 0xEB68_0xEB7E 0xEB80_0xEBFC 0xEC40_0xEC7E 0xEC80_0xECAC
|
||||
33 0xECAD_0xECFC 0xED40_0xED7E 0xED80_0xEDF0
|
||||
34 0xEDF1_0xEDFC 0xEE40_0xEE7E 0xEE80_0xEEFC 0xEF40_0xEF77
|
||||
35 0xEF78_0xEF7E 0xEF80_0xEFFC 0xF040_0xF07E 0xF080_0xF0BC
|
||||
36 0xF0BD_0xF0FC 0xF140_0xF17E 0xF180_0xF1FC 0xF240_0xF243
|
||||
37 0xF244_0xF27E 0xF280_0xF2FC 0xF340_0xF37E 0xF380_0xF388
|
||||
38 0xF389_0xF3FC 0xF440_0xF47E 0xF480_0xF4CC
|
||||
39 0xF4CD_0xF4FC 0xF540_0xF57E 0xF580_0xF5FC 0xF640_0xF653
|
||||
40 0xF654_0xF67E 0xF680_0xF6FC 0xF740_0xF77E 0xF780_0xF798
|
||||
41 0xF799_0xF7FC 0xF840_0xF87E 0xF880_0xF8DC
|
||||
42 0xF8DD_0xF8FC 0xF940_0xF97E 0xF980_0xF9FC 0xFA40_0xFA63
|
||||
43 0xFA64_0xFA7E 0xFA80_0xFAFC 0xFB40_0xFB7E 0xFB80_0xFBA8
|
||||
44 0xFBA9_0xFBFC 0xFC40_0xFC7E 0xFC80_0xFCEC
|
||||
45 0xFCED_0xFCFC
|
||||
|
||||
# eof
|
||||
128
contrib/ttf2pk/data/T1-WGL4.enc
Normal file
128
contrib/ttf2pk/data/T1-WGL4.enc
Normal file
@@ -0,0 +1,128 @@
|
||||
% T1-WGL4.enc
|
||||
%
|
||||
%
|
||||
% This is LaTeX T1 encoding for WGL4 encoded TrueType fonts
|
||||
% (e.g. from Windows 95)
|
||||
%
|
||||
%
|
||||
% Note that /hyphen appears twice (for the T1 code points `hyphen' 0x2d
|
||||
% and `hyphenchar' 0x7f).
|
||||
%
|
||||
%
|
||||
% LIGKERN space l =: lslash ;
|
||||
% LIGKERN space L =: Lslash ;
|
||||
% LIGKERN question quoteleft =: questiondown ;
|
||||
% LIGKERN exclam quoteleft =: exclamdown ;
|
||||
% LIGKERN hyphen hyphen =: endash ;
|
||||
% LIGKERN endash hyphen =: emdash ;
|
||||
% LIGKERN quoteleft quoteleft =: quotedblleft ;
|
||||
% LIGKERN quoteright quoteright =: quotedblright ;
|
||||
% LIGKERN comma comma =: quotedblbase ;
|
||||
% LIGKERN less less =: guillemotleft ;
|
||||
% LIGKERN greater greater =: guillemotright ;
|
||||
%
|
||||
% LIGKERN f i =: fi ;
|
||||
% LIGKERN f l =: fl ;
|
||||
% LIGKERN f f =: ff ;
|
||||
% LIGKERN ff i =: ffi ;
|
||||
% LIGKERN ff l =: ffl ;
|
||||
%
|
||||
% We blow away kerns to and from spaces (TeX doesn't have a
|
||||
% space) and also remove any kerns from the numbers.
|
||||
%
|
||||
% LIGKERN space {} * ; * {} space ;
|
||||
% LIGKERN zero {} * ; * {} zero ;
|
||||
% LIGKERN one {} * ; * {} one ;
|
||||
% LIGKERN two {} * ; * {} two ;
|
||||
% LIGKERN three {} * ; * {} three ;
|
||||
% LIGKERN four {} * ; * {} four ;
|
||||
% LIGKERN five {} * ; * {} five ;
|
||||
% LIGKERN six {} * ; * {} six ;
|
||||
% LIGKERN seven {} * ; * {} seven ;
|
||||
% LIGKERN eight {} * ; * {} eight ;
|
||||
% LIGKERN nine {} * ; * {} nine ;
|
||||
|
||||
/T1Encoding [ % now 256 chars follow
|
||||
% 0x00
|
||||
/grave /acute /circumflex /tilde
|
||||
/dieresis /hungarumlaut /ring /caron
|
||||
/breve /macron /dotaccent /cedilla
|
||||
/ogonek /quotesinglbase /guilsinglleft /guilsinglright
|
||||
% 0x10
|
||||
/quotedblleft /quotedblright /quotedblbase /guillemotleft
|
||||
/guillemotright /endash /emdash /compwordmark
|
||||
/perthousandzero /dotlessi /dotlessj /ff
|
||||
/fi /fl /ffi /ffl
|
||||
% 0x20
|
||||
/visualspace /exclam /quotedbl /numbersign
|
||||
/dollar /percent /ampersand /quoteright
|
||||
/parenleft /parenright /asterisk /plus
|
||||
/comma /hyphen /period /slash
|
||||
% 0x30
|
||||
/zero /one /two /three
|
||||
/four /five /six /seven
|
||||
/eight /nine /colon /semicolon
|
||||
/less /equal /greater /question
|
||||
% 0x40
|
||||
/at /A /B /C
|
||||
/D /E /F /G
|
||||
/H /I /J /K
|
||||
/L /M /N /O
|
||||
% 0x50
|
||||
/P /Q /R /S
|
||||
/T /U /V /W
|
||||
/X /Y /Z /bracketleft
|
||||
/backslash /bracketright /asciicircum /underscore
|
||||
% 0x60
|
||||
/quoteleft /a /b /c
|
||||
/d /e /f /g
|
||||
/h /i /j /k
|
||||
/l /m /n /o
|
||||
% 0x70
|
||||
/p /q /r /s
|
||||
/t /u /v /w
|
||||
/x /y /z /braceleft
|
||||
/bar /braceright /asciitilde /hyphen
|
||||
% 0x80
|
||||
/Abreve /Aogonek /Cacute /Ccaron
|
||||
/Dcaron /Ecaron /Eogonek /Gbreve
|
||||
/Lacute /Lcaron /Lslash /Nacute
|
||||
/Ncaron /Eng /Odblacute /Racute
|
||||
% 0x90
|
||||
/Rcaron /Sacute /Scaron /Scedilla
|
||||
/Tcaron /Tcedilla /Udblacute /Uring
|
||||
/Ydieresis /Zacute /Zcaron /Zdot
|
||||
/IJ /Idot /dmacron /section
|
||||
% 0xA0
|
||||
/abreve /aogonek /cacute /ccaron
|
||||
/dcaron /ecaron /eogonek /gbreve
|
||||
/lacute /lcaron /lslash /nacute
|
||||
/ncaron /eng /odblacute /racute
|
||||
% 0xB0
|
||||
/rcaron /sacute /scaron /scedilla
|
||||
/tcaron /tcedilla /udblacute /uring
|
||||
/ydieresis /zacute /zcaron /zdot
|
||||
/ij /exclamdown /questiondown /sterling
|
||||
% 0xC0
|
||||
/Agrave /Aacute /Acircumflex /Atilde
|
||||
/Adieresis /Aring /AE /Ccedilla
|
||||
/Egrave /Eacute /Ecircumflex /Edieresis
|
||||
/Igrave /Iacute /Icircumflex /Idieresis
|
||||
% 0xD0
|
||||
/Eth /Ntilde /Ograve /Oacute
|
||||
/Ocircumflex /Otilde /Odieresis /OE
|
||||
/Oslash /Ugrave /Uacute /Ucircumflex
|
||||
/Udieresis /Yacute /Thorn /Germandbls
|
||||
% 0xE0
|
||||
/agrave /aacute /acircumflex /atilde
|
||||
/adieresis /aring /ae /ccedilla
|
||||
/egrave /eacute /ecircumflex /edieresis
|
||||
/igrave /iacute /icircumflex /idieresis
|
||||
% 0xF0
|
||||
/eth /ntilde /ograve /oacute
|
||||
/ocircumflex /otilde /odieresis /oe
|
||||
/oslash /ugrave /uacute /ucircumflex
|
||||
/udieresis /yacute /thorn /germandbls
|
||||
] def
|
||||
|
||||
% eof
|
||||
3002
contrib/ttf2pk/data/UBg5plus.sfd
Normal file
3002
contrib/ttf2pk/data/UBg5plus.sfd
Normal file
File diff suppressed because it is too large
Load Diff
1854
contrib/ttf2pk/data/UBig5.sfd
Normal file
1854
contrib/ttf2pk/data/UBig5.sfd
Normal file
File diff suppressed because it is too large
Load Diff
1114
contrib/ttf2pk/data/UGB.sfd
Normal file
1114
contrib/ttf2pk/data/UGB.sfd
Normal file
File diff suppressed because it is too large
Load Diff
3002
contrib/ttf2pk/data/UGBK.sfd
Normal file
3002
contrib/ttf2pk/data/UGBK.sfd
Normal file
File diff suppressed because it is too large
Load Diff
1114
contrib/ttf2pk/data/UJIS.sfd
Normal file
1114
contrib/ttf2pk/data/UJIS.sfd
Normal file
File diff suppressed because it is too large
Load Diff
1114
contrib/ttf2pk/data/UKS.sfd
Normal file
1114
contrib/ttf2pk/data/UKS.sfd
Normal file
File diff suppressed because it is too large
Load Diff
265
contrib/ttf2pk/data/Unicode.sfd
Normal file
265
contrib/ttf2pk/data/Unicode.sfd
Normal file
@@ -0,0 +1,265 @@
|
||||
# Unicode.sfd
|
||||
#
|
||||
# subfont numbers for Unicode encoding and its corresponding code ranges
|
||||
# to be used with the CJK package for LaTeX.
|
||||
|
||||
00 0x0_0xFF
|
||||
01 0x100_0x1FF
|
||||
02 0x200_0x2FF
|
||||
03 0x300_0x3FF
|
||||
04 0x400_0x4FF
|
||||
05 0x500_0x5FF
|
||||
06 0x600_0x6FF
|
||||
07 0x700_0x7FF
|
||||
08 0x800_0x8FF
|
||||
09 0x900_0x9FF
|
||||
0a 0xA00_0xAFF
|
||||
0b 0xB00_0xBFF
|
||||
0c 0xC00_0xCFF
|
||||
0d 0xD00_0xDFF
|
||||
0e 0xE00_0xEFF
|
||||
0f 0xF00_0xFFF
|
||||
10 0x1000_0x10FF
|
||||
11 0x1100_0x11FF
|
||||
12 0x1200_0x12FF
|
||||
13 0x1300_0x13FF
|
||||
14 0x1400_0x14FF
|
||||
15 0x1500_0x15FF
|
||||
16 0x1600_0x16FF
|
||||
17 0x1700_0x17FF
|
||||
18 0x1800_0x18FF
|
||||
19 0x1900_0x19FF
|
||||
1a 0x1A00_0x1AFF
|
||||
1b 0x1B00_0x1BFF
|
||||
1c 0x1C00_0x1CFF
|
||||
1d 0x1D00_0x1DFF
|
||||
1e 0x1E00_0x1EFF
|
||||
1f 0x1F00_0x1FFF
|
||||
20 0x2000_0x20FF
|
||||
21 0x2100_0x21FF
|
||||
22 0x2200_0x22FF
|
||||
23 0x2300_0x23FF
|
||||
24 0x2400_0x24FF
|
||||
25 0x2500_0x25FF
|
||||
26 0x2600_0x26FF
|
||||
27 0x2700_0x27FF
|
||||
28 0x2800_0x28FF
|
||||
29 0x2900_0x29FF
|
||||
2a 0x2A00_0x2AFF
|
||||
2b 0x2B00_0x2BFF
|
||||
2c 0x2C00_0x2CFF
|
||||
2d 0x2D00_0x2DFF
|
||||
2e 0x2E00_0x2EFF
|
||||
2f 0x2F00_0x2FFF
|
||||
30 0x3000_0x30FF
|
||||
31 0x3100_0x31FF
|
||||
32 0x3200_0x32FF
|
||||
33 0x3300_0x33FF
|
||||
34 0x3400_0x34FF
|
||||
35 0x3500_0x35FF
|
||||
36 0x3600_0x36FF
|
||||
37 0x3700_0x37FF
|
||||
38 0x3800_0x38FF
|
||||
39 0x3900_0x39FF
|
||||
3a 0x3A00_0x3AFF
|
||||
3b 0x3B00_0x3BFF
|
||||
3c 0x3C00_0x3CFF
|
||||
3d 0x3D00_0x3DFF
|
||||
3e 0x3E00_0x3EFF
|
||||
3f 0x3F00_0x3FFF
|
||||
40 0x4000_0x40FF
|
||||
41 0x4100_0x41FF
|
||||
42 0x4200_0x42FF
|
||||
43 0x4300_0x43FF
|
||||
44 0x4400_0x44FF
|
||||
45 0x4500_0x45FF
|
||||
46 0x4600_0x46FF
|
||||
47 0x4700_0x47FF
|
||||
48 0x4800_0x48FF
|
||||
49 0x4900_0x49FF
|
||||
4a 0x4A00_0x4AFF
|
||||
4b 0x4B00_0x4BFF
|
||||
4c 0x4C00_0x4CFF
|
||||
4d 0x4D00_0x4DFF
|
||||
4e 0x4E00_0x4EFF
|
||||
4f 0x4F00_0x4FFF
|
||||
50 0x5000_0x50FF
|
||||
51 0x5100_0x51FF
|
||||
52 0x5200_0x52FF
|
||||
53 0x5300_0x53FF
|
||||
54 0x5400_0x54FF
|
||||
55 0x5500_0x55FF
|
||||
56 0x5600_0x56FF
|
||||
57 0x5700_0x57FF
|
||||
58 0x5800_0x58FF
|
||||
59 0x5900_0x59FF
|
||||
5a 0x5A00_0x5AFF
|
||||
5b 0x5B00_0x5BFF
|
||||
5c 0x5C00_0x5CFF
|
||||
5d 0x5D00_0x5DFF
|
||||
5e 0x5E00_0x5EFF
|
||||
5f 0x5F00_0x5FFF
|
||||
60 0x6000_0x60FF
|
||||
61 0x6100_0x61FF
|
||||
62 0x6200_0x62FF
|
||||
63 0x6300_0x63FF
|
||||
64 0x6400_0x64FF
|
||||
65 0x6500_0x65FF
|
||||
66 0x6600_0x66FF
|
||||
67 0x6700_0x67FF
|
||||
68 0x6800_0x68FF
|
||||
69 0x6900_0x69FF
|
||||
6a 0x6A00_0x6AFF
|
||||
6b 0x6B00_0x6BFF
|
||||
6c 0x6C00_0x6CFF
|
||||
6d 0x6D00_0x6DFF
|
||||
6e 0x6E00_0x6EFF
|
||||
6f 0x6F00_0x6FFF
|
||||
70 0x7000_0x70FF
|
||||
71 0x7100_0x71FF
|
||||
72 0x7200_0x72FF
|
||||
73 0x7300_0x73FF
|
||||
74 0x7400_0x74FF
|
||||
75 0x7500_0x75FF
|
||||
76 0x7600_0x76FF
|
||||
77 0x7700_0x77FF
|
||||
78 0x7800_0x78FF
|
||||
79 0x7900_0x79FF
|
||||
7a 0x7A00_0x7AFF
|
||||
7b 0x7B00_0x7BFF
|
||||
7c 0x7C00_0x7CFF
|
||||
7d 0x7D00_0x7DFF
|
||||
7e 0x7E00_0x7EFF
|
||||
7f 0x7F00_0x7FFF
|
||||
80 0x8000_0x80FF
|
||||
81 0x8100_0x81FF
|
||||
82 0x8200_0x82FF
|
||||
83 0x8300_0x83FF
|
||||
84 0x8400_0x84FF
|
||||
85 0x8500_0x85FF
|
||||
86 0x8600_0x86FF
|
||||
87 0x8700_0x87FF
|
||||
88 0x8800_0x88FF
|
||||
89 0x8900_0x89FF
|
||||
8a 0x8A00_0x8AFF
|
||||
8b 0x8B00_0x8BFF
|
||||
8c 0x8C00_0x8CFF
|
||||
8d 0x8D00_0x8DFF
|
||||
8e 0x8E00_0x8EFF
|
||||
8f 0x8F00_0x8FFF
|
||||
90 0x9000_0x90FF
|
||||
91 0x9100_0x91FF
|
||||
92 0x9200_0x92FF
|
||||
93 0x9300_0x93FF
|
||||
94 0x9400_0x94FF
|
||||
95 0x9500_0x95FF
|
||||
96 0x9600_0x96FF
|
||||
97 0x9700_0x97FF
|
||||
98 0x9800_0x98FF
|
||||
99 0x9900_0x99FF
|
||||
9a 0x9A00_0x9AFF
|
||||
9b 0x9B00_0x9BFF
|
||||
9c 0x9C00_0x9CFF
|
||||
9d 0x9D00_0x9DFF
|
||||
9e 0x9E00_0x9EFF
|
||||
9f 0x9F00_0x9FFF
|
||||
a0 0xA000_0xA0FF
|
||||
a1 0xA100_0xA1FF
|
||||
a2 0xA200_0xA2FF
|
||||
a3 0xA300_0xA3FF
|
||||
a4 0xA400_0xA4FF
|
||||
a5 0xA500_0xA5FF
|
||||
a6 0xA600_0xA6FF
|
||||
a7 0xA700_0xA7FF
|
||||
a8 0xA800_0xA8FF
|
||||
a9 0xA900_0xA9FF
|
||||
aa 0xAA00_0xAAFF
|
||||
ab 0xAB00_0xABFF
|
||||
ac 0xAC00_0xACFF
|
||||
ad 0xAD00_0xADFF
|
||||
ae 0xAE00_0xAEFF
|
||||
af 0xAF00_0xAFFF
|
||||
b0 0xB000_0xB0FF
|
||||
b1 0xB100_0xB1FF
|
||||
b2 0xB200_0xB2FF
|
||||
b3 0xB300_0xB3FF
|
||||
b4 0xB400_0xB4FF
|
||||
b5 0xB500_0xB5FF
|
||||
b6 0xB600_0xB6FF
|
||||
b7 0xB700_0xB7FF
|
||||
b8 0xB800_0xB8FF
|
||||
b9 0xB900_0xB9FF
|
||||
ba 0xBA00_0xBAFF
|
||||
bb 0xBB00_0xBBFF
|
||||
bc 0xBC00_0xBCFF
|
||||
bd 0xBD00_0xBDFF
|
||||
be 0xBE00_0xBEFF
|
||||
bf 0xBF00_0xBFFF
|
||||
c0 0xC000_0xC0FF
|
||||
c1 0xC100_0xC1FF
|
||||
c2 0xC200_0xC2FF
|
||||
c3 0xC300_0xC3FF
|
||||
c4 0xC400_0xC4FF
|
||||
c5 0xC500_0xC5FF
|
||||
c6 0xC600_0xC6FF
|
||||
c7 0xC700_0xC7FF
|
||||
c8 0xC800_0xC8FF
|
||||
c9 0xC900_0xC9FF
|
||||
ca 0xCA00_0xCAFF
|
||||
cb 0xCB00_0xCBFF
|
||||
cc 0xCC00_0xCCFF
|
||||
cd 0xCD00_0xCDFF
|
||||
ce 0xCE00_0xCEFF
|
||||
cf 0xCF00_0xCFFF
|
||||
d0 0xD000_0xD0FF
|
||||
d1 0xD100_0xD1FF
|
||||
d2 0xD200_0xD2FF
|
||||
d3 0xD300_0xD3FF
|
||||
d4 0xD400_0xD4FF
|
||||
d5 0xD500_0xD5FF
|
||||
d6 0xD600_0xD6FF
|
||||
d7 0xD700_0xD7FF
|
||||
# Surrogates
|
||||
#
|
||||
# d8 0xD800_0xD8FF
|
||||
# d9 0xD900_0xD9FF
|
||||
# da 0xDA00_0xDAFF
|
||||
# db 0xDB00_0xDBFF
|
||||
dc 0xDC00_0xDCFF
|
||||
dd 0xDD00_0xDDFF
|
||||
de 0xDE00_0xDEFF
|
||||
df 0xDF00_0xDFFF
|
||||
e0 0xE000_0xE0FF
|
||||
e1 0xE100_0xE1FF
|
||||
e2 0xE200_0xE2FF
|
||||
e3 0xE300_0xE3FF
|
||||
e4 0xE400_0xE4FF
|
||||
e5 0xE500_0xE5FF
|
||||
e6 0xE600_0xE6FF
|
||||
e7 0xE700_0xE7FF
|
||||
e8 0xE800_0xE8FF
|
||||
e9 0xE900_0xE9FF
|
||||
ea 0xEA00_0xEAFF
|
||||
eb 0xEB00_0xEBFF
|
||||
ec 0xEC00_0xECFF
|
||||
ed 0xED00_0xEDFF
|
||||
ee 0xEE00_0xEEFF
|
||||
ef 0xEF00_0xEFFF
|
||||
f0 0xF000_0xF0FF
|
||||
f1 0xF100_0xF1FF
|
||||
f2 0xF200_0xF2FF
|
||||
f3 0xF300_0xF3FF
|
||||
f4 0xF400_0xF4FF
|
||||
f5 0xF500_0xF5FF
|
||||
f6 0xF600_0xF6FF
|
||||
f7 0xF700_0xF7FF
|
||||
f8 0xF800_0xF8FF
|
||||
f9 0xF900_0xF9FF
|
||||
fa 0xFA00_0xFAFF
|
||||
fb 0xFB00_0xFBFF
|
||||
fc 0xFC00_0xFCFF
|
||||
fd 0xFD00_0xFDFF
|
||||
fe 0xFE00_0xFEFF
|
||||
ff 0xFF00_0xFFFF
|
||||
|
||||
# eof
|
||||
244
contrib/ttf2pk/data/VPS.rpl
Normal file
244
contrib/ttf2pk/data/VPS.rpl
Normal file
@@ -0,0 +1,244 @@
|
||||
% VPS.rpl
|
||||
%
|
||||
%
|
||||
% This file maps VPS encoding for Vietnamese to Adobe glyph names used
|
||||
% in the file ET5.enc.
|
||||
%
|
||||
% VPS is a commonly used program to write Vietnamese.
|
||||
%
|
||||
% This file has been tested with the font vpsdlac.ttf using cmap (3,0)
|
||||
|
||||
.c0x0002 Adotbelow
|
||||
.c0x0003 Acircumflexdotbelow
|
||||
.c0x0004 Abrevedotbelow
|
||||
.c0x0005 Edotbelow
|
||||
.c0x0006 Ecircumflexdotbelow
|
||||
.c0x0015 Uhorndotbelow
|
||||
.c0x0019 Ydotbelow
|
||||
.c0x001c Acircumflextilde
|
||||
.c0x001d Uhorntilde
|
||||
.c0x0020 space
|
||||
.c0x0021 exclam
|
||||
.c0x0022 quotedbl
|
||||
.c0x0023 numbersign
|
||||
.c0x0024 dollar
|
||||
.c0x0025 percent
|
||||
.c0x0026 ampersand
|
||||
.c0x0027 quotesingle
|
||||
.c0x0028 parenleft
|
||||
.c0x0029 parenright
|
||||
.c0x002a asterisk
|
||||
.c0x002b plus
|
||||
.c0x002c comma
|
||||
.c0x002d hyphen
|
||||
.c0x002e period
|
||||
.c0x002f slash
|
||||
.c0x0030 zero
|
||||
.c0x0031 one
|
||||
.c0x0032 two
|
||||
.c0x0033 three
|
||||
.c0x0034 four
|
||||
.c0x0035 five
|
||||
.c0x0036 six
|
||||
.c0x0037 seven
|
||||
.c0x0038 eight
|
||||
.c0x0039 nine
|
||||
.c0x003a colon
|
||||
.c0x003b semicolon
|
||||
.c0x003c less
|
||||
.c0x003d equal
|
||||
.c0x003e greater
|
||||
.c0x003f question
|
||||
.c0x0040 at
|
||||
.c0x0041 A
|
||||
.c0x0042 B
|
||||
.c0x0043 C
|
||||
.c0x0044 D
|
||||
.c0x0045 E
|
||||
.c0x0046 F
|
||||
.c0x0047 G
|
||||
.c0x0048 H
|
||||
.c0x0049 I
|
||||
.c0x004a J
|
||||
.c0x004b K
|
||||
.c0x004c L
|
||||
.c0x004d M
|
||||
.c0x004e N
|
||||
.c0x004f O
|
||||
.c0x0050 P
|
||||
.c0x0051 Q
|
||||
.c0x0052 R
|
||||
.c0x0053 S
|
||||
.c0x0054 T
|
||||
.c0x0055 U
|
||||
.c0x0056 V
|
||||
.c0x0057 W
|
||||
.c0x0058 X
|
||||
.c0x0059 Y
|
||||
.c0x005a Z
|
||||
.c0x005b bracketleft
|
||||
.c0x005c backslash
|
||||
.c0x005d bracketright
|
||||
.c0x005e asciicircum
|
||||
.c0x005f underscore
|
||||
.c0x0060 grave
|
||||
.c0x0061 a
|
||||
.c0x0062 b
|
||||
.c0x0063 c
|
||||
.c0x0064 d
|
||||
.c0x0065 e
|
||||
.c0x0066 f
|
||||
.c0x0067 g
|
||||
.c0x0068 h
|
||||
.c0x0069 i
|
||||
.c0x006a j
|
||||
.c0x006b k
|
||||
.c0x006c l
|
||||
.c0x006d m
|
||||
.c0x006e n
|
||||
.c0x006f o
|
||||
.c0x0070 p
|
||||
.c0x0071 q
|
||||
.c0x0072 r
|
||||
.c0x0073 s
|
||||
.c0x0074 t
|
||||
.c0x0075 u
|
||||
.c0x0076 v
|
||||
.c0x0077 w
|
||||
.c0x0078 x
|
||||
.c0x0079 y
|
||||
.c0x007a z
|
||||
.c0x007b braceleft
|
||||
.c0x007c bar
|
||||
.c0x007d braceright
|
||||
.c0x007e asciitilde
|
||||
.c0x0080 Agrave
|
||||
.c0x0081 Ahookabove
|
||||
.c0x008d Abreveacute
|
||||
.c0x008e Abrevegrave
|
||||
.c0x008f Abrevehookabove
|
||||
.c0x0090 Ecircumflexacute
|
||||
.c0x009d Ohornacute
|
||||
.c0x009e Ohorngrave
|
||||
.c0x00a0 nbspace
|
||||
.c0x00a1 abreveacute
|
||||
.c0x00a2 abrevegrave
|
||||
.c0x00a3 abrevehookabove
|
||||
.c0x00a4 abrevetilde
|
||||
.c0x00a5 abrevedotbelow
|
||||
.c0x00a6 Ohorntilde
|
||||
.c0x00a7 ohornacute
|
||||
.c0x00a8 Ugrave
|
||||
.c0x00a9 ohorngrave
|
||||
.c0x00aa ohornhookabove
|
||||
.c0x00ab ohorntilde
|
||||
.c0x00ac Utilde
|
||||
.c0x00ad Uhornacute
|
||||
.c0x00ae ohorndotbelow
|
||||
.c0x00af Uhorngrave
|
||||
.c0x00b0 ocircumflexhookabove
|
||||
.c0x00b1 Uhornhookabove
|
||||
.c0x00b2 Ygrave
|
||||
.c0x00b3 Ytilde
|
||||
.c0x00b4 Iacute
|
||||
.c0x00b5 Igrave
|
||||
.c0x00b6 ocircumflexdotbelow
|
||||
.c0x00b8 Itilde
|
||||
.c0x00b9 Oacute
|
||||
.c0x00ba uhornhookabove
|
||||
.c0x00bb uhorntilde
|
||||
.c0x00bc Ograve
|
||||
.c0x00bd Ohookabove
|
||||
.c0x00be Otilde
|
||||
.c0x00bf uhorndotbelow
|
||||
.c0x00c0 acircumflexgrave
|
||||
.c0x00c1 Aacute
|
||||
.c0x00c2 Acircumflex
|
||||
.c0x00c3 acircumflexacute
|
||||
.c0x00c4 acircumflexhookabove
|
||||
.c0x00c5 acircumflextilde
|
||||
.c0x00c6 acircumflexdotbelow
|
||||
.c0x00c7 dbar
|
||||
.c0x00c8 ehookabove
|
||||
.c0x00c9 Eacute
|
||||
.c0x00ca Ecircumflex
|
||||
.c0x00cb edotbelow
|
||||
.c0x00cc ihookabove
|
||||
.c0x00cd ecircumflextilde
|
||||
.c0x00ce idotbelow
|
||||
.c0x00cf ytilde
|
||||
.c0x00d0 Uhorn
|
||||
.c0x00d1 Uhookabove
|
||||
.c0x00d2 ocircumflexgrave
|
||||
.c0x00d3 ocircumflexacute
|
||||
.c0x00d4 Ocircumflex
|
||||
.c0x00d5 ohookabove
|
||||
.c0x00d6 ohorn
|
||||
.c0x00d7 Egrave
|
||||
.c0x00d8 uhorngrave
|
||||
.c0x00d9 uhornacute
|
||||
.c0x00da Uacute
|
||||
.c0x00db utilde
|
||||
.c0x00dc uhorn
|
||||
.c0x00dd Yacute
|
||||
.c0x00de Ehookabove
|
||||
.c0x00df germandbls
|
||||
.c0x00e0 agrave
|
||||
.c0x00e1 aacute
|
||||
.c0x00e2 acircumflex
|
||||
.c0x00e3 atilde
|
||||
.c0x00e4 ahookabove
|
||||
.c0x00e5 adotbelow
|
||||
.c0x00e6 abreve
|
||||
.c0x00e7 ccedilla
|
||||
.c0x00e8 egrave
|
||||
.c0x00e9 eacute
|
||||
.c0x00ea ecircumflex
|
||||
.c0x00eb etilde
|
||||
.c0x00ec igrave
|
||||
.c0x00ed iacute
|
||||
.c0x00ee icircumflex
|
||||
.c0x00ef itilde
|
||||
.c0x00f0 Abrevetilde
|
||||
.c0x00f1 Dbar
|
||||
.c0x00f2 ograve
|
||||
.c0x00f3 oacute
|
||||
.c0x00f4 ocircumflex
|
||||
.c0x00f5 otilde
|
||||
.c0x00f6 odieresis
|
||||
.c0x00f7 Ohorn
|
||||
.c0x00f8 udotbelow
|
||||
.c0x00f9 ugrave
|
||||
.c0x00fa uacute
|
||||
.c0x00fb uhookabove
|
||||
.c0x00fc udieresis
|
||||
.c0x00fd Yhookabove
|
||||
.c0x00fe Etilde
|
||||
.c0x00ff ygrave
|
||||
.c0x0152 ecircumflexdotbelow
|
||||
.c0x0153 ydotbelow
|
||||
.c0x0160 ecircumflexgrave
|
||||
.c0x0161 yacute
|
||||
.c0x0178 Ohornhookabove
|
||||
.c0x0192 Acircumflexacute
|
||||
.c0x02c6 Abreve
|
||||
.c0x02dc Ocircumflexhookabove
|
||||
.c0x2013 Ocircumflexacute
|
||||
.c0x2014 Ocircumflexgrave
|
||||
.c0x2018 quoteleft
|
||||
.c0x2019 quoteright
|
||||
.c0x201a Atilde
|
||||
.c0x201c Ecircumflexgrave
|
||||
.c0x201d Ecircumflexhookabove
|
||||
.c0x201e Acircumflexgrave
|
||||
.c0x2020 odotbelow
|
||||
.c0x2021 ocircumflextilde
|
||||
.c0x2022 Ecircumflextilde
|
||||
.c0x2026 Acircumflexhookabove
|
||||
.c0x2030 ecircumflexacute
|
||||
.c0x2039 ecircumflexhookabove
|
||||
.c0x203a yhookabove
|
||||
.c0x2122 Ocircumflextilde
|
||||
.c0x2219 Ihookabove
|
||||
|
||||
% eof
|
||||
18
contrib/ttf2pk/data/ttfonts.map
Normal file
18
contrib/ttf2pk/data/ttfonts.map
Normal file
@@ -0,0 +1,18 @@
|
||||
% These entries are just examples!
|
||||
|
||||
arials arial.ttf Slant=0.25
|
||||
arial arial.ttf Slant=0 Extend=1 Pid = 1 Eid = 0
|
||||
arialx arial.ttf Slant=0 Extend=1.5
|
||||
|
||||
times times.ttf Encoding=T1-WGL4.enc \
|
||||
.g0xc7=ring .g0xc9=caron .g0xc4=dotlessi
|
||||
times95 times95.ttf Encoding=T1-WGL4.enc
|
||||
|
||||
ntukai@Big5@ ntu_kai.ttf Pid = 3 Eid = 4
|
||||
cyberb@Unicode@ cyberbit.ttf
|
||||
|
||||
% the next entry maps the Unicode encoded font to Big 5 encoding; thus you
|
||||
% can say \begin{CJK}{Big5}{...} (this is an environment from the CJK
|
||||
% package for LaTeX).
|
||||
|
||||
mingli@UBig5@ mingliu.ttc Fontindex = 0
|
||||
334
contrib/ttf2pk/dvidrv.btm
Normal file
334
contrib/ttf2pk/dvidrv.btm
Normal file
@@ -0,0 +1,334 @@
|
||||
::
|
||||
:: This is dvidrv.btm, a batch file for 4DOS/4OS2 written by
|
||||
:: Werner Lemberg <wl@gnu.org> partially based on the
|
||||
:: dvidrv.btm file of the 4allTeX package written by Phons Bloemen.
|
||||
::
|
||||
:: It is a replacement for dvidrv.exe of the emTeX package.
|
||||
::
|
||||
:: Additional features: support of ps2pk
|
||||
:: support of ttf2pk
|
||||
:: support of hbf2gf for HBFs (Hanzi bitmap fonts)
|
||||
::
|
||||
:: Only quadratic printer modes are supported for ttf2pk!
|
||||
::
|
||||
:: All needed binaries will be searched in the path.
|
||||
|
||||
iff %# lt 2 then
|
||||
echo ``
|
||||
echo Usage: %0 dvi-driver dvi-file [parameters]
|
||||
quit
|
||||
endiff
|
||||
|
||||
setlocal
|
||||
:: we set a default value only if the corresponding environment variable
|
||||
:: is empty. The `=' must follow the variable name immediately.
|
||||
alias set_def `iff "%[%@word["=",0,%1]]" eq "" then %+ set %& %+ endiff`
|
||||
|
||||
:: =========================================
|
||||
:: ======== User defined variables. ========
|
||||
:: =========================================
|
||||
::
|
||||
:: Can be overridden in the environment (except %ps2pk, %ttf2pk, %hbf2gf,
|
||||
:: %pre_dpi, and %post_dpi).
|
||||
|
||||
:: Set these values to `no' for the programs you don't want to use.
|
||||
set ps2pk=yes
|
||||
set ttf2pk=yes
|
||||
set hbf2gf=yes
|
||||
|
||||
:: where the PK files will be installed created by ps2pk, ttf2pk, and
|
||||
:: hbf2gf.
|
||||
:: dvidrv.btm adds `\modeless\XXXdpi' to this string (see below for the
|
||||
:: exact string).
|
||||
set_def pkdir=%emtexdir\pixel\tmp\pk
|
||||
|
||||
:: where the TrueType fonts reside. Supports trailing `!' and `!!'.
|
||||
set_def ttfonts=%emtexdir\fonts\truetype
|
||||
:: where auxiliary files of ttf2pk are located. Supports trailing `!'
|
||||
:: and `!!'.
|
||||
set_def ttfcfg=%emtexdir\ttf2pk
|
||||
|
||||
:: where the HBF files reside. Supports trailing `!' and `!!'.
|
||||
set_def hbfonts=%emtexdir\fonts\hbf
|
||||
:: where the hbf2gf config files are. Supports trailing `!' and `!!'.
|
||||
set_def hbfcfg=%emtexdir\hbf2gf
|
||||
|
||||
:: the dpi-subdirectory has various forms; the most common are XXXdpi and
|
||||
:: dpiXXX, e.g. 300dpi and dpi300. Here we define two variables which
|
||||
:: control this behaviour.
|
||||
:: [dpiXXX is used for TDS compatible TeX trees.]
|
||||
set pre_dpi=dpi
|
||||
set post_dpi=
|
||||
|
||||
:: ================================================
|
||||
:: ======== End of user defined variables. ========
|
||||
:: ================================================
|
||||
|
||||
:: the base name for log files etc.
|
||||
set basename=%@name[%1]
|
||||
|
||||
:: do we run dvips?
|
||||
iff "%basename" ne "dvips" then
|
||||
goto nodvips1
|
||||
endiff
|
||||
|
||||
:: we delete dvips.mfj if it exists.
|
||||
del dvips.mfj >& nul
|
||||
|
||||
:: now we run dvips with all supplied parameters.
|
||||
%&
|
||||
|
||||
:: do we have to generate fonts?
|
||||
iff exist dvips.mfj then
|
||||
goto generate_fonts
|
||||
endiff
|
||||
|
||||
:: else all is done.
|
||||
goto end
|
||||
|
||||
|
||||
:nodvips1
|
||||
:: here we call the dvi driver with all supplied parameters.
|
||||
%& -pj:%basename.mfj
|
||||
|
||||
:: do we have to generate fonts?
|
||||
iff errorlevel 8 then
|
||||
goto generate_fonts
|
||||
endiff
|
||||
|
||||
:: else all is done.
|
||||
goto end
|
||||
|
||||
|
||||
:generate_fonts
|
||||
gosub call_mfjob
|
||||
|
||||
:: do we run dvips?
|
||||
iff "%basename" ne "dvips" then
|
||||
goto nodvips2
|
||||
endiff
|
||||
|
||||
:: we now call dvips a second time
|
||||
%&
|
||||
|
||||
:: since no fonts will be generated in the second run we remove dvips.mfj
|
||||
del dvips.mfj >& nul
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:nodvips2
|
||||
:: we call the dvi driver a second time (without font generation).
|
||||
%& -pj -fm
|
||||
|
||||
del %basename.mfj >& nul
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:: this is the main subroutine which calls mfjob and then parses the mfjob
|
||||
:: file for fonts which can be handled by ps2pk, ttf2pk, or hbf2gf.
|
||||
:call_mfjob
|
||||
:: this alias prints a message on the screen and writes it into the logfile.
|
||||
alias echolog=`echo %& | tee /a %basename.mlg`
|
||||
|
||||
echo ======== DVIDRV.BTM logfile ======== > %basename.mlg
|
||||
echo Commandline: dvidrv.btm %& >> %basename.mlg
|
||||
echo `` >> %basename.mlg
|
||||
echo basename=%basename >> %basename.mlg
|
||||
echo emtexdir=%emtexdir >> %basename.mlg
|
||||
echo dvidrvfonts=%dvidrvfonts >> %basename.mlg
|
||||
echo mfinput=%mfinput >> %basename.mlg
|
||||
echo mfjobopt=%mfjobopt >> %basename.mlg
|
||||
echo textfm=%textfm >> %basename.mlg
|
||||
echo psfonts=%psfonts >> %basename.mlg
|
||||
echo ttfonts=%ttfonts >> %basename.mlg
|
||||
echo ttfcfg=%ttfcfg >> %basename.mlg
|
||||
echo hbfonts=%hbfonts >> %basename.mlg
|
||||
echo hbfcfg=%hbfcfg >> %basename.mlg
|
||||
echo `` >> %basename.mlg
|
||||
|
||||
iff "%@search[mfjob]" eq "" then
|
||||
echolog MFJOB not found in the path.
|
||||
echolog Can't generate PK fonts from METAFONT automatically.
|
||||
echo ``
|
||||
quit
|
||||
endiff
|
||||
|
||||
:: now we call mfjob.
|
||||
echolog mfjob %mfjobopt -g%basename.mfl %basename.mfj
|
||||
mfjob %mfjobopt -g%basename.mfl %basename.mfj
|
||||
iff %? gt 0 then
|
||||
echolog ``
|
||||
echolog Something went wrong while running METAFONT.
|
||||
echolog Look into the log files...
|
||||
echolog ``
|
||||
endiff
|
||||
|
||||
:: after running mfjob we scan the mfjob input file for fonts which can
|
||||
:: be handled by ps2pk, ttf2pk, or hbf2gf.
|
||||
set lnnr=0
|
||||
set totlines=%@lines[%basename.mfj]
|
||||
|
||||
do while %lnnr le %totlines
|
||||
:: input a line.
|
||||
set scratch=%@line[%basename.mfj,%lnnr]
|
||||
set lnnr=%@inc[%lnnr]
|
||||
|
||||
:: get resolutions (METAFONT mode will be ignored).
|
||||
:: example:
|
||||
:: mode=lqlores[180 180];
|
||||
iff %@index[%scratch,mode] ge 0 then
|
||||
set temp=%@word["[]",1,%scratch]
|
||||
set xdpi=%@word[0,%temp]
|
||||
set ydpi=%@word[1,%temp]
|
||||
endiff
|
||||
|
||||
:: get fontname and magnification; we then compute the font resolutions
|
||||
:: (rounded to the nearest integer---there is no necessity to adjust
|
||||
:: these values further because of possible rounding errors since both
|
||||
:: emTeX's dvi drivers and dvips check neighbored values too).
|
||||
:: example:
|
||||
:: {font=cmr10; mag=0.5;}
|
||||
iff %@index[%scratch,{font] ge 0 then
|
||||
set testfont=%@word["=;",1,%scratch]
|
||||
set temp=%@word["=;",3,%scratch]
|
||||
:: we use highest arithmetic precision for these calculations.
|
||||
:: Additionally we write 1/2 instead of 0.5 to avoid problems with
|
||||
:: countries which use a comma instead of a colon as the decimal
|
||||
:: separator.
|
||||
set fontresx=%@int[%@eval[%xdpi*%temp+1/2=8]]
|
||||
set fontresy=%@int[%@eval[%ydpi*%temp+1/2=8]]
|
||||
set pksubdir=modeless\%[pre_dpi]%[fontresx]%post_dpi
|
||||
|
||||
set success=0
|
||||
|
||||
:: check whether %testfont leads to a PS font (we call ps2pkmfj).
|
||||
iff %success == 0 .and. "%ps2pk" eq "yes" then
|
||||
gosub call_ps2pk
|
||||
endiff
|
||||
|
||||
:: check whether %testfont leads to a TrueType font.
|
||||
iff %success == 0 .and. "%ttf2pk" eq "yes" then
|
||||
gosub call_ttf2pk
|
||||
endiff
|
||||
|
||||
:: check whether %testfont leads to a HBF file.
|
||||
iff %success == 0 .and. "%hbf2gf" eq "yes" then
|
||||
gosub call_hbf2gf
|
||||
endiff
|
||||
endiff
|
||||
enddo
|
||||
|
||||
iff exist %basename.mfp then
|
||||
echo `` >> %basename.mlg
|
||||
echo `` >> %basename.mlg
|
||||
echo ======== PS2PK logfile ======== >> %basename.mlg
|
||||
echo `` >> %basename.mlg
|
||||
type %basename.mfp >> %basename.mlg
|
||||
echo `` >> %basename.mlg
|
||||
del %basename.mfp >& nul
|
||||
endiff
|
||||
|
||||
iff exist %basename.mfl then
|
||||
echo `` >> %basename.mlg
|
||||
type %basename.mfl >> %basename.mlg
|
||||
echo `` >> %basename.mlg
|
||||
del %basename.mfl >& nul
|
||||
endiff
|
||||
|
||||
return
|
||||
|
||||
|
||||
:call_ttf2pk
|
||||
iff "%@search[ttf2pk]" eq "" then
|
||||
echolog TTF2PK not found in the path.
|
||||
echolog Can't generate PK fonts from TrueType fonts automatically.
|
||||
echo ``
|
||||
quit
|
||||
endiff
|
||||
|
||||
echolog ttf2pk -q -n %testfont %fontresx
|
||||
ttf2pk -q -n %testfont %fontresx
|
||||
|
||||
iff %? == 0 then
|
||||
echolog Font %pkdir\%pksubdir\%testfont.pk generated.
|
||||
mkdir /s %pkdir\%pksubdir >& nul
|
||||
move %testfont.pk %pkdir\%pksubdir >& nul
|
||||
set success=1
|
||||
elseiff %? == 2 then
|
||||
echolog (%lnnr/%totlines): Font %testfont is no TrueType font.
|
||||
set success=0
|
||||
else
|
||||
echolog Error running TTF2PK for font %testfont!
|
||||
endiff
|
||||
|
||||
return
|
||||
|
||||
|
||||
:call_hbf2gf
|
||||
iff "%@search[hbf2gf]" eq "" then
|
||||
echolog HBF2GF not found in the path.
|
||||
echolog Can't generate PK fonts from HBF files automatically.
|
||||
echo ``
|
||||
quit
|
||||
endiff
|
||||
|
||||
echolog hbf2gf -q -p -n %testfont %fontresx %fontresy
|
||||
hbf2gf -q -p -n %testfont %fontresx %fontresy
|
||||
|
||||
iff %? == 0 then
|
||||
echolog Font %pkdir\%pksubdir\%testfont.pk generated.
|
||||
mkdir /s %pkdir\%pksubdir >& nul
|
||||
gftopk %testfont.gf %testfont.pk
|
||||
move %testfont.pk %pkdir\%pksubdir >& nul
|
||||
del %testfont.gf >& nul
|
||||
set success=1
|
||||
elseiff %? == 2 then
|
||||
echolog (%lnnr/%totlines): Font %testfont is no HBF.
|
||||
set success=0
|
||||
else
|
||||
echolog Error running HBF2GF for font %testfont!
|
||||
endiff
|
||||
|
||||
return
|
||||
|
||||
|
||||
:call_ps2pk
|
||||
iff not exist %pkdir\%pksubdir\%testfont.pk then
|
||||
iff "%@search[ps2pkmfj]" eq "" .or. "%@search[ps2pk]" eq "" then
|
||||
echolog PS2PKMFJ and/or PS2PK not found in the path.
|
||||
echolog Can't generate PK fonts from PostScript fonts automatically.
|
||||
echo ``
|
||||
quit
|
||||
endiff
|
||||
|
||||
echolog ps2pkmfj -X%fontresx -Y%fontresy %testfont %testfont.pk
|
||||
ps2pkmfj -X%fontresx -Y%fontresy %testfont %testfont.pk | input %%pspkline
|
||||
|
||||
iff errorlevel != 1 then
|
||||
%pspkline >> %basename.mfp
|
||||
iff %? == 0 then
|
||||
echolog Font %pkdir\%pksubdir\%testfont.pk generated.
|
||||
mkdir /s %pkdir\%pksubdir >& nul
|
||||
move %testfont.pk %pkdir\%pksubdir >& nul
|
||||
success=1
|
||||
else
|
||||
echolog Error running PS2PK for font %testfont!
|
||||
endiff
|
||||
else
|
||||
echolog (%lnnr/%totlines): Font %testfont is no PS font.
|
||||
success=0
|
||||
endiff
|
||||
else
|
||||
echolog Font %pkdir\%pksubdir\%testfont.pk already exists.
|
||||
endiff
|
||||
|
||||
return
|
||||
|
||||
|
||||
:end
|
||||
|
||||
endlocal
|
||||
|
||||
:: ==== end of dvidrv.btm ====
|
||||
56
contrib/ttf2pk/dvidrv.doc
Normal file
56
contrib/ttf2pk/dvidrv.doc
Normal file
@@ -0,0 +1,56 @@
|
||||
Using dvidrv.btm [emTeX for DOS and OS/2]
|
||||
-------------------------------------------
|
||||
|
||||
This batch file does the same as MakeTeXPK does; it is a replacement for
|
||||
dvidrv.exe of emTeX which can handle ttf2pk, hbf2gf, and ps2pk additionally
|
||||
(the ps2pk part is untested yet; it uses ps2pkmfj of the 4allTeX
|
||||
distribution and was basically copied from a similar script, also part of
|
||||
4allTeX).
|
||||
|
||||
First of all, create and install a set of TFM files as described in the
|
||||
previous section.
|
||||
|
||||
Then configure the following variables in dvidrv.btm:
|
||||
|
||||
ps2pk ... set it to `yes' if you want to use this program
|
||||
ttf2pk ... ditto
|
||||
hbf2gf ... ditto
|
||||
|
||||
pkdir ... the place where PK files created by ps2pk, ttf2pk,
|
||||
or hbf2gf should go to. dvidrv.btm adds
|
||||
`\modeless\XXXdpi' resp. `\modeless\dpiXXX' to this
|
||||
string (depending on the variables `pre_dpi' and
|
||||
`post_dpi')
|
||||
|
||||
ttfonts ... where the TrueType fonts files reside
|
||||
ttfcfg ... where the auxiliary data files of ttf2pk reside
|
||||
|
||||
hbfonts ... where the HBF files reside
|
||||
hbfcfg ... the place where the hbf2gf configuration files are
|
||||
|
||||
The last four variables in the above list support trailing `!' and `!!' for
|
||||
recursive directory searching (see the dvidrv.doc of the emTeX package for
|
||||
details).
|
||||
|
||||
Alternatively, you can set these variables in the environment; please note
|
||||
that no spaces are allowed before and after the equal sign, e.g.
|
||||
|
||||
set foo=bar
|
||||
|
||||
is OK, but
|
||||
|
||||
set foo = bar
|
||||
|
||||
will fail.
|
||||
|
||||
Rename dvidrv.exe to dvidrv.ori or something similar and copy dvidrv.btm to
|
||||
a directory in the path.
|
||||
|
||||
Don't forget to update the DVIDRVFONTS and TEXTFM environment variables if
|
||||
necessary.
|
||||
|
||||
Under OS/2 dvips will call mfjob or hbf2gf itself; under DOS it will create
|
||||
a batch file which must be called afterwards.
|
||||
|
||||
|
||||
--- end of dvidrv.doc ---
|
||||
109
contrib/ttf2pk/emdir.c
Normal file
109
contrib/ttf2pk/emdir.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/* emdir.c -- Written by Eberhard Mattes, donated to the public domain */
|
||||
|
||||
#include "emdir.h"
|
||||
|
||||
#ifdef OS2
|
||||
|
||||
#undef HPS
|
||||
#define INCL_DOSFILEMGR
|
||||
#include <os2.h>
|
||||
#include <string.h>
|
||||
|
||||
#define FHDIR(b) (*(HDIR *)(b)->reserved)
|
||||
|
||||
static void fconv (struct ll_findbuffer *dst, const FILEFINDBUF *src)
|
||||
{
|
||||
dst->attr = src->attrFile;
|
||||
dst->time = *(unsigned *)&src->ftimeLastWrite;
|
||||
dst->date = *(unsigned *)&src->fdateLastWrite;
|
||||
dst->size = src->cbFile;
|
||||
strcpy (dst->name, src->achName);
|
||||
}
|
||||
|
||||
|
||||
int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer)
|
||||
{
|
||||
USHORT rc;
|
||||
ULONG count;
|
||||
HDIR hdir;
|
||||
FILEFINDBUF ffbuf;
|
||||
|
||||
hdir = HDIR_CREATE;
|
||||
count = 1;
|
||||
rc = DosFindFirst ((PSZ)path, &hdir, attr, &ffbuf, sizeof (ffbuf),
|
||||
&count, 0L);
|
||||
if (rc != 0 || count != 1)
|
||||
return 0;
|
||||
FHDIR (buffer) = hdir;
|
||||
fconv (buffer, &ffbuf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int ll_findnext (struct ll_findbuffer *buffer)
|
||||
{
|
||||
USHORT rc;
|
||||
ULONG count;
|
||||
HDIR hdir;
|
||||
FILEFINDBUF ffbuf;
|
||||
|
||||
hdir = FHDIR (buffer);
|
||||
count = 1;
|
||||
rc = DosFindNext (hdir, &ffbuf, sizeof (ffbuf), &count);
|
||||
if (rc != 0 || count != 1)
|
||||
{
|
||||
DosFindClose (hdir);
|
||||
return 0;
|
||||
}
|
||||
fconv (buffer, &ffbuf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#elif defined(DJGPP)
|
||||
|
||||
/* djgpp support by Hartmut Schirmer (hsc@techfak.uni-kiel.de), May 30, 1997 */
|
||||
|
||||
#include <dos.h>
|
||||
#include <dir.h>
|
||||
|
||||
static int ll_attr = 0;
|
||||
int ll_findnext (struct ll_findbuffer *buffer)
|
||||
{
|
||||
int res;
|
||||
do {
|
||||
res = _dos_findnext ((struct find_t *)buffer);
|
||||
if (res != 0) return 0;
|
||||
} while ( (buffer->attrib&ll_attr) == 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer)
|
||||
{
|
||||
int res;
|
||||
ll_attr = attr;
|
||||
res = _dos_findfirst((char *)path, attr, (struct find_t *)buffer);
|
||||
if (res != 0) return 0;
|
||||
if ( (buffer->attrib&ll_attr) == 0)
|
||||
return ll_findnext(buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#elif !defined(__EMX__) /* if not OS2 nor DJGPP nor __EMX__ defined */
|
||||
|
||||
/* Not tested */
|
||||
|
||||
#include <dos.h>
|
||||
|
||||
int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer)
|
||||
{
|
||||
return _dos_findfirst (path, attr, (struct find_t *)buffer) == 0;
|
||||
}
|
||||
|
||||
|
||||
int ll_findnext (struct ll_findbuffer *buffer)
|
||||
{
|
||||
return _dos_findnext ((struct find_t *)buffer) == 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user