Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cdave1 committed Aug 16, 2011
0 parents commit 1cd22fa
Show file tree
Hide file tree
Showing 261 changed files with 112,346 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitignore
@@ -0,0 +1,30 @@
*~
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/
obj/

# Local configuration file (sdk path, etc)
local.properties
# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so

# Compiled Static libraries
*.lai
*.la
*.a
43 changes: 43 additions & 0 deletions Android/jni/Android.mk
@@ -0,0 +1,43 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

FREETYPE_SRC_PATH := ../../

LOCAL_MODULE := freetype2-static

LOCAL_CFLAGS := -DANDROID_NDK \
-DFT2_BUILD_LIBRARY=1

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include_all \
$(FREETYPE_SRC_PATH)include \
$(FREETYPE_SRC_PATH)src

LOCAL_SRC_FILES := \
$(FREETYPE_SRC_PATH)src/autofit/autofit.c \
$(FREETYPE_SRC_PATH)src/base/basepic.c \
$(FREETYPE_SRC_PATH)src/base/ftapi.c \
$(FREETYPE_SRC_PATH)src/base/ftbase.c \
$(FREETYPE_SRC_PATH)src/base/ftbbox.c \
$(FREETYPE_SRC_PATH)src/base/ftbitmap.c \
$(FREETYPE_SRC_PATH)src/base/ftdbgmem.c \
$(FREETYPE_SRC_PATH)src/base/ftdebug.c \
$(FREETYPE_SRC_PATH)src/base/ftglyph.c \
$(FREETYPE_SRC_PATH)src/base/ftinit.c \
$(FREETYPE_SRC_PATH)src/base/ftpic.c \
$(FREETYPE_SRC_PATH)src/base/ftstroke.c \
$(FREETYPE_SRC_PATH)src/base/ftsynth.c \
$(FREETYPE_SRC_PATH)src/base/ftsystem.c \
$(FREETYPE_SRC_PATH)src/cff/cff.c \
$(FREETYPE_SRC_PATH)src/pshinter/pshinter.c \
$(FREETYPE_SRC_PATH)src/psnames/psnames.c \
$(FREETYPE_SRC_PATH)src/raster/raster.c \
$(FREETYPE_SRC_PATH)src/sfnt/sfnt.c \
$(FREETYPE_SRC_PATH)src/smooth/smooth.c \
$(FREETYPE_SRC_PATH)src/truetype/truetype.c

#LOCAL_CFLAGS := -Wall -pedantic -std=c99 -g
LOCAL_LDLIBS := -ldl -llog

include $(BUILD_STATIC_LIBRARY)

103 changes: 103 additions & 0 deletions Android/jni/Android.mk_backup
@@ -0,0 +1,103 @@
LOCAL_PATH := $(call my-dir)

NDK_PROJECT_PATH := /home/david/Projects/freetype2-android

include $(CLEAR_VARS)

LOCAL_MODULE := freetype2

LOCAL_CFLAGS := -DANDROID_NDK \
-DFT2_BUILD_LIBRARY=1 \
-DDARWIN_NO_CARBON

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include_all \
../include \
../src

LOCAL_SRC_FILES := \
../src/autofit/afangles.c \
../src/autofit/afcjk.c \
../src/autofit/afdummy.c \
../src/autofit/afglobal.c \
../src/autofit/afhints.c \
../src/autofit/afindic.c \
../src/autofit/aflatin.c \
../src/autofit/aflatin2.c \
../src/autofit/afloader.c \
../src/autofit/afmodule.c \
../src/autofit/afpic.c \
../src/autofit/afwarp.c \
../src/autofit/autofit.c \
../src/basepic.c \
../src/base/ftadvanc.c \
../src/base/ftapi.c \
../src/base/ftbase.c \
../src/base/ftbbox.c \
../src/base/ftbitmap.c \
../src/base/ftcalc.c \
../src/base/ftdbgmem.c \
../src/base/ftdebug.c \
../src/base/ftgloadr.c \
../src/base/ftglyph.c \
../src/base/ftinit.c \
../src/base/ftobjs.c \
../src/base/ftoutln.c \
../src/base/ftpic.c \
../src/base/ftrfork.c \
../src/base/ftsnames.c \
../src/base/ftstream.c \
../src/base/ftstroke.c \
../src/base/ftsynth.c \
../src/base/ftsystem.c \
../src/base/fttrigon.c \
../src/base/ftutil.c \
../src/cff/cff.c \
../src/cff/cffcmap.c \
../src/cff/cffdrivr.c \
../src/cff/cffgload.c \
../src/cff/cffload.c \
../src/cff/cffobjs.c \
../src/cff/cffparse.c \
../src/cff/cffpic.c \
../src/pshinter/pshalgo.c \
../src/pshinter/pshglob.c \
../src/pshinter/pshinter.c \
../src/pshinter/pshmod.c \
../src/pshinter/pshpic.c \
../src/pshinter/pshrec.c \
../src/psnames/psmodule.c \
../src/psnames/psnames.c \
../src/psnames/pspic.c \
../src/raster/ftraster.c \
../src/raster/ftrend1.c \
../src/raster/raster.c \
../src/raster/rastpic.c \
../src/sfnt/sfdriver.c \
../src/sfnt/sfnt.c \
../src/sfnt/sfntpic.c \
../src/sfnt/sfobjs.c \
../src/sfnt/ttbdf.c \
../src/sfnt/ttcmap.c \
../src/sfnt/ttkern.c \
../src/sfnt/ttload.c \
../src/sfnt/ttmtx.c \
../src/sfnt/ttpost.c \
../src/sfnt/ttsbit.c \
../src/sfnt/ttsbit0.c \
../src/smooth/ftgrays.c \
../src/smooth/ftsmooth.c \
../src/smooth/ftspic.c \
../src/smooth/smooth.c \
../src/truetype/truetype.c \
../src/truetype/ttdriver.c \
../src/truetype/ttgload.c \
../src/truetype/ttgxvar.c \
../src/truetype/ttinterp.c \
../src/truetype/ttobjs.c \
../src/truetype/ttpic.c \
../src/truetype/ttpload.c \


LOCAL_LDLIBS := -ldl -llog

include $(BUILD_SHARED_LIBRARY)
2 changes: 2 additions & 0 deletions Android/jni/Application.mk
@@ -0,0 +1,2 @@
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-8
6 changes: 6 additions & 0 deletions Android/jni/module.mk
@@ -0,0 +1,6 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := freetype2-prebuilt
LOCAL_SRC_FILES := ../obj/local/$(TARGET_ARCH_ABI)/libfreetype2-static.a
include $(PREBUILT_STATIC_LIBRARY)
169 changes: 169 additions & 0 deletions FTL.txt
@@ -0,0 +1,169 @@
The FreeType Project LICENSE
----------------------------

2006-Jan-27

Copyright 1996-2002, 2006 by
David Turner, Robert Wilhelm, and Werner Lemberg



Introduction
============

The FreeType Project is distributed in several archive packages;
some of them may contain, in addition to the FreeType font engine,
various tools and contributions which rely on, or relate to, the
FreeType Project.

This license applies to all files found in such packages, and
which do not fall under their own explicit license. The license
affects thus the FreeType font engine, the test programs,
documentation and makefiles, at the very least.

This license was inspired by the BSD, Artistic, and IJG
(Independent JPEG Group) licenses, which all encourage inclusion
and use of free software in commercial and freeware products
alike. As a consequence, its main points are that:

o We don't promise that this software works. However, we will be
interested in any kind of bug reports. (`as is' distribution)

o You can use this software for whatever you want, in parts or
full form, without having to pay us. (`royalty-free' usage)

o You may not pretend that you wrote this software. If you use
it, or only parts of it, in a program, you must acknowledge
somewhere in your documentation that you have used the
FreeType code. (`credits')

We specifically permit and encourage the inclusion of this
software, with or without modifications, in commercial products.
We disclaim all warranties covering The FreeType Project and
assume no liability related to The FreeType Project.


Finally, many people asked us for a preferred form for a
credit/disclaimer to use in compliance with this license. We thus
encourage you to use the following text:

"""
Portions of this software are copyright � <year> The FreeType
Project (www.freetype.org). All rights reserved.
"""

Please replace <year> with the value from the FreeType version you
actually use.


Legal Terms
===========

0. Definitions
--------------

Throughout this license, the terms `package', `FreeType Project',
and `FreeType archive' refer to the set of files originally
distributed by the authors (David Turner, Robert Wilhelm, and
Werner Lemberg) as the `FreeType Project', be they named as alpha,
beta or final release.

`You' refers to the licensee, or person using the project, where
`using' is a generic term including compiling the project's source
code as well as linking it to form a `program' or `executable'.
This program is referred to as `a program using the FreeType
engine'.

This license applies to all files distributed in the original
FreeType Project, including all source code, binaries and
documentation, unless otherwise stated in the file in its
original, unmodified form as distributed in the original archive.
If you are unsure whether or not a particular file is covered by
this license, you must contact us to verify this.

The FreeType Project is copyright (C) 1996-2000 by David Turner,
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
specified below.

1. No Warranty
--------------

THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
USE, OF THE FREETYPE PROJECT.

2. Redistribution
-----------------

This license grants a worldwide, royalty-free, perpetual and
irrevocable right and license to use, execute, perform, compile,
display, copy, create derivative works of, distribute and
sublicense the FreeType Project (in both source and object code
forms) and derivative works thereof for any purpose; and to
authorize others to exercise some or all of the rights granted
herein, subject to the following conditions:

o Redistribution of source code must retain this license file
(`FTL.TXT') unaltered; any additions, deletions or changes to
the original files must be clearly indicated in accompanying
documentation. The copyright notices of the unaltered,
original files must be preserved in all copies of source
files.

o Redistribution in binary form must provide a disclaimer that
states that the software is based in part of the work of the
FreeType Team, in the distribution documentation. We also
encourage you to put an URL to the FreeType web page in your
documentation, though this isn't mandatory.

These conditions apply to any software derived from or based on
the FreeType Project, not just the unmodified files. If you use
our work, you must acknowledge us. However, no fee need be paid
to us.

3. Advertising
--------------

Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.

We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
`FreeType library', or `FreeType Distribution'.

As you have not signed this license, you are not required to
accept it. However, as the FreeType Project is copyrighted
material, only this license, or another one contracted with the
authors, grants you the right to use, distribute, and modify it.
Therefore, by using, distributing, or modifying the FreeType
Project, you indicate that you understand and accept all the terms
of this license.

4. Contacts
-----------

There are two mailing lists related to FreeType:

o freetype@nongnu.org

Discusses general use and applications of FreeType, as well as
future and wanted additions to the library and distribution.
If you are looking for support, start in this list if you
haven't found anything to help you in the documentation.

o freetype-devel@nongnu.org

Discusses bugs, as well as engine internals, design issues,
specific licenses, porting, etc.

Our home page can be found at

http://www.freetype.org


--- end of FTL.TXT ---
23 changes: 23 additions & 0 deletions README.md
@@ -0,0 +1,23 @@
# Freetype 2 Android

This is simply a distribution of the Freetype 2 library, that includes Android make files ready to build the Freetype 2 library into a static and shared binaries for version 2.2 of the Android operating system. This distribution requires release 5 of the Android Native Development Kit.

The project only includes the Freetype modules for processing TrueType and OpenType fonts. Other font modules have been disabled. If you want to re-enable these modules, you will need to download the Freetype 2 source code, and then copy the module source files to the appropriate location in either the "include/" or "src/" folders of this distribution. The Freetype source code is [available here](http://download.savannah.gnu.org/releases/freetype/). The instructions for including these new modules in the Android makefile is left as an exercise, but if you follow the pattern of the truetype module in the Android makefile, your module should compile correctly.

The code in this distribution comes from version 2.4.4 of the Freetype library.

There is an analogous library for Xcode and iOS [here](https://github.com/cdave1/freetype2-ios).


# Install

This distribution requires release 5 of the Android Native Development Kit.

To install cd to the Android/jni/ directory and type ndk-build.

To use the library in another ndk library, you will need to include the Android/jni/module.mk file in the Android.mk of the library you want to use freetype with.


# License

This code is distributed under the terms of the [Freetype License](http://www.freetype.org/FTL.TXT). The Freetype License is also included in this distribution. If you are going to use code in this project, please make sure you follow the instructions in the Freetype License.

0 comments on commit 1cd22fa

Please sign in to comment.