[freetype-py] r71 committed - enums have ben reformated such that they have a useful documentation

5 views
Skip to first unread message

freet...@googlecode.com

unread,
Jun 26, 2012, 9:24:48 AM6/26/12
to Nicolas...@inria.fr
Revision: 71
Author: Nicolas.Rougier
Date: Tue Jun 26 06:24:11 2012
Log: enums have ben reformated such that they have a useful
documentation
http://code.google.com/p/freetype-py/source/detail?r=71

Added:
/trunk/doc
/trunk/doc/Makefile
/trunk/doc/_static
/trunk/doc/_templates
/trunk/doc/bbox.rst
/trunk/doc/bitmap.rst
/trunk/doc/bitmap_glyph.rst
/trunk/doc/bitmap_size.rst
/trunk/doc/charmap.rst
/trunk/doc/conf.py
/trunk/doc/constants.rst
/trunk/doc/face.rst
/trunk/doc/ft_encodings.rst
/trunk/doc/ft_face_flags.rst
/trunk/doc/ft_fstypes.rst
/trunk/doc/ft_glyph_bbox_modes.rst
/trunk/doc/ft_glyph_formats.rst
/trunk/doc/ft_kerning_modes.rst
/trunk/doc/ft_lcd_filters.rst
/trunk/doc/ft_load_flags.rst
/trunk/doc/ft_load_targets.rst
/trunk/doc/ft_open_modes.rst
/trunk/doc/ft_outline_flags.rst
/trunk/doc/ft_pixel_modes.rst
/trunk/doc/ft_render_modes.rst
/trunk/doc/ft_stroker_borders.rst
/trunk/doc/ft_stroker_linecaps.rst
/trunk/doc/ft_stroker_linejoins.rst
/trunk/doc/ft_style_flags.rst
/trunk/doc/glyph.rst
/trunk/doc/glyph_slot.rst
/trunk/doc/index.rst
/trunk/doc/make.bat
/trunk/doc/make_enums.py
/trunk/doc/outline.rst
/trunk/doc/sfnt_name.rst
/trunk/doc/size_metrics.rst
/trunk/doc/stroker.rst
/trunk/doc/tt_adobe_ids.rst
/trunk/doc/tt_apple_ids.rst
/trunk/doc/tt_mac_ids.rst
/trunk/doc/tt_mac_langids.rst
/trunk/doc/tt_ms_ids.rst
/trunk/doc/tt_ms_langids.rst
/trunk/doc/tt_name_ids.rst
/trunk/doc/tt_platforms.rst
Deleted:
/trunk/freetype/ft_enums.py
Modified:
/trunk/examples/wordle.py
/trunk/freetype/__init__.py
/trunk/setup.py

=======================================
--- /dev/null
+++ /trunk/doc/Makefile Tue Jun 26 06:24:11 2012
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER))
$(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp
devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or
PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated
items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if
enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FreetypePython.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FreetypePython.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/FreetypePython"
+ @echo "# ln -s $(BUILDDIR)/devhelp
$$HOME/.local/share/devhelp/FreetypePython"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
=======================================
--- /dev/null
+++ /trunk/doc/bbox.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+BBox
+====
+.. autoclass:: BBox
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/bitmap.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Bitmap
+======
+.. autoclass:: Bitmap
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/bitmap_glyph.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Bitmap glyph
+============
+.. autoclass:: BitmapGlyph
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/bitmap_size.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Bitmap size
+===========
+.. autoclass:: BitmapSize
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/charmap.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Charmap
+=======
+.. autoclass:: Charmap
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/conf.py Tue Jun 26 06:24:11 2012
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+#
+# Freetype/Python documentation build configuration file, created by
+# sphinx-quickstart on Wed Nov 9 16:29:54 2011.
+#
+# This file is execfile()d with the current directory set to its
containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another
directory,
+# add these directories to sys.path here. If the directory is relative to
the
+# documentation root, use os.path.abspath to make it absolute, like shown
here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration
-----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Freetype/Python'
+copyright = u'2011, Nicolas P. Rougier'
+
+# The version info for the project you're documenting, acts as replacement
for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.3.3'
+# The full version, including alpha/beta/rc tags.
+release = '0.3.3'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to
some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output
---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a
theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this
directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as
html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the
top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of
the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or
32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets)
here,
+# relative to this directory. They are copied after the builtin static
files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page
bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is
True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is
True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages
will
+# contain a <link> tag referring to it. The value of this option must be
the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'FreetypePythondoc'
+
+
+# -- Options for LaTeX output
--------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass
[howto/manual]).
+latex_documents = [
+ ('index', 'FreetypePython.tex', u'Freetype/Python Documentation',
+ u'Nicolas P. Rougier', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the
top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are
parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output
--------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'freetypepython', u'Freetype/Python Documentation',
+ [u'Nicolas P. Rougier'], 1)
+]
=======================================
--- /dev/null
+++ /trunk/doc/constants.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,33 @@
+Constants
+=========
+
+Contents:
+
+.. toctree::
+ :maxdepth: 1
+
+ ft_encodings.rst
+ ft_face_flags.rst
+ ft_fstypes.rst
+ ft_glyph_bbox_modes.rst
+ ft_glyph_formats.rst
+ ft_kerning_modes.rst
+ ft_lcd_filters.rst
+ ft_load_flags.rst
+ ft_load_targets.rst
+ ft_open_modes.rst
+ ft_outline_flags.rst
+ ft_pixel_modes.rst
+ ft_render_modes.rst
+ ft_stroker_borders.rst
+ ft_stroker_linecaps.rst
+ ft_stroker_linejoins.rst
+ ft_style_flags.rst
+ tt_adobe_ids.rst
+ tt_apple_ids.rst
+ tt_mac_ids.rst
+ tt_mac_langids.rst
+ tt_ms_ids.rst
+ tt_ms_langids.rst
+ tt_name_ids.rst
+ tt_platforms.rst
=======================================
--- /dev/null
+++ /trunk/doc/face.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Face
+====
+.. autoclass:: Face
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/ft_encodings.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,83 @@
+FT_ENCODINGS
+============
+
+An enumeration used to specify character sets supported by charmaps. Used
in
+the FT_Select_Charmap API function.
+
+.. data:: FT_ENCODING_NONE
+
+ The encoding value 0 is reserved.
+
+.. data:: FT_ENCODING_UNICODE
+
+ Corresponds to the Unicode character set. This value covers all versions
of
+ the Unicode repertoire, including ASCII and Latin-1. Most fonts include a
+ Unicode charmap, but not all of them.
+
+ For example, if you want to access Unicode value U+1F028 (and the font
+ contains it), use value 0x1F028 as the input value for FT_Get_Char_Index.
+
+.. data:: FT_ENCODING_MS_SYMBOL
+
+ Corresponds to the Microsoft Symbol encoding, used to encode mathematical
+ symbols in the 32..255 character code range. For more information, see
+ 'http://www.ceviz.net/symbol.htm'.
+
+.. data:: FT_ENCODING_SJIS
+
+ Corresponds to Japanese SJIS encoding. More info at at
+ 'http://langsupport.japanreference.com/encoding.shtml'. See note on
+ multi-byte encodings below.
+
+.. data:: FT_ENCODING_GB2312
+
+ Corresponds to an encoding system for Simplified Chinese as used used in
+ mainland China.
+
+.. data:: FT_ENCODING_BIG5
+
+ Corresponds to an encoding system for Traditional Chinese as used in
Taiwan
+ and Hong Kong.
+
+.. data:: FT_ENCODING_WANSUNG
+
+ Corresponds to the Korean encoding system known as Wansung. For more
+ information see 'http://www.microsoft.com/typography/unicode/949.txt'.
+
+.. data:: FT_ENCODING_JOHAB
+
+ The Korean standard character set (KS C 5601-1992), which corresponds to
MS
+ Windows code page 1361. This character set includes all possible Hangeul
+ character combinations.
+
+.. data:: FT_ENCODING_ADOBE_LATIN_1
+
+ Corresponds to a Latin-1 encoding as defined in a Type 1 PostScript
font. It
+ is limited to 256 character codes.
+
+.. data:: FT_ENCODING_ADOBE_STANDARD
+
+ Corresponds to the Adobe Standard encoding, as found in Type 1, CFF, and
+ OpenType/CFF fonts. It is limited to 256 character codes.
+
+.. data:: FT_ENCODING_ADOBE_EXPERT
+
+ Corresponds to the Adobe Expert encoding, as found in Type 1, CFF, and
+ OpenType/CFF fonts. It is limited to 256 character codes.
+
+.. data:: FT_ENCODING_ADOBE_CUSTOM
+
+ Corresponds to a custom encoding, as found in Type 1, CFF, and
OpenType/CFF
+ fonts. It is limited to 256 character codes.
+
+.. data:: FT_ENCODING_APPLE_ROMAN
+
+ Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType
+ fonts contain a charmap for this encoding, since older versions of Mac
OS are
+ able to use it.
+
+.. data:: FT_ENCODING_OLD_LATIN_2
+
+ This value is deprecated and was never used nor reported by FreeType.
Don't
+ use or test for it.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_face_flags.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,111 @@
+FT_FACE_FLAGS
+=============
+
+A list of bit flags used in the 'face_flags' field of the FT_FaceRec
+structure. They inform client applications of properties of the
corresponding
+face.
+
+
+.. data:: FT_FACE_FLAG_SCALABLE
+
+ Indicates that the face contains outline glyphs. This doesn't prevent
bitmap
+ strikes, i.e., a face can have both this and and FT_FACE_FLAG_FIXED_SIZES
+ set.
+
+
+.. data:: FT_FACE_FLAG_FIXED_SIZES
+
+ Indicates that the face contains bitmap strikes. See also the
+ 'num_fixed_sizes' and 'available_sizes' fields of FT_FaceRec.
+
+
+.. data:: FT_FACE_FLAG_FIXED_WIDTH
+
+ Indicates that the face contains fixed-width characters (like Courier,
+ Lucido, MonoType, etc.).
+
+
+.. data:: FT_FACE_FLAG_SFNT
+
+ Indicates that the face uses the 'sfnt' storage scheme. For now, this
means
+ TrueType and OpenType.
+
+
+.. data:: FT_FACE_FLAG_HORIZONTAL
+
+ Indicates that the face contains horizontal glyph metrics. This should
be set
+ for all common formats.
+
+
+.. data:: FT_FACE_FLAG_VERTICAL
+
+ Indicates that the face contains vertical glyph metrics. This is only
+ available in some formats, not all of them.
+
+
+.. data:: FT_FACE_FLAG_KERNING
+
+ Indicates that the face contains kerning information. If set, the kerning
+ distance can be retrieved through the function FT_Get_Kerning. Otherwise
the
+ function always return the vector (0,0). Note that FreeType doesn't
handle
+ kerning data from the 'GPOS' table (as present in some OpenType fonts).
+
+
+.. data:: FT_FACE_FLAG_MULTIPLE_MASTERS
+
+ Indicates that the font contains multiple masters and is capable of
+ interpolating between them. See the multiple-masters specific API for
+ details.
+
+
+.. data:: FT_FACE_FLAG_GLYPH_NAMES
+
+ Indicates that the font contains glyph names that can be retrieved
through
+ FT_Get_Glyph_Name. Note that some TrueType fonts contain broken glyph
name
+ tables. Use the function FT_Has_PS_Glyph_Names when needed.
+
+
+.. data:: FT_FACE_FLAG_EXTERNAL_STREAM
+
+ Used internally by FreeType to indicate that a face's stream was
provided by
+ the client application and should not be destroyed when FT_Done_Face is
+ called. Don't read or test this flag.
+
+
+.. data:: FT_FACE_FLAG_HINTER
+
+ Set if the font driver has a hinting machine of its own. For example,
with
+ TrueType fonts, it makes sense to use data from the SFNT 'gasp' table
only if
+ the native TrueType hinting engine (with the bytecode interpreter) is
+ available and active.
+
+
+.. data:: FT_FACE_FLAG_CID_KEYED
+
+ Set if the font is CID-keyed. In that case, the font is not accessed by
glyph
+ indices but by CID values. For subsetted CID-keyed fonts this has the
+ consequence that not all index values are a valid argument to
+ FT_Load_Glyph. Only the CID values for which corresponding glyphs in the
+ subsetted font exist make FT_Load_Glyph return successfully; in all other
+ cases you get an 'FT_Err_Invalid_Argument' error.
+
+ Note that CID-keyed fonts which are in an SFNT wrapper don't have this
flag
+ set since the glyphs are accessed in the normal way (using contiguous
+ indices); the 'CID-ness' isn't visible to the application.
+
+
+.. data:: FT_FACE_FLAG_TRICKY
+
+ Set if the font is 'tricky', this is, it always needs the font format's
+ native hinting engine to get a reasonable result. A typical example is
the
+ Chinese font 'mingli.ttf' which uses TrueType bytecode instructions to
move
+ and scale all of its subglyphs.
+
+ It is not possible to autohint such fonts using FT_LOAD_FORCE_AUTOHINT;
it
+ will also ignore FT_LOAD_NO_HINTING. You have to set both
FT_LOAD_NO_HINTING
+ and FT_LOAD_NO_AUTOHINT to really disable hinting; however, you probably
+ never want this except for demonstration purposes.
+
+ Currently, there are six TrueType fonts in the list of tricky fonts;
they are
+ hard-coded in file 'ttobjs.c'.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_fstypes.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,45 @@
+FT_FSTYPES
+==========
+
+A list of bit flags that inform client applications of embedding and
+subsetting restrictions associated with a font.
+
+.. data:: FT_FSTYPE_INSTALLABLE_EMBEDDING
+
+ Fonts with no fsType bit set may be embedded and permanently installed on
+ the remote system by an application.
+
+
+.. data:: FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING
+
+ Fonts that have only this bit set must not be modified, embedded or
exchanged
+ in any manner without first obtaining permission of the font software
+ copyright owner.
+
+
+.. data:: FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING
+
+ If this bit is set, the font may be embedded and temporarily loaded on
the
+ remote system. Documents containing Preview & Print fonts must be opened
+ 'read-only'; no edits can be applied to the document.
+
+
+.. data:: FT_FSTYPE_EDITABLE_EMBEDDING
+
+ If this bit is set, the font may be embedded but must only be installed
+ temporarily on other systems. In contrast to Preview & Print fonts,
+ documents containing editable fonts may be opened for reading, editing is
+ permitted, and changes may be saved.
+
+
+.. data:: FT_FSTYPE_NO_SUBSETTING
+
+ If this bit is set, the font may not be subsetted prior to embedding.
+
+
+.. data:: FT_FSTYPE_BITMAP_EMBEDDING_ONLY
+
+ If this bit is set, only bitmaps contained in the font may be embedded;
no
+ outline data may be embedded. If there are no bitmaps available in the
font,
+ then the font is unembeddable.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_glyph_bbox_modes.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,25 @@
+FT_GLYPH_BBOX_MODES
+===================
+
+The mode how the values of FT_Glyph_Get_CBox are returned.
+
+.. data:: FT_GLYPH_BBOX_UNSCALED
+
+ Return unscaled font units.
+
+.. data:: FT_GLYPH_BBOX_SUBPIXELS
+
+ Return unfitted 26.6 coordinates.
+
+.. data:: FT_GLYPH_BBOX_GRIDFIT
+
+ Return grid-fitted 26.6 coordinates.
+
+.. data:: FT_GLYPH_BBOX_TRUNCATE
+
+ Return coordinates in integer pixels.
+
+.. data:: FT_GLYPH_BBOX_PIXELS
+
+ Return grid-fitted pixel coordinates.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_glyph_formats.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,36 @@
+FT_GLYPH_FORMATS
+================
+
+An enumeration type used to describe the format of a given glyph image.
Note
+that this version of FreeType only supports two image formats, even though
+future font drivers will be able to register their own format.
+
+.. data:: FT_GLYPH_FORMAT_NONE
+
+ The value 0 is reserved.
+
+.. data:: FT_GLYPH_FORMAT_COMPOSITE
+
+ The glyph image is a composite of several other images. This format is
only
+ used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like
+ accented characters).
+
+.. data:: FT_GLYPH_FORMAT_BITMAP
+
+ The glyph image is a bitmap, and can be described as an FT_Bitmap. You
+ generally need to access the 'bitmap' field of the FT_GlyphSlotRec
structure
+ to read it.
+
+.. data:: FT_GLYPH_FORMAT_OUTLINE
+
+ The glyph image is a vectorial outline made of line segments and Bezier
arcs;
+ it can be described as an FT_Outline; you generally want to access the
+ 'outline' field of the FT_GlyphSlotRec structure to read it.
+
+.. data:: FT_GLYPH_FORMAT_PLOTTER
+
+ The glyph image is a vectorial path with no inside and outside contours.
Some
+ Type 1 fonts, like those in the Hershey family, contain glyphs in this
+ format. These are described as FT_Outline, but FreeType isn't currently
+ capable of rendering them correctly.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_kerning_modes.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,21 @@
+FT_KERNING_MODES
+================
+
+An enumeration used to specify which kerning values to return in
+.. data:: FT_Get_Kerning.
+
+
+.. data:: FT_KERNING_DEFAULT
+
+ Return scaled and grid-fitted kerning distances (value is 0).
+
+
+.. data:: FT_KERNING_UNFITTED
+
+ Return scaled but un-grid-fitted kerning distances.
+
+
+.. data:: FT_KERNING_UNSCALED
+
+ Return the kerning vector in original font units.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_lcd_filters.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,36 @@
+FT_LCD_FILTERS
+==============
+
+A list of values to identify various types of LCD filters.
+
+
+.. data:: FT_LCD_FILTER_NONE
+
+ Do not perform filtering. When used with subpixel rendering, this
results in
+ sometimes severe color fringes.
+
+
+.. data:: FT_LCD_FILTER_DEFAULT
+
+ The default filter reduces color fringes considerably, at the cost of a
+ slight blurriness in the output.
+
+
+.. data:: FT_LCD_FILTER_LIGHT
+
+ The light filter is a variant that produces less blurriness at the cost
of
+ slightly more color fringes than the default one. It might be better,
+ depending on taste, your monitor, or your personal vision.
+
+
+.. data:: FT_LCD_FILTER_LEGACY
+
+ This filter corresponds to the original libXft color filter. It provides
high
+ contrast output but can exhibit really bad color fringes if glyphs are
not
+ extremely well hinted to the pixel grid. In other words, it only works
well
+ if the TrueType bytecode interpreter is enabled and high-quality hinted
fonts
+ are used.
+
+ This filter is only provided for comparison purposes, and might be
disabled
+ or stay unsupported in the future.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_load_flags.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,131 @@
+FT_LOAD_FLAGS
+=============
+
+A list of bit-field constants used with FT_Load_Glyph to indicate what kind
+of operations to perform during glyph loading.
+
+
+.. data:: FT_LOAD_DEFAULT
+
+ Corresponding to 0, this value is used as the default glyph load
+ operation. In this case, the following happens:
+
+ 1. FreeType looks for a bitmap for the glyph corresponding to the face's
+ current size. If one is found, the function returns. The bitmap data
can
+ be accessed from the glyph slot (see note below).
+
+ 2. If no embedded bitmap is searched or found, FreeType looks for a
scalable
+ outline. If one is found, it is loaded from the font file, scaled to
+ device pixels, then 'hinted' to the pixel grid in order to optimize
+ it. The outline data can be accessed from the glyph slot (see note
below).
+
+ Note that by default, the glyph loader doesn't render outlines into
+ bitmaps. The following flags are used to modify this default behaviour to
+ more specific and useful cases.
+
+
+.. data:: FT_LOAD_NO_SCALE
+
+ Don't scale the outline glyph loaded, but keep it in font units.
+
+ This flag implies FT_LOAD_NO_HINTING and FT_LOAD_NO_BITMAP, and unsets
+ FT_LOAD_RENDER.
+
+
+.. data:: FT_LOAD_NO_HINTING
+
+ Disable hinting. This generally generates 'blurrier' bitmap glyph when
the
+ glyph is rendered in any of the anti-aliased modes. See also the note
below.
+
+ This flag is implied by FT_LOAD_NO_SCALE.
+
+
+.. data:: FT_LOAD_RENDER
+
+ Call FT_Render_Glyph after the glyph is loaded. By default, the glyph is
+ rendered in FT_RENDER_MODE_NORMAL mode. This can be overridden by
+ FT_LOAD_TARGET_XXX or FT_LOAD_MONOCHROME.
+
+ This flag is unset by FT_LOAD_NO_SCALE.
+
+
+.. data:: FT_LOAD_NO_BITMAP
+
+ Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.
+
+ FT_LOAD_NO_SCALE always sets this flag.
+
+
+.. data:: FT_LOAD_VERTICAL_LAYOUT
+
+ Load the glyph for vertical text layout. Don't use it as it is
problematic
+ currently.
+
+
+.. data:: FT_LOAD_FORCE_AUTOHINT
+
+ Indicates that the auto-hinter is preferred over the font's native
+ hinter. See also the note below.
+
+
+.. data:: FT_LOAD_CROP_BITMAP
+
+ Indicates that the font driver should crop the loaded bitmap glyph (i.e.,
+ remove all space around its black bits). Not all drivers implement this.
+
+
+.. data:: FT_LOAD_PEDANTIC
+
+ Indicates that the font driver should perform pedantic verifications
during
+ glyph loading. This is mostly used to detect broken glyphs in fonts. By
+ default, FreeType tries to handle broken fonts also.
+
+
+.. data:: FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH
+
+ Indicates that the font driver should ignore the global advance width
defined
+ in the font. By default, that value is used as the advance width for all
+ glyphs when the face has FT_FACE_FLAG_FIXED_WIDTH set.
+
+ This flag exists for historical reasons (to support buggy CJK fonts).
+
+
+.. data:: FT_LOAD_NO_RECURSE
+
+ This flag is only used internally. It merely indicates that the font
driver
+ should not load composite glyphs recursively. Instead, it should set the
+ 'num_subglyph' and 'subglyphs' values of the glyph slot accordingly, and
set
+ 'glyph->format' to FT_GLYPH_FORMAT_COMPOSITE.
+
+ The description of sub-glyphs is not available to client applications
for now.
+
+ This flag implies FT_LOAD_NO_SCALE and FT_LOAD_IGNORE_TRANSFORM.
+
+
+.. data:: FT_LOAD_IGNORE_TRANSFORM
+
+ Indicates that the transform matrix set by FT_Set_Transform should be
ignored.
+
+
+.. data:: FT_LOAD_MONOCHROME
+
+ This flag is used with FT_LOAD_RENDER to indicate that you want to
render an
+ outline glyph to a 1-bit monochrome bitmap glyph, with 8 pixels packed
into
+ each byte of the bitmap data.
+
+ Note that this has no effect on the hinting algorithm used. You should
rather
+ use FT_LOAD_TARGET_MONO so that the monochrome-optimized hinting
algorithm is
+ used.
+
+
+.. data:: FT_LOAD_LINEAR_DESIGN
+
+ Indicates that the 'linearHoriAdvance' and 'linearVertAdvance' fields of
+ FT_GlyphSlotRec should be kept in font units. See FT_GlyphSlotRec for
+ details.
+
+
+.. data:: FT_LOAD_NO_AUTOHINT
+
+ Disable auto-hinter. See also the note below.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_load_targets.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,48 @@
+FT_LOAD_TARGETS
+===============
+
+A list of values that are used to select a specific hinting algorithm to
use
+by the hinter. You should OR one of these values to your 'load_flags' when
+calling FT_Load_Glyph.
+
+Note that font's native hinters may ignore the hinting algorithm you have
+specified (e.g., the TrueType bytecode interpreter). You can set
+.. data:: FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
+
+Also note that FT_LOAD_TARGET_LIGHT is an exception, in that it always
+implies FT_LOAD_FORCE_AUTOHINT.
+
+
+.. data:: FT_LOAD_TARGET_NORMAL
+
+ This corresponds to the default hinting algorithm, optimized for standard
+ gray-level rendering. For monochrome output, use FT_LOAD_TARGET_MONO
instead.
+
+
+.. data:: FT_LOAD_TARGET_LIGHT
+
+ A lighter hinting algorithm for non-monochrome modes. Many generated
glyphs
+ are more fuzzy but better resemble its original shape. A bit like
rendering
+ on Mac OS X.
+
+ As a special exception, this target implies FT_LOAD_FORCE_AUTOHINT.
+
+
+.. data:: FT_LOAD_TARGET_MONO
+
+ Strong hinting algorithm that should only be used for monochrome output.
The
+ result is probably unpleasant if the glyph is rendered in non-monochrome
+ modes.
+
+
+.. data:: FT_LOAD_TARGET_LCD
+
+ A variant of FT_LOAD_TARGET_NORMAL optimized for horizontally decimated
LCD
+ displays.
+
+
+.. data:: FT_LOAD_TARGET_LCD_V
+
+ A variant of FT_LOAD_TARGET_NORMAL optimized for vertically decimated LCD
+ displays.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_open_modes.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,31 @@
+FT_OPEN_MODES
+=============
+
+A list of bit-field constants used within the 'flags' field of the
+.. data:: FT_Open_Args structure.
+
+
+.. data:: FT_OPEN_MEMORY
+
+ This is a memory-based stream.
+
+
+.. data:: FT_OPEN_STREAM
+
+ Copy the stream from the 'stream' field.
+
+
+.. data:: FT_OPEN_PATHNAME
+
+ Create a new input stream from a C path name.
+
+
+.. data:: FT_OPEN_DRIVER
+
+ Use the 'driver' field.
+
+
+.. data:: FT_OPEN_PARAMS
+
+ Use the 'num_params' and 'params' fields.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_outline_flags.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,69 @@
+FT_OUTLINE_FLAGS
+================
+
+A list of bit-field constants use for the flags in an outline's 'flags'
+field.
+
+
+.. data:: FT_OUTLINE_NONE
+
+ Value 0 is reserved.
+
+
+.. data:: FT_OUTLINE_OWNER
+
+ If set, this flag indicates that the outline's field arrays
(i.e., 'points',
+ 'flags', and 'contours') are 'owned' by the outline object, and should
thus
+ be freed when it is destroyed.
+
+
+.. data:: FT_OUTLINE_EVEN_ODD_FILL
+
+ By default, outlines are filled using the non-zero winding rule. If set
to 1,
+ the outline will be filled using the even-odd fill rule (only works with
the
+ smooth rasterizer).
+
+
+.. data:: FT_OUTLINE_REVERSE_FILL
+
+ By default, outside contours of an outline are oriented in clock-wise
+ direction, as defined in the TrueType specification. This flag is set if
the
+ outline uses the opposite direction (typically for Type 1 fonts). This
flag
+ is ignored by the scan converter.
+
+
+.. data:: FT_OUTLINE_IGNORE_DROPOUTS
+
+ By default, the scan converter will try to detect drop-outs in an
outline and
+ correct the glyph bitmap to ensure consistent shape continuity. If set,
this
+ flag hints the scan-line converter to ignore such cases. See below for
more
+ information.
+
+
+.. data:: FT_OUTLINE_SMART_DROPOUTS
+
+ Select smart dropout control. If unset, use simple dropout control.
Ignored
+ if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.
+
+
+.. data:: FT_OUTLINE_INCLUDE_STUBS
+
+ If set, turn pixels on for 'stubs', otherwise exclude them. Ignored if
+ FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.
+
+
+.. data:: FT_OUTLINE_HIGH_PRECISION
+
+ This flag indicates that the scan-line converter should try to convert
this
+ outline to bitmaps with the highest possible quality. It is typically
set for
+ small character sizes. Note that this is only a hint that might be
completely
+ ignored by a given scan-converter.
+
+
+.. data:: FT_OUTLINE_SINGLE_PASS
+
+ This flag is set to force a given scan-converter to only use a single
pass
+ over the outline to render a bitmap glyph image. Normally, it is set for
very
+ large character sizes. It is only a hint that might be completely
ignored by
+ a given scan-converter.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_pixel_modes.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,55 @@
+FT_PIXEL_MODES
+==============
+
+An enumeration type that lists the render modes supported by FreeType 2.
Each
+mode corresponds to a specific type of scanline conversion performed on the
+outline.
+
+
+.. data:: FT_PIXEL_MODE_NONE
+
+ Value 0 is reserved.
+
+
+.. data:: FT_PIXEL_MODE_MONO
+
+ A monochrome bitmap, using 1 bit per pixel. Note that pixels are stored
in
+ most-significant order (MSB), which means that the left-most pixel in a
byte
+ has value 128.
+
+
+.. data:: FT_PIXEL_MODE_GRAY
+
+ An 8-bit bitmap, generally used to represent anti-aliased glyph images.
Each
+ pixel is stored in one byte. Note that the number of 'gray' levels is
stored
+ in the 'num_grays' field of the FT_Bitmap structure (it generally is
256).
+
+
+.. data:: FT_PIXEL_MODE_GRAY2
+
+ A 2-bit per pixel bitmap, used to represent embedded anti-aliased
bitmaps in
+ font files according to the OpenType specification. We haven't found a
single
+ font using this format, however.
+
+
+.. data:: FT_PIXEL_MODE_GRAY4
+
+ A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in
font
+ files according to the OpenType specification. We haven't found a single
font
+ using this format, however.
+
+
+.. data:: FT_PIXEL_MODE_LCD
+
+ An 8-bit bitmap, representing RGB or BGR decimated glyph images used for
+ display on LCD displays; the bitmap is three times wider than the
original
+ glyph image. See also FT_RENDER_MODE_LCD.
+
+
+.. data:: FT_PIXEL_MODE_LCD_V
+
+ An 8-bit bitmap, representing RGB or BGR decimated glyph images used for
+ display on rotated LCD displays; the bitmap is three times taller than
the
+ original glyph image. See also FT_RENDER_MODE_LCD_V.
+
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_render_modes.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,45 @@
+FT_RENDER_MODES
+===============
+
+An enumeration type that lists the render modes supported by FreeType 2.
Each
+mode corresponds to a specific type of scanline conversion performed on the
+outline.
+
+For bitmap fonts and embedded bitmaps the 'bitmap->pixel_mode' field in the
+.. data:: FT_GlyphSlotRec structure gives the format of the returned
bitmap.
+
+All modes except FT_RENDER_MODE_MONO use 256 levels of opacity.
+
+
+.. data:: FT_RENDER_MODE_NORMAL
+
+ This is the default render mode; it corresponds to 8-bit anti-aliased
+ bitmaps.
+
+
+.. data:: FT_RENDER_MODE_LIGHT
+
+ This is equivalent to FT_RENDER_MODE_NORMAL. It is only defined as a
separate
+ value because render modes are also used indirectly to define hinting
+ algorithm selectors. See FT_LOAD_TARGET_XXX for details.
+
+
+.. data:: FT_RENDER_MODE_MONO
+
+ This mode corresponds to 1-bit bitmaps (with 2 levels of opacity).
+
+
+.. data:: FT_RENDER_MODE_LCD
+
+ This mode corresponds to horizontal RGB and BGR sub-pixel displays like
LCD
+ screens. It produces 8-bit bitmaps that are 3 times the width of the
original
+ glyph outline in pixels, and which use the FT_PIXEL_MODE_LCD mode.
+
+
+.. data:: FT_RENDER_MODE_LCD_V
+
+ This mode corresponds to vertical RGB and BGR sub-pixel displays (like
PDA
+ screens, rotated LCD displays, etc.). It produces 8-bit bitmaps that are
3
+ times the height of the original glyph outline in pixels and use the
+ FT_PIXEL_MODE_LCD_V mode.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_stroker_borders.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,27 @@
+FT_STROKER_BORDERS
+==================
+
+These values are used to select a given stroke border in
+.. data:: FT_Stroker_GetBorderCounts and FT_Stroker_ExportBorder.
+
+
+.. data:: FT_STROKER_BORDER_LEFT
+
+ Select the left border, relative to the drawing direction.
+
+
+.. data:: FT_STROKER_BORDER_RIGHT
+
+ Select the right border, relative to the drawing direction.
+
+
+Note
+
+ Applications are generally interested in the 'inside' and 'outside'
+ borders. However, there is no direct mapping between these and
the 'left' and
+ 'right' ones, since this really depends on the glyph's drawing
orientation,
+ which varies between font formats.
+
+ You can however use FT_Outline_GetInsideBorder and
+ FT_Outline_GetOutsideBorder to get these.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_stroker_linecaps.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,21 @@
+FT_STROKER_LINECAPS
+===================
+
+These values determine how the end of opened sub-paths are rendered in a
+stroke.
+
+
+.. data:: FT_STROKER_LINECAP_BUTT
+
+ The end of lines is rendered as a full stop on the last point itself.
+
+
+.. data:: FT_STROKER_LINECAP_ROUND
+
+ The end of lines is rendered as a half-circle around the last point.
+
+
+.. data:: FT_STROKER_LINECAP_SQUARE
+
+ The end of lines is rendered as a square around the last point.
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_stroker_linejoins.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,24 @@
+FT_STROKER_LINEJOINS
+====================
+
+These values determine how two joining lines are rendered in a stroker.
+
+
+.. data:: FT_STROKER_LINEJOIN_ROUND
+
+ Used to render rounded line joins. Circular arcs are used to join two
lines
+ smoothly.
+
+
+.. data:: FT_STROKER_LINEJOIN_BEVEL
+
+ Used to render beveled line joins; i.e., the two joining lines are
extended
+ until they intersect.
+
+
+.. data:: FT_STROKER_LINEJOIN_MITER
+
+ Same as beveled rendering, except that an additional line break is added
if
+ the angle between the two joining lines is too closed (this is useful to
+ avoid unpleasant spikes in beveled rendering).
+
=======================================
--- /dev/null
+++ /trunk/doc/ft_style_flags.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,16 @@
+FT_STYLE_FLAGS
+==============
+
+A list of bit-flags used to indicate the style of a given face. These are
+used in the 'style_flags' field of FT_FaceRec.
+
+
+.. data:: FT_STYLE_FLAG_ITALIC
+
+ Indicates that a given face style is italic or oblique.
+
+
+.. data:: FT_STYLE_FLAG_BOLD
+
+ Indicates that a given face is bold.
+
=======================================
--- /dev/null
+++ /trunk/doc/glyph.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Glyph
+=====
+.. autoclass:: Glyph
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/glyph_slot.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Glyph slot
+==========
+.. autoclass:: GlyphSlot
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/index.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,34 @@
+.. Freetype/Python documentation master file, created by
+ sphinx-quickstart on Wed Nov 9 16:29:54 2011.
+ You can adapt this file completely to your liking, but it should at
least
+ contain the root `toctree` directive.
+
+Welcome to Freetype/Python's documentation!
+===========================================
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ face.rst
+ bbox.rst
+ size_metrics.rst
+ bitmap_size.rst
+ bitmap.rst
+ charmap.rst
+ outline.rst
+ glyph.rst
+ bitmap_glyph.rst
+ glyph_slot.rst
+ sfnt_name.rst
+ stroker.rst
+ constants.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
=======================================
--- /dev/null
+++ /trunk/doc/make.bat Tue Jun 26 06:24:11 2012
@@ -0,0 +1,170 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or
PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. changes to make an overview over all changed/added/deprecated
items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if
enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\FreetypePython.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\FreetypePython.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
=======================================
--- /dev/null
+++ /trunk/doc/make_enums.py Tue Jun 26 06:24:11 2012
@@ -0,0 +1,48 @@
+import freetype
+
+enums = [
+ 'ft_fstypes',
+ 'ft_face_flags',
+ 'ft_encodings',
+ 'ft_glyph_bbox_modes',
+ 'ft_glyph_formats',
+ 'ft_kerning_modes',
+ 'ft_lcd_filters',
+ 'ft_load_flags',
+ 'ft_load_targets',
+ 'ft_open_modes',
+ 'ft_outline_flags',
+ 'ft_pixel_modes',
+ 'ft_render_modes',
+ 'ft_stroker_borders',
+ 'ft_stroker_linecaps',
+ 'ft_stroker_linejoins',
+ 'ft_style_flags',
+ 'tt_adobe_ids',
+ 'tt_apple_ids',
+ 'tt_mac_ids',
+ 'tt_ms_ids',
+ 'tt_ms_langids',
+ 'tt_mac_langids',
+ 'tt_name_ids',
+ 'tt_platforms'
+]
+
+for name in enums:
+ print name
+ module = getattr(freetype, name)
+ doc = getattr(module, '__doc__')
+ doc = doc.split('\n')
+ file = open( name+'.rst', 'w')
+
+ title = name.upper()
+ file.write(title+'\n')
+ file.write('='*len(title)+'\n')
+
+ for line in doc:
+ if line.startswith('FT_') or line.startswith('TT_'):
+ file.write( '.. data:: '+ line + '\n')
+ else:
+ file.write( line + '\n')
+ file.close()
+
=======================================
--- /dev/null
+++ /trunk/doc/outline.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Outline
+=======
+.. autoclass:: Outline
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/sfnt_name.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+SFNT name
+==========
+.. autoclass:: SfntName
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/size_metrics.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Size Metrics
+============
+.. autoclass:: SizeMetrics
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/stroker.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,6 @@
+.. currentmodule:: freetype
+
+Stroker
+=======
+.. autoclass:: Stroker
+ :members:
=======================================
--- /dev/null
+++ /trunk/doc/tt_adobe_ids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,25 @@
+TT_ADOBE_IDS
+============
+
+A list of valid values for the 'encoding_id' for TT_PLATFORM_ADOBE
+charmaps. This is a FreeType-specific extension!
+
+.. data:: TT_ADOBE_ID_STANDARD
+
+ Adobe standard encoding.
+
+
+.. data:: TT_ADOBE_ID_EXPERT
+
+ Adobe expert encoding.
+
+
+.. data:: TT_ADOBE_ID_CUSTOM
+
+ Adobe custom encoding.
+
+
+.. data:: TT_ADOBE_ID_LATIN_1
+
+ Adobe Latin 1 encoding.
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_apple_ids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,37 @@
+TT_APPLE_IDS
+============
+
+A list of valid values for the 'encoding_id' for TT_PLATFORM_APPLE_UNICODE
+charmaps and name entries.
+
+
+.. data:: TT_APPLE_ID_DEFAULT
+
+ Unicode version 1.0.
+
+
+.. data:: TT_APPLE_ID_UNICODE_1_1
+
+ Unicode 1.1; specifies Hangul characters starting at U+34xx.
+
+
+.. data:: TT_APPLE_ID_ISO_10646
+
+ Deprecated (identical to preceding).
+
+
+.. data:: TT_APPLE_ID_UNICODE_2_0
+
+ Unicode 2.0 and beyond (UTF-16 BMP only).
+
+
+.. data:: TT_APPLE_ID_UNICODE_32
+
+ Unicode 3.1 and beyond, using UTF-32.
+
+
+.. data:: TT_APPLE_ID_VARIANT_SELECTOR
+
+ From Adobe, not Apple. Not a normal cmap. Specifies variations on a real
+ cmap.
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_mac_ids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,74 @@
+TT_MAC_IDS
+==========
+
+A list of valid values for the 'encoding_id' for TT_PLATFORM_MACINTOSH
+charmaps and name entries.
+
+.. data:: TT_MAC_ID_ROMAN
+
+.. data:: TT_MAC_ID_TELUGU
+
+.. data:: TT_MAC_ID_GURMUKHI
+
+.. data:: TT_MAC_ID_TIBETAN
+
+.. data:: TT_MAC_ID_SIMPLIFIED_CHINESE
+
+.. data:: TT_MAC_ID_SINDHI
+
+.. data:: TT_MAC_ID_SINHALESE
+
+.. data:: TT_MAC_ID_RUSSIAN
+
+.. data:: TT_MAC_ID_KANNADA
+
+.. data:: TT_MAC_ID_VIETNAMESE
+
+.. data:: TT_MAC_ID_MONGOLIAN
+
+.. data:: TT_MAC_ID_DEVANAGARI
+
+.. data:: TT_MAC_ID_HEBREW
+
+.. data:: TT_MAC_ID_TAMIL
+
+.. data:: TT_MAC_ID_THAI
+
+.. data:: TT_MAC_ID_BURMESE
+
+.. data:: TT_MAC_ID_MALDIVIAN
+
+.. data:: TT_MAC_ID_TRADITIONAL_CHINESE
+
+.. data:: TT_MAC_ID_JAPANESE
+
+.. data:: TT_MAC_ID_GREEK
+
+.. data:: TT_MAC_ID_LAOTIAN
+
+.. data:: TT_MAC_ID_KHMER
+
+.. data:: TT_MAC_ID_UNINTERP
+
+.. data:: TT_MAC_ID_ORIYA
+
+.. data:: TT_MAC_ID_RSYMBOL
+
+.. data:: TT_MAC_ID_MALAYALAM
+
+.. data:: TT_MAC_ID_GEEZ
+
+.. data:: TT_MAC_ID_KOREAN
+
+.. data:: TT_MAC_ID_GUJARATI
+
+.. data:: TT_MAC_ID_BENGALI
+
+.. data:: TT_MAC_ID_ARABIC
+
+.. data:: TT_MAC_ID_GEORGIAN
+
+.. data:: TT_MAC_ID_ARMENIAN
+
+.. data:: TT_MAC_ID_SLAVIC
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_mac_langids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,246 @@
+TT_MAC_LANGIDS
+==============
+
+Possible values of the language identifier field in the name records of the
+TTF 'name' table if the 'platform' identifier code is
TT_PLATFORM_MACINTOSH.
+
+.. data:: TT_MAC_LANGID_LATIN
+
+.. data:: TT_MAC_LANGID_MALAY_ARABIC_SCRIPT
+
+.. data:: TT_MAC_LANGID_HINDI
+
+.. data:: TT_MAC_LANGID_CATALAN
+
+.. data:: TT_MAC_LANGID_MARATHI
+
+.. data:: TT_MAC_LANGID_ICELANDIC
+
+.. data:: TT_MAC_LANGID_ARABIC
+
+.. data:: TT_MAC_LANGID_SWAHILI
+
+.. data:: TT_MAC_LANGID_KHMER
+
+.. data:: TT_MAC_LANGID_UKRAINIAN
+
+.. data:: TT_MAC_LANGID_FINNISH
+
+.. data:: TT_MAC_LANGID_POLISH
+
+.. data:: TT_MAC_LANGID_NEPALI
+
+.. data:: TT_MAC_LANGID_UZBEK
+
+.. data:: TT_MAC_LANGID_TELUGU
+
+.. data:: TT_MAC_LANGID_MALTESE
+
+.. data:: TT_MAC_LANGID_AFRIKAANS
+
+.. data:: TT_MAC_LANGID_CHEWA
+
+.. data:: TT_MAC_LANGID_BASQUE
+
+.. data:: TT_MAC_LANGID_CZECH
+
+.. data:: TT_MAC_LANGID_ROMANIAN
+
+.. data:: TT_MAC_LANGID_QUECHUA
+
+.. data:: TT_MAC_LANGID_TAGALOG
+
+.. data:: TT_MAC_LANGID_HUNGARIAN
+
+.. data:: TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT
+
+.. data:: TT_MAC_LANGID_TONGAN
+
+.. data:: TT_MAC_LANGID_SUNDANESE
+
+.. data:: TT_MAC_LANGID_JAPANESE
+
+.. data:: TT_MAC_LANGID_MONGOLIAN
+
+.. data:: TT_MAC_LANGID_ALBANIAN
+
+.. data:: TT_MAC_LANGID_NORWEGIAN
+
+.. data:: TT_MAC_LANGID_SLOVAK
+
+.. data:: TT_MAC_LANGID_MALAGASY
+
+.. data:: TT_MAC_LANGID_DZONGKHA
+
+.. data:: TT_MAC_LANGID_DUTCH
+
+.. data:: TT_MAC_LANGID_MALAY_ROMAN_SCRIPT
+
+.. data:: TT_MAC_LANGID_SERBIAN
+
+.. data:: TT_MAC_LANGID_GERMAN
+
+.. data:: TT_MAC_LANGID_SOMALI
+
+.. data:: TT_MAC_LANGID_KOREAN
+
+.. data:: TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT
+
+.. data:: TT_MAC_LANGID_CROATIAN
+
+.. data:: TT_MAC_LANGID_TURKISH
+
+.. data:: TT_MAC_LANGID_MOLDAVIAN
+
+.. data:: TT_MAC_LANGID_LAO
+
+.. data:: TT_MAC_LANGID_ORIYA
+
+.. data:: TT_MAC_LANGID_BRETON
+
+.. data:: TT_MAC_LANGID_PASHTO
+
+.. data:: TT_MAC_LANGID_GUARANI
+
+.. data:: TT_MAC_LANGID_HEBREW
+
+.. data:: TT_MAC_LANGID_SLOVENIAN
+
+.. data:: TT_MAC_LANGID_ESTONIAN
+
+.. data:: TT_MAC_LANGID_RUNDI
+
+.. data:: TT_MAC_LANGID_URDU
+
+.. data:: TT_MAC_LANGID_CHINESE_TRADITIONAL
+
+.. data:: TT_MAC_LANGID_TATAR
+
+.. data:: TT_MAC_LANGID_CHINESE_SIMPLIFIED
+
+.. data:: TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT
+
+.. data:: TT_MAC_LANGID_SANSKRIT
+
+.. data:: TT_MAC_LANGID_KURDISH
+
+.. data:: TT_MAC_LANGID_FAEROESE
+
+.. data:: TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT
+
+.. data:: TT_MAC_LANGID_TIGRINYA
+
+.. data:: TT_MAC_LANGID_THAI
+
+.. data:: TT_MAC_LANGID_DANISH
+
+.. data:: TT_MAC_LANGID_KAZAKH
+
+.. data:: TT_MAC_LANGID_YIDDISH
+
+.. data:: TT_MAC_LANGID_ESPERANTO
+
+.. data:: TT_MAC_LANGID_LITHUANIAN
+
+.. data:: TT_MAC_LANGID_FARSI
+
+.. data:: TT_MAC_LANGID_LETTISH
+
+.. data:: TT_MAC_LANGID_VIETNAMESE
+
+.. data:: TT_MAC_LANGID_PORTUGUESE
+
+.. data:: TT_MAC_LANGID_IRISH
+
+.. data:: TT_MAC_LANGID_WELSH
+
+.. data:: TT_MAC_LANGID_PUNJABI
+
+.. data:: TT_MAC_LANGID_GREEK
+
+.. data:: TT_MAC_LANGID_INUKTITUT
+
+.. data:: TT_MAC_LANGID_FRENCH
+
+.. data:: TT_MAC_LANGID_GREEK_POLYTONIC
+
+.. data:: TT_MAC_LANGID_AZERBAIJANI
+
+.. data:: TT_MAC_LANGID_JAVANESE
+
+.. data:: TT_MAC_LANGID_SWEDISH
+
+.. data:: TT_MAC_LANGID_UIGHUR
+
+.. data:: TT_MAC_LANGID_BENGALI
+
+.. data:: TT_MAC_LANGID_RUANDA
+
+.. data:: TT_MAC_LANGID_SINDHI
+
+.. data:: TT_MAC_LANGID_TIBETAN
+
+.. data:: TT_MAC_LANGID_ENGLISH
+
+.. data:: TT_MAC_LANGID_SAAMISK
+
+.. data:: TT_MAC_LANGID_INDONESIAN
+
+.. data:: TT_MAC_LANGID_MANX_GAELIC
+
+.. data:: TT_MAC_LANGID_BYELORUSSIAN
+
+.. data:: TT_MAC_LANGID_BULGARIAN
+
+.. data:: TT_MAC_LANGID_GEORGIAN
+
+.. data:: TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT
+
+.. data:: TT_MAC_LANGID_ITALIAN
+
+.. data:: TT_MAC_LANGID_SCOTTISH_GAELIC
+
+.. data:: TT_MAC_LANGID_ARMENIAN
+
+.. data:: TT_MAC_LANGID_GALLA
+
+.. data:: TT_MAC_LANGID_MACEDONIAN
+
+.. data:: TT_MAC_LANGID_IRISH_GAELIC
+
+.. data:: TT_MAC_LANGID_KIRGHIZ
+
+.. data:: TT_MAC_LANGID_TAMIL
+
+.. data:: TT_MAC_LANGID_SPANISH
+
+.. data:: TT_MAC_LANGID_BURMESE
+
+.. data:: TT_MAC_LANGID_KANNADA
+
+.. data:: TT_MAC_LANGID_GALICIAN
+
+.. data:: TT_MAC_LANGID_FLEMISH
+
+.. data:: TT_MAC_LANGID_TAJIKI
+
+.. data:: TT_MAC_LANGID_ASSAMESE
+
+.. data:: TT_MAC_LANGID_SINHALESE
+
+.. data:: TT_MAC_LANGID_GREELANDIC
+
+.. data:: TT_MAC_LANGID_AMHARIC
+
+.. data:: TT_MAC_LANGID_KASHMIRI
+
+.. data:: TT_MAC_LANGID_AYMARA
+
+.. data:: TT_MAC_LANGID_GUJARATI
+
+.. data:: TT_MAC_LANGID_RUSSIAN
+
+.. data:: TT_MAC_LANGID_TURKMEN
+
+.. data:: TT_MAC_LANGID_MALAYALAM
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_ms_ids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,49 @@
+TT_MS_IDS
+=========
+
+A list of valid values for the 'encoding_id' for TT_PLATFORM_MICROSOFT
+charmaps and name entries.
+
+
+.. data:: TT_MS_ID_SYMBOL_CS
+
+ Corresponds to Microsoft symbol encoding. See FT_ENCODING_MS_SYMBOL.
+
+
+.. data:: TT_MS_ID_UNICODE_CS
+
+ Corresponds to a Microsoft WGL4 charmap, matching Unicode. See
+ FT_ENCODING_UNICODE.
+
+
+.. data:: TT_MS_ID_SJIS
+
+ Corresponds to SJIS Japanese encoding. See FT_ENCODING_SJIS.
+
+
+.. data:: TT_MS_ID_GB2312
+
+ Corresponds to Simplified Chinese as used in Mainland China. See
+ FT_ENCODING_GB2312.
+
+
+.. data:: TT_MS_ID_BIG_5
+
+ Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See
+ FT_ENCODING_BIG5.
+
+
+.. data:: TT_MS_ID_WANSUNG
+
+ Corresponds to Korean Wansung encoding. See FT_ENCODING_WANSUNG.
+
+.. data:: TT_MS_ID_JOHAB
+
+ Corresponds to Johab encoding. See FT_ENCODING_JOHAB.
+
+
+.. data:: TT_MS_ID_UCS_4
+
+ Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the
OpenType
+ specification version 1.4 (mid-2001.)
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_ms_langids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,496 @@
+TT_MS_LANGIDS
+=============
+
+Possible values of the language identifier field in the name records of the
+TTF 'name' table if the 'platform' identifier code is
TT_PLATFORM_MICROSOFT.
+
+.. data:: TT_MS_LANGID_SANSKRIT_INDIA
+
+.. data:: TT_MS_LANGID_ENGLISH_UNITED_KINGDOM
+
+.. data:: TT_MS_LANGID_ENGLISH_BELIZE
+
+.. data:: TT_MS_LANGID_ARABIC_LEBANON
+
+.. data:: TT_MS_LANGID_MOLDAVIAN_MOLDAVIA
+
+.. data:: TT_MS_LANGID_TURKISH_TURKEY
+
+.. data:: TT_MS_LANGID_WELSH_WALES
+
+.. data:: TT_MS_LANGID_GERMAN_AUSTRIA
+
+.. data:: TT_MS_LANGID_DUTCH_BELGIUM
+
+.. data:: TT_MS_LANGID_YI_CHINA
+
+.. data:: TT_MS_LANGID_QUECHUA_ECUADOR
+
+.. data:: TT_MS_LANGID_SPANISH_EL_SALVADOR
+
+.. data:: TT_MS_LANGID_SWAHILI_KENYA
+
+.. data:: TT_MS_LANGID_QUECHUA_BOLIVIA
+
+.. data:: TT_MS_LANGID_SLOVENE_SLOVENIA
+
+.. data:: TT_MS_LANGID_ORIYA_INDIA
+
+.. data:: TT_MS_LANGID_FARSI_IRAN
+
+.. data:: TT_MS_LANGID_ENGLISH_CANADA
+
+.. data:: TT_MS_LANGID_NEPALI_NEPAL
+
+.. data:: TT_MS_LANGID_DHIVEHI_MALDIVES
+
+.. data:: TT_MS_LANGID_GERMAN_LIECHTENSTEI
+
+.. data:: TT_MS_LANGID_TAMIL_INDIA
+
+.. data:: TT_MS_LANGID_ARABIC_UAE
+
+.. data:: TT_MS_LANGID_JAPANESE_JAPAN
+
+.. data:: TT_MS_LANGID_TAMAZIGHT_MOROCCO
+
+.. data:: TT_MS_LANGID_FRENCH_FRANCE
+
+.. data:: TT_MS_LANGID_CHINESE_MACAU
+
+.. data:: TT_MS_LANGID_VIETNAMESE_VIET_NAM
+
+.. data:: TT_MS_LANGID_HEBREW_ISRAEL
+
+.. data:: TT_MS_LANGID_SAMI_NORTHERN_SWEDEN
+
+.. data:: TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN
+
+.. data:: TT_MS_LANGID_SWEDISH_SWEDEN
+
+.. data:: TT_MS_LANGID_FRENCH_REUNION
+
+.. data:: TT_MS_LANGID_ARABIC_BAHRAIN
+
+.. data:: TT_MS_LANGID_ENGLISH_INDIA
+
+.. data:: TT_MS_LANGID_NEPALI_INDIA
+
+.. data:: TT_MS_LANGID_THAI_THAILAND
+
+.. data:: TT_MS_LANGID_ENGLISH_GENERAL
+
+.. data:: TT_MS_LANGID_SAMI_LULE_NORWAY
+
+.. data:: TT_MS_LANGID_ARABIC_OMAN
+
+.. data:: TT_MS_LANGID_SPANISH_HONDURAS
+
+.. data:: TT_MS_LANGID_ENGLISH_JAMAICA
+
+.. data:: TT_MS_LANGID_ESTONIAN_ESTONIA
+
+.. data:: TT_MS_LANGID_FRISIAN_NETHERLANDS
+
+.. data:: TT_MS_LANGID_LATIN
+
+.. data:: TT_MS_LANGID_ENGLISH_INDONESIA
+
+.. data:: TT_MS_LANGID_ENGLISH_IRELAND
+
+.. data:: TT_MS_LANGID_TIBETAN_CHINA
+
+.. data:: TT_MS_LANGID_PUNJABI_INDIA
+
+.. data:: TT_MS_LANGID_FRENCH_MALI
+
+.. data:: TT_MS_LANGID_GERMAN_LUXEMBOURG
+
+.. data:: TT_MS_LANGID_SUTU_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_FRENCH_CAMEROON
+
+.. data:: TT_MS_LANGID_FRENCH_CONGO
+
+.. data:: TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA
+
+.. data:: TT_MS_LANGID_MALAYALAM_INDIA
+
+.. data:: TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN
+
+.. data:: TT_MS_LANGID_CHEROKEE_UNITED_STATES
+
+.. data:: TT_MS_LANGID_SPANISH_GUATEMALA
+
+.. data:: TT_MS_LANGID_CZECH_CZECH_REPUBLIC
+
+.. data:: TT_MS_LANGID_MANIPURI_INDIA
+
+.. data:: TT_MS_LANGID_ENGLISH_AUSTRALIA
+
+.. data:: TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC
+
+.. data:: TT_MS_LANGID_ARABIC_LIBYA
+
+.. data:: TT_MS_LANGID_FRENCH_WEST_INDIES
+
+.. data:: TT_MS_LANGID_ENGLISH_TRINIDAD
+
+.. data:: TT_MS_LANGID_ARABIC_QATAR
+
+.. data:: TT_MS_LANGID_SPANISH_COLOMBIA
+
+.. data:: TT_MS_LANGID_GUARANI_PARAGUAY
+
+.. data:: TT_MS_LANGID_EDO_NIGERIA
+
+.. data:: TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_ENGLISH_HONG_KONG
+
+.. data:: TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA
+
+.. data:: TT_MS_LANGID_TATAR_TATARSTAN
+
+.. data:: TT_MS_LANGID_PASHTO_AFGHANISTAN
+
+.. data:: TT_MS_LANGID_KASHMIRI_PAKISTAN
+
+.. data:: TT_MS_LANGID_GALICIAN_SPAIN
+
+.. data:: TT_MS_LANGID_TAJIK_TAJIKISTAN
+
+.. data:: TT_MS_LANGID_SAMI_INARI_FINLAND
+
+.. data:: TT_MS_LANGID_KASHMIRI_SASIA
+
+.. data:: TT_MS_LANGID_SPANISH_ARGENTINA
+
+.. data:: TT_MS_LANGID_SAMI_SOUTHERN_NORWAY
+
+.. data:: TT_MS_LANGID_CROATIAN_CROATIA
+
+.. data:: TT_MS_LANGID_GUJARATI_INDIA
+
+.. data:: TT_MS_LANGID_TIBETAN_BHUTAN
+
+.. data:: TT_MS_LANGID_TIGRIGNA_ETHIOPIA
+
+.. data:: TT_MS_LANGID_FINNISH_FINLAND
+
+.. data:: TT_MS_LANGID_ENGLISH_UNITED_STATES
+
+.. data:: TT_MS_LANGID_ITALIAN_SWITZERLAND
+
+.. data:: TT_MS_LANGID_ARABIC_EGYPT
+
+.. data:: TT_MS_LANGID_SPANISH_LATIN_AMERICA
+
+.. data:: TT_MS_LANGID_LITHUANIAN_LITHUANIA
+
+.. data:: TT_MS_LANGID_ARABIC_ALGERIA
+
+.. data:: TT_MS_LANGID_MALAY_MALAYSIA
+
+.. data:: TT_MS_LANGID_ARABIC_GENERAL
+
+.. data:: TT_MS_LANGID_CHINESE_PRC
+
+.. data:: TT_MS_LANGID_BENGALI_BANGLADESH
+
+.. data:: TT_MS_LANGID_SPANISH_PERU
+
+.. data:: TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT
+
+.. data:: TT_MS_LANGID_DIVEHI_MALDIVES
+
+.. data:: TT_MS_LANGID_LATVIAN_LATVIA
+
+.. data:: TT_MS_LANGID_TURKMEN_TURKMENISTAN
+
+.. data:: TT_MS_LANGID_XHOSA_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_KHMER_CAMBODIA
+
+.. data:: TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK
+
+.. data:: TT_MS_LANGID_ARABIC_MOROCCO
+
+.. data:: TT_MS_LANGID_FRENCH_SENEGAL
+
+.. data:: TT_MS_LANGID_YORUBA_NIGERIA
+
+.. data:: TT_MS_LANGID_CATALAN_SPAIN
+
+.. data:: TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_ZULU_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_SPANISH_URUGUAY
+
+.. data:: TT_MS_LANGID_SPANISH_ECUADOR
+
+.. data:: TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA
+
+.. data:: TT_MS_LANGID_CHINESE_GENERAL
+
+.. data:: TT_MS_LANGID_SPANISH_PARAGUAY
+
+.. data:: TT_MS_LANGID_HINDI_INDIA
+
+.. data:: TT_MS_LANGID_FRENCH_LUXEMBOURG
+
+.. data:: TT_MS_LANGID_TSWANA_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_HUNGARIAN_HUNGARY
+
+.. data:: TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA
+
+.. data:: TT_MS_LANGID_ENGLISH_SINGAPORE
+
+.. data:: TT_MS_LANGID_MALTESE_MALTA
+
+.. data:: TT_MS_LANGID_SAMI_NORTHERN_FINLAND
+
+.. data:: TT_MS_LANGID_FRENCH_CANADA
+
+.. data:: TT_MS_LANGID_SAMI_LULE_SWEDEN
+
+.. data:: TT_MS_LANGID_KANURI_NIGERIA
+
+.. data:: TT_MS_LANGID_IRISH_GAELIC_IRELAND
+
+.. data:: TT_MS_LANGID_ARABIC_SAUDI_ARABIA
+
+.. data:: TT_MS_LANGID_FRENCH_HAITI
+
+.. data:: TT_MS_LANGID_SPANISH_PUERTO_RICO
+
+.. data:: TT_MS_LANGID_BURMESE_MYANMAR
+
+.. data:: TT_MS_LANGID_POLISH_POLAND
+
+.. data:: TT_MS_LANGID_PORTUGUESE_PORTUGAL
+
+.. data:: TT_MS_LANGID_ENGLISH_CARIBBEAN
+
+.. data:: TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC
+
+.. data:: TT_MS_LANGID_ICELANDIC_ICELAND
+
+.. data:: TT_MS_LANGID_BENGALI_INDIA
+
+.. data:: TT_MS_LANGID_HAUSA_NIGERIA
+
+.. data:: TT_MS_LANGID_BASQUE_SPAIN
+
+.. data:: TT_MS_LANGID_UIGHUR_CHINA
+
+.. data:: TT_MS_LANGID_ENGLISH_MALAYSIA
+
+.. data:: TT_MS_LANGID_FRENCH_MONACO
+
+.. data:: TT_MS_LANGID_SPANISH_BOLIVIA
+
+.. data:: TT_MS_LANGID_SORBIAN_GERMANY
+
+.. data:: TT_MS_LANGID_SINDHI_INDIA
+
+.. data:: TT_MS_LANGID_CHINESE_SINGAPORE
+
+.. data:: TT_MS_LANGID_FRENCH_COTE_D_IVOIRE
+
+.. data:: TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT
+
+.. data:: TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC
+
+.. data:: TT_MS_LANGID_SAMI_SKOLT_FINLAND
+
+.. data:: TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC
+
+.. data:: TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM
+
+.. data:: TT_MS_LANGID_ARABIC_JORDAN
+
+.. data:: TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN
+
+.. data:: TT_MS_LANGID_SERBIAN_SERBIA_LATIN
+
+.. data:: TT_MS_LANGID_RUSSIAN_RUSSIA
+
+.. data:: TT_MS_LANGID_ROMANIAN_ROMANIA
+
+.. data:: TT_MS_LANGID_FRENCH_NORTH_AFRICA
+
+.. data:: TT_MS_LANGID_MONGOLIAN_MONGOLIA
+
+.. data:: TT_MS_LANGID_TSONGA_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_SOMALI_SOMALIA
+
+.. data:: TT_MS_LANGID_SAAMI_LAPONIA
+
+.. data:: TT_MS_LANGID_SPANISH_COSTA_RICA
+
+.. data:: TT_MS_LANGID_ARABIC_SYRIA
+
+.. data:: TT_MS_LANGID_SPANISH_PANAMA
+
+.. data:: TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES
+
+.. data:: TT_MS_LANGID_ASSAMESE_INDIA
+
+.. data:: TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM
+
+.. data:: TT_MS_LANGID_DUTCH_NETHERLANDS
+
+.. data:: TT_MS_LANGID_SINDHI_PAKISTAN
+
+.. data:: TT_MS_LANGID_MACEDONIAN_MACEDONIA
+
+.. data:: TT_MS_LANGID_KAZAK_KAZAKSTAN
+
+.. data:: TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN
+
+.. data:: TT_MS_LANGID_BELARUSIAN_BELARUS
+
+.. data:: TT_MS_LANGID_FRENCH_MOROCCO
+
+.. data:: TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN
+
+.. data:: TT_MS_LANGID_ALBANIAN_ALBANIA
+
+.. data:: TT_MS_LANGID_SINHALESE_SRI_LANKA
+
+.. data:: TT_MS_LANGID_SPANISH_MEXICO
+
+.. data:: TT_MS_LANGID_ENGLISH_ZIMBABWE
+
+.. data:: TT_MS_LANGID_OROMO_ETHIOPIA
+
+.. data:: TT_MS_LANGID_INDONESIAN_INDONESIA
+
+.. data:: TT_MS_LANGID_SAMI_NORTHERN_NORWAY
+
+.. data:: TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN
+
+.. data:: TT_MS_LANGID_SLOVAK_SLOVAKIA
+
+.. data:: TT_MS_LANGID_KASHMIRI_INDIA
+
+.. data:: TT_MS_LANGID_GERMAN_SWITZERLAND
+
+.. data:: TT_MS_LANGID_URDU_INDIA
+
+.. data:: TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS
+
+.. data:: TT_MS_LANGID_SYRIAC_SYRIA
+
+.. data:: TT_MS_LANGID_SPANISH_CHILE
+
+.. data:: TT_MS_LANGID_FILIPINO_PHILIPPINES
+
+.. data:: TT_MS_LANGID_ARABIC_YEMEN
+
+.. data:: TT_MS_LANGID_KONKANI_INDIA
+
+.. data:: TT_MS_LANGID_AMHARIC_ETHIOPIA
+
+.. data:: TT_MS_LANGID_ENGLISH_NEW_ZEALAND
+
+.. data:: TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND
+
+.. data:: TT_MS_LANGID_ARABIC_TUNISIA
+
+.. data:: TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_QUECHUA_PERU
+
+.. data:: TT_MS_LANGID_DANISH_DENMARK
+
+.. data:: TT_MS_LANGID_ENGLISH_PHILIPPINES
+
+.. data:: TT_MS_LANGID_SPANISH_NICARAGUA
+
+.. data:: TT_MS_LANGID_INUKTITUT_CANADA
+
+.. data:: TT_MS_LANGID_UKRAINIAN_UKRAINE
+
+.. data:: TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL
+
+.. data:: TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC
+
+.. data:: TT_MS_LANGID_FRENCH_BELGIUM
+
+.. data:: TT_MS_LANGID_ENGLISH_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_HAWAIIAN_UNITED_STATES
+
+.. data:: TT_MS_LANGID_ARABIC_IRAQ
+
+.. data:: TT_MS_LANGID_KANNADA_INDIA
+
+.. data:: TT_MS_LANGID_DZONGHKA_BHUTAN
+
+.. data:: TT_MS_LANGID_CHINESE_TAIWAN
+
+.. data:: TT_MS_LANGID_SPANISH_UNITED_STATES
+
+.. data:: TT_MS_LANGID_ARMENIAN_ARMENIA
+
+.. data:: TT_MS_LANGID_LAO_LAOS
+
+.. data:: TT_MS_LANGID_TIGRIGNA_ERYTREA
+
+.. data:: TT_MS_LANGID_MARATHI_INDIA
+
+.. data:: TT_MS_LANGID_ARABIC_KUWAIT
+
+.. data:: TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN
+
+.. data:: TT_MS_LANGID_PORTUGUESE_BRAZIL
+
+.. data:: TT_MS_LANGID_TIGRIGNA_ERYTHREA
+
+.. data:: TT_MS_LANGID_GREEK_GREECE
+
+.. data:: TT_MS_LANGID_URDU_PAKISTAN
+
+.. data:: TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN
+
+.. data:: TT_MS_LANGID_YIDDISH_GERMANY
+
+.. data:: TT_MS_LANGID_GERMAN_GERMANY
+
+.. data:: TT_MS_LANGID_TELUGU_INDIA
+
+.. data:: TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC
+
+.. data:: TT_MS_LANGID_KOREAN_JOHAB_KOREA
+
+.. data:: TT_MS_LANGID_ITALIAN_ITALY
+
+.. data:: TT_MS_LANGID_MAORI_NEW_ZEALAND
+
+.. data:: TT_MS_LANGID_SPANISH_VENEZUELA
+
+.. data:: TT_MS_LANGID_IGBO_NIGERIA
+
+.. data:: TT_MS_LANGID_IBIBIO_NIGERIA
+
+.. data:: TT_MS_LANGID_CHINESE_HONG_KONG
+
+.. data:: TT_MS_LANGID_FRENCH_SWITZERLAND
+
+.. data:: TT_MS_LANGID_BULGARIAN_BULGARIA
+
+.. data:: TT_MS_LANGID_FULFULDE_NIGERIA
+
+.. data:: TT_MS_LANGID_RUSSIAN_MOLDAVIA
+
+.. data:: TT_MS_LANGID_VENDA_SOUTH_AFRICA
+
+.. data:: TT_MS_LANGID_GEORGIAN_GEORGIA
+
+.. data:: TT_MS_LANGID_SWEDISH_FINLAND
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_name_ids.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,50 @@
+TT_NAME_IDS
+===========
+
+Possible values of the 'name' identifier field in the name records of the
TTF
+'name' table. These values are platform independent.
+
+.. data:: TT_NAME_ID_COPYRIGHT
+
+.. data:: TT_NAME_ID_FONT_FAMILY
+
+.. data:: TT_NAME_ID_FONT_SUBFAMILY
+
+.. data:: TT_NAME_ID_UNIQUE_ID
+
+.. data:: TT_NAME_ID_FULL_NAME
+
+.. data:: TT_NAME_ID_VERSION_STRING
+
+.. data:: TT_NAME_ID_PS_NAME
+
+.. data:: TT_NAME_ID_TRADEMARK
+
+.. data:: TT_NAME_ID_MANUFACTURER
+
+.. data:: TT_NAME_ID_DESIGNER
+
+.. data:: TT_NAME_ID_DESCRIPTION
+
+.. data:: TT_NAME_ID_VENDOR_URL
+
+.. data:: TT_NAME_ID_DESIGNER_URL
+
+.. data:: TT_NAME_ID_LICENSE
+
+.. data:: TT_NAME_ID_LICENSE_URL
+
+.. data:: TT_NAME_ID_PREFERRED_FAMILY
+
+.. data:: TT_NAME_ID_PREFERRED_SUBFAMILY
+
+.. data:: TT_NAME_ID_MAC_FULL_NAME
+
+.. data:: TT_NAME_ID_SAMPLE_TEXT
+
+.. data:: TT_NAME_ID_CID_FINDFONT_NAME
+
+.. data:: TT_NAME_ID_WWS_FAMILY
+
+.. data:: TT_NAME_ID_WWS_SUBFAMILY
+
=======================================
--- /dev/null
+++ /trunk/doc/tt_platforms.rst Tue Jun 26 06:24:11 2012
@@ -0,0 +1,47 @@
+TT_PLATFORMS
+============
+
+A list of valid values for the 'platform_id' identifier code in
FT_CharMapRec
+and FT_SfntName structures.
+
+
+.. data:: TT_PLATFORM_APPLE_UNICODE
+
+ Used by Apple to indicate a Unicode character map and/or name entry. See
+ TT_APPLE_ID_XXX for corresponding 'encoding_id' values. Note that name
+ entries in this format are coded as big-endian UCS-2 character codes
only.
+
+
+.. data:: TT_PLATFORM_MACINTOSH
+
+ Used by Apple to indicate a MacOS-specific charmap and/or name entry. See
+ TT_MAC_ID_XXX for corresponding 'encoding_id' values. Note that most
TrueType
+ fonts contain an Apple roman charmap to be usable on MacOS systems (even
if
+ they contain a Microsoft charmap as well).
+
+
+.. data:: TT_PLATFORM_ISO
+
+ This value was used to specify ISO/IEC 10646 charmaps. It is however now
+ deprecated. See TT_ISO_ID_XXX for a list of corresponding 'encoding_id'
+ values.
+
+
+.. data:: TT_PLATFORM_MICROSOFT
+
+ Used by Microsoft to indicate Windows-specific charmaps. See
TT_MS_ID_XXX for
+ a list of corresponding 'encoding_id' values. Note that most fonts
contain a
+ Unicode charmap using (TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS).
+
+
+.. data:: TT_PLATFORM_CUSTOM
+
+ Used to indicate application-specific charmaps.
+
+
+.. data:: TT_PLATFORM_ADOBE
+
+ This value isn't part of any font format specification, but is used by
+ FreeType to report Adobe-specific charmaps in an FT_CharMapRec
structure. See
+ TT_ADOBE_ID_XXX.
+
=======================================
--- /trunk/freetype/ft_enums.py Thu Nov 24 22:57:00 2011
+++ /dev/null
@@ -1,1497 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-----------------------------------------------------------------------------
-#
-# FreeType high-level python API - Copyright 2011 Nicolas P. Rougier
-# Distributed under the terms of the new BSD license.
-#
-#
-----------------------------------------------------------------------------
-'''
-Freetype enum types
--------------------
-
-FT_PIXEL_MODES: An enumeration type used to describe the format of pixels
in a
- given bitmap. Note that additional formats may be added in
the
- future.
-
-FT_GLYPH_BBOX_MODES: The mode how the values of FT_Glyph_Get_CBox are
returned.
-
-FT_GLYPH_FORMATS: An enumeration type used to describe the format of a
given
- glyph image. Note that this version of FreeType only
supports
- two image formats, even though future font drivers will
be
- able to register their own format.
-
-FT_ENCODINGS: An enumeration used to specify character sets supported by
- charmaps. Used in the FT_Select_Charmap API function.
-
-FT_RENDER_MODES: An enumeration type that lists the render modes supported
by
- FreeType 2. Each mode corresponds to a specific type of
- scanline conversion performed on the outline.
-
-FT_LOAD_TARGETS: A list of values that are used to select a specific
hinting
- algorithm to use by the hinter. You should OR one of these
- values to your 'load_flags' when calling FT_Load_Glyph.
-
-FT_LOAD_FLAGS: A list of bit-field constants used with FT_Load_Glyph to
- indicate what kind of operations to perform during glyph
- loading.
-
-FT_STYLE_FLAGS: A list of bit-flags used to indicate the style of a given
- face. These are used in the 'style_flags' field of
FT_FaceRec.
-
-FT_FACE_FLAGS: A list of bit flags used in the 'face_flags' field of the
- FT_FaceRec structure. They inform client applications of
- properties of the corresponding face.
-
-FT_OUTLINE_FLAGS: A list of bit-field constants use for the flags in an
- outline's 'flags' field.
-
-FT_OPEN_MODES: A list of bit-field constants used within the 'flags' field
of
- the FT_Open_Args structure.
-
-FT_KERNING_MODES: An enumeration used to specify which kerning values to
return
- in FT_Get_Kerning.
-
-FT_STROKER_LINEJOINS: These values determine how two joining lines are
rendered
- in a stroker.
-
-FT_STROKER_LINECAPS: These values determine how the end of opened
sub-paths are
- rendered in a stroke.
-
-FT_STROKER_BORDERS: These values are used to select a given stroke border
in
- FT_Stroker_GetBorderCounts and FT_Stroker_ExportBorder.
-
-FT_LCD_FILTERS: A list of values to identify various types of LCD filters.
-
-TT_PLATFORMS: A list of valid values for the 'platform_id' identifier code
in
- FT_CharMapRec and FT_SfntName structures.
-
-TT_APPLE_IDS: A list of valid values for the 'encoding_id' for
- TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
-
-TT_MAC_IDS: A list of valid values for the 'encoding_id' for
- TT_PLATFORM_MACINTOSH charmaps and name entries.
-
-TT_MS_IDS: A list of valid values for the 'encoding_id' for
- TT_PLATFORM_MICROSOFT charmaps and name entries.
-
-TT_ADOBE_IDS: A list of valid values for the 'encoding_id' for
- TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific
- extension!
-
-TT_MAC_LANGIDS: Possible values of the language identifier field in the
name
- records of the TTF `name' table if the `platform'
identifier
- code is TT_PLATFORM_MACINTOSH.
-
-TT_MS_LANGIDS: Possible values of the language identifier field in the name
- records of the TTF `name' table if the `platform' identifier
- code is TT_PLATFORM_MICROSOFT.
-
-TT_NAME_IDS: Possible values of the `name' identifier field in the name
- records of the TTF `name' table. These values are platform
- independent.
-'''
-
-#
-----------------------------------------------------------------------------
-# An enumeration type used to describe the format of pixels in a given
-# bitmap. Note that additional formats may be added in the future.
-#
-# FT_PIXEL_MODE_NONE
-# Value 0 is reserved.
-#
-# FT_PIXEL_MODE_MONO
-# A monochrome bitmap, using 1 bit per pixel. Note that pixels are stored
in
-# most-significant order (MSB), which means that the left-most pixel in a
byte
-# has value 128.
-#
-# FT_PIXEL_MODE_GRAY
-# An 8-bit bitmap, generally used to represent anti-aliased glyph images.
Each
-# pixel is stored in one byte. Note that the number of 'gray' levels is
stored
-# in the 'num_grays' field of the FT_Bitmap structure (it generally is
256).
-#
-# FT_PIXEL_MODE_GRAY2
-# A 2-bit per pixel bitmap, used to represent embedded anti-aliased
bitmaps in
-# font files according to the OpenType specification. We haven't found a
single
-# font using this format, however.
-#
-# FT_PIXEL_MODE_GRAY4
-# A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in
font
-# files according to the OpenType specification. We haven't found a single
font
-# using this format, however.
-#
-# FT_PIXEL_MODE_LCD
-# An 8-bit bitmap, representing RGB or BGR decimated glyph images used for
-# display on LCD displays; the bitmap is three times wider than the
original
-# glyph image. See also FT_RENDER_MODE_LCD.
-#
-# FT_PIXEL_MODE_LCD_V
-# An 8-bit bitmap, representing RGB or BGR decimated glyph images used for
-# display on rotated LCD displays; the bitmap is three times taller than
the
-# original glyph image. See also FT_RENDER_MODE_LCD_V.
-#
-FT_PIXEL_MODES = {'FT_PIXEL_MODE_NONE' : 0,
- 'FT_PIXEL_MODE_MONO' : 1,
- 'FT_PIXEL_MODE_GRAY' : 2,
- 'FT_PIXEL_MODE_GRAY2': 3,
- 'FT_PIXEL_MODE_GRAY4': 4,
- 'FT_PIXEL_MODE_LCD' : 5,
- 'FT_PIXEL_MODE_LCD_V': 6,
- 'FT_PIXEL_MODE_MAX' : 7}
-globals().update(FT_PIXEL_MODES)
-ft_pixel_mode_none = FT_PIXEL_MODE_NONE
-ft_pixel_mode_mono = FT_PIXEL_MODE_MONO
-ft_pixel_mode_grays = FT_PIXEL_MODE_GRAY
-ft_pixel_mode_pal2 = FT_PIXEL_MODE_GRAY2
-ft_pixel_mode_pal4 = FT_PIXEL_MODE_GRAY4
-
-
-#
-----------------------------------------------------------------------------
-# The mode how the values of FT_Glyph_Get_CBox are returned.
-#
-# FT_GLYPH_BBOX_UNSCALED
-# Return unscaled font units.
-#
-# FT_GLYPH_BBOX_SUBPIXELS
-# Return unfitted 26.6 coordinates.
-#
-# FT_GLYPH_BBOX_GRIDFIT
-# Return grid-fitted 26.6 coordinates.
-#
-# FT_GLYPH_BBOX_TRUNCATE
-# Return coordinates in integer pixels.
-#
-# FT_GLYPH_BBOX_PIXELS
-# Return grid-fitted pixel coordinates.
-#
-FT_GLYPH_BBOX_MODES = {'FT_GLYPH_BBOX_UNSCALED' : 0,
- 'FT_GLYPH_BBOX_SUBPIXELS' : 0,
- 'FT_GLYPH_BBOX_GRIDFIT' : 1,
- 'FT_GLYPH_BBOX_TRUNCATE' : 2,
- 'FT_GLYPH_BBOX_PIXELS' : 3}
-globals().update(FT_GLYPH_BBOX_MODES)
-
-
-
-#
-----------------------------------------------------------------------------
-# An enumeration type used to describe the format of a given glyph image.
Note
-# that this version of FreeType only supports two image formats, even
though
-# future font drivers will be able to register their own format.
-#
-# FT_GLYPH_FORMAT_NONE
-# The value 0 is reserved.
-
-# FT_GLYPH_FORMAT_COMPOSITE
-# The glyph image is a composite of several other images. This format is
only
-# used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like
-# accented characters).
-#
-# FT_GLYPH_FORMAT_BITMAP
-# The glyph image is a bitmap, and can be described as an FT_Bitmap. You
-# generally need to access the 'bitmap' field of the FT_GlyphSlotRec
structure
-# to read it.
-#
-# FT_GLYPH_FORMAT_OUTLINE
-# The glyph image is a vectorial outline made of line segments and Bezier
arcs;
-# it can be described as an FT_Outline; you generally want to access the
-# 'outline' field of the FT_GlyphSlotRec structure to read it.
-#
-# FT_GLYPH_FORMAT_PLOTTER
-# The glyph image is a vectorial path with no inside and outside contours.
Some
-# Type 1 fonts, like those in the Hershey family, contain glyphs in this
-# format. These are described as FT_Outline, but FreeType isn't currently
-# capable of rendering them correctly.
-#
-def _FT_IMAGE_TAG(a,b,c,d):
- return ( ord(a) << 24 | ord(b) << 16 | ord(c) << 8 | ord(d) )
-FT_GLYPH_FORMATS = {
- 'FT_GLYPH_FORMAT_NONE' : _FT_IMAGE_TAG( '\0','\0','\0','\0' ),
- 'FT_GLYPH_FORMAT_COMPOSITE' : _FT_IMAGE_TAG( 'c','o','m','p' ),
- 'FT_GLYPH_FORMAT_BITMAP' : _FT_IMAGE_TAG( 'b','i','t','s' ),
- 'FT_GLYPH_FORMAT_OUTLINE' : _FT_IMAGE_TAG( 'o','u','t','l' ),
- 'FT_GLYPH_FORMAT_PLOTTER' : _FT_IMAGE_TAG( 'p','l','o','t' )}
-globals().update(FT_GLYPH_FORMATS)
-ft_glyph_format_none = FT_GLYPH_FORMAT_NONE
-ft_glyph_format_composite = FT_GLYPH_FORMAT_COMPOSITE
-ft_glyph_format_bitmap = FT_GLYPH_FORMAT_BITMAP
-ft_glyph_format_outline = FT_GLYPH_FORMAT_OUTLINE
-ft_glyph_format_plotter = FT_GLYPH_FORMAT_PLOTTER
-
-
-
-#
-----------------------------------------------------------------------------
-# An enumeration used to specify character sets supported by charmaps.
Used in
-# the FT_Select_Charmap API function.
-#
-# FT_ENCODING_NONE
-# The encoding value 0 is reserved.
-#
-# FT_ENCODING_UNICODE
-# Corresponds to the Unicode character set. This value covers all versions
of
-# the Unicode repertoire, including ASCII and Latin-1. Most fonts include a
-# Unicode charmap, but not all of them.
-#
-# For example, if you want to access Unicode value U+1F028 (and the font
-# contains it), use value 0x1F028 as the input value for FT_Get_Char_Index.
-#
-# FT_ENCODING_MS_SYMBOL
-# Corresponds to the Microsoft Symbol encoding, used to encode mathematical
-# symbols in the 32..255 character code range. For more information, see
-# 'http://www.ceviz.net/symbol.htm'.
-#
-# FT_ENCODING_SJIS
-# Corresponds to Japanese SJIS encoding. More info at at
-# 'http://langsupport.japanreference.com/encoding.shtml'. See note on
-# multi-byte encodings below.
-#
-# FT_ENCODING_GB2312
-# Corresponds to an encoding system for Simplified Chinese as used used in
-# mainland China.
-#
-# FT_ENCODING_BIG5
-# Corresponds to an encoding system for Traditional Chinese as used in
Taiwan
-# and Hong Kong.
-#
-# FT_ENCODING_WANSUNG
-# Corresponds to the Korean encoding system known as Wansung. For more
-# information see 'http://www.microsoft.com/typography/unicode/949.txt'.
-#
-# FT_ENCODING_JOHAB
-# The Korean standard character set (KS C 5601-1992), which corresponds to
MS
-# Windows code page 1361. This character set includes all possible Hangeul
-# character combinations.
-#
-# FT_ENCODING_ADOBE_LATIN_1
-# Corresponds to a Latin-1 encoding as defined in a Type 1 PostScript
font. It
-# is limited to 256 character codes.
-#
-# FT_ENCODING_ADOBE_STANDARD
-# Corresponds to the Adobe Standard encoding, as found in Type 1, CFF, and
-# OpenType/CFF fonts. It is limited to 256 character codes.
-#
-# FT_ENCODING_ADOBE_EXPERT
-# Corresponds to the Adobe Expert encoding, as found in Type 1, CFF, and
-# OpenType/CFF fonts. It is limited to 256 character codes.
-#
-# FT_ENCODING_ADOBE_CUSTOM
-# Corresponds to a custom encoding, as found in Type 1, CFF, and
OpenType/CFF
-# fonts. It is limited to 256 character codes.
-
-# FT_ENCODING_APPLE_ROMAN
-# Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType
-# fonts contain a charmap for this encoding, since older versions of Mac
OS are
-# able to use it.
-#
-# FT_ENCODING_OLD_LATIN_2
-# This value is deprecated and was never used nor reported by FreeType.
Don't
-# use or test for it.
-#
-def _FT_ENC_TAG(a,b,c,d):
- return ( ord(a) << 24 | ord(b) << 16 | ord(c) << 8 | ord(d) )
-FT_ENCODINGS = {'FT_ENCODING_NONE' :
_FT_ENC_TAG('\0','\0','\0','\0'),
- 'FT_ENCODING_MS_SYMBOL' :
_FT_ENC_TAG( 's','y','m','b' ),
- 'FT_ENCODING_UNICODE' :
_FT_ENC_TAG( 'u','n','i','c' ),
- 'FT_ENCODING_SJIS' :
_FT_ENC_TAG( 's','j','i','s' ),
- 'FT_ENCODING_GB2312' :
_FT_ENC_TAG( 'g','b',' ',' ' ),
- 'FT_ENCODING_BIG5' :
_FT_ENC_TAG( 'b','i','g','5' ),
- 'FT_ENCODING_WANSUNG' :
_FT_ENC_TAG( 'w','a','n','s' ),
- 'FT_ENCODING_JOHAB' :
_FT_ENC_TAG( 'j','o','h','a' ),
- 'FT_ENCODING_ADOBE_STANDARD' :
_FT_ENC_TAG( 'A','D','O','B' ),
- 'FT_ENCODING_ADOBE_EXPERT' :
_FT_ENC_TAG( 'A','D','B','E' ),
- 'FT_ENCODING_ADOBE_CUSTOM' :
_FT_ENC_TAG( 'A','D','B','C' ),
- 'FT_ENCODING_ADOBE_LATIN1' :
_FT_ENC_TAG( 'l','a','t','1' ),
- 'FT_ENCODING_OLD_LATIN2' :
_FT_ENC_TAG( 'l','a','t','2' ),
- 'FT_ENCODING_APPLE_ROMAN' :
_FT_ENC_TAG( 'a','r','m','n' ) }
-globals().update(FT_ENCODINGS)
-
-
-
-#
-----------------------------------------------------------------------------
-# An enumeration type that lists the render modes supported by FreeType 2.
Each
-# mode corresponds to a specific type of scanline conversion performed on
the
-# outline.
-#
-# For bitmap fonts and embedded bitmaps the 'bitmap->pixel_mode' field in
the
-# FT_GlyphSlotRec structure gives the format of the returned bitmap.
-#
-# All modes except FT_RENDER_MODE_MONO use 256 levels of opacity.
-#
-# FT_RENDER_MODE_NORMAL
-# This is the default render mode; it corresponds to 8-bit anti-aliased
-# bitmaps.
-#
-# FT_RENDER_MODE_LIGHT
-# This is equivalent to FT_RENDER_MODE_NORMAL. It is only defined as a
separate
-# value because render modes are also used indirectly to define hinting
-# algorithm selectors. See FT_LOAD_TARGET_XXX for details.
-#
-# FT_RENDER_MODE_MONO
-# This mode corresponds to 1-bit bitmaps (with 2 levels of opacity).
-#
-# FT_RENDER_MODE_LCD
-# This mode corresponds to horizontal RGB and BGR sub-pixel displays like
LCD
-# screens. It produces 8-bit bitmaps that are 3 times the width of the
original
-# glyph outline in pixels, and which use the FT_PIXEL_MODE_LCD mode.
-#
-# FT_RENDER_MODE_LCD_V
-# This mode corresponds to vertical RGB and BGR sub-pixel displays (like
PDA
-# screens, rotated LCD displays, etc.). It produces 8-bit bitmaps that are
3
-# times the height of the original glyph outline in pixels and use the
-# FT_PIXEL_MODE_LCD_V mode.
-#
-FT_RENDER_MODES = { 'FT_RENDER_MODE_NORMAL' : 0,
- 'FT_RENDER_MODE_LIGHT' : 1,
- 'FT_RENDER_MODE_MONO' : 2,
- 'FT_RENDER_MODE_LCD' : 3,
- 'FT_RENDER_MODE_LCD_V' : 4 }
-globals().update(FT_RENDER_MODES)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of values that are used to select a specific hinting algorithm to
use
-# by the hinter. You should OR one of these values to your 'load_flags'
when
-# calling FT_Load_Glyph.
-#
-# Note that font's native hinters may ignore the hinting algorithm you have
-# specified (e.g., the TrueType bytecode interpreter). You can set
-# FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
-#
-# Also note that FT_LOAD_TARGET_LIGHT is an exception, in that it always
-# implies FT_LOAD_FORCE_AUTOHINT.
-#
-# FT_LOAD_TARGET_NORMAL
-# This corresponds to the default hinting algorithm, optimized for standard
-# gray-level rendering. For monochrome output, use FT_LOAD_TARGET_MONO
instead.
-#
-# FT_LOAD_TARGET_LIGHT
-# A lighter hinting algorithm for non-monochrome modes. Many generated
glyphs
-# are more fuzzy but better resemble its original shape. A bit like
rendering
-# on Mac OS X.
-#
-# As a special exception, this target implies FT_LOAD_FORCE_AUTOHINT.
-#
-# FT_LOAD_TARGET_MONO
-# Strong hinting algorithm that should only be used for monochrome output.
The
-# result is probably unpleasant if the glyph is rendered in non-monochrome
-# modes.
-#
-# FT_LOAD_TARGET_LCD
-# A variant of FT_LOAD_TARGET_NORMAL optimized for horizontally decimated
LCD
-# displays.
-#
-# FT_LOAD_TARGET_LCD_V
-# A variant of FT_LOAD_TARGET_NORMAL optimized for vertically decimated LCD
-# displays.
-
-def _FT_LOAD_TARGET_(x):
- return (x & 15) << 16
-FT_LOAD_TARGETS = {
- 'FT_LOAD_TARGET_NORMAL' : _FT_LOAD_TARGET_(FT_RENDER_MODE_NORMAL),
- 'FT_LOAD_TARGET_LIGHT' : _FT_LOAD_TARGET_(FT_RENDER_MODE_LIGHT),
- 'FT_LOAD_TARGET_MONO' : _FT_LOAD_TARGET_(FT_RENDER_MODE_MONO),
- 'FT_LOAD_TARGET_LCD' : _FT_LOAD_TARGET_(FT_RENDER_MODE_LCD),
- 'FT_LOAD_TARGET_LCD_V' : _FT_LOAD_TARGET_(FT_RENDER_MODE_LCD_V) }
-globals().update(FT_LOAD_TARGETS)
-#def FT_LOAD_TARGET_MODE(x):
-# return (x >> 16) & 15
-
-
-#
-----------------------------------------------------------------------------
-# A list of bit-field constants used with FT_Load_Glyph to indicate what
kind
-# of operations to perform during glyph loading.
-#
-# FT_LOAD_DEFAULT
-# Corresponding to 0, this value is used as the default glyph load
-# operation. In this case, the following happens:
-#
-# 1. FreeType looks for a bitmap for the glyph corresponding to the face's
-# current size. If one is found, the function returns. The bitmap data can
be
-# accessed from the glyph slot (see note below).
-#
-# 2. If no embedded bitmap is searched or found, FreeType looks for a
scalable
-# outline. If one is found, it is loaded from the font file, scaled to
device
-# pixels, then 'hinted' to the pixel grid in order to optimize it. The
outline
-# data can be accessed from the glyph slot (see note below).
-#
-# Note that by default, the glyph loader doesn't render outlines into
-# bitmaps. The following flags are used to modify this default behaviour to
-# more specific and useful cases.
-#
-# FT_LOAD_NO_SCALE
-# Don't scale the outline glyph loaded, but keep it in font units.
-#
-# This flag implies FT_LOAD_NO_HINTING and FT_LOAD_NO_BITMAP, and unsets
-# FT_LOAD_RENDER.
-#
-# FT_LOAD_NO_HINTING
-# Disable hinting. This generally generates 'blurrier' bitmap glyph when
the
-# glyph is rendered in any of the anti-aliased modes. See also the note
below.
-#
-# This flag is implied by FT_LOAD_NO_SCALE.
-#
-# FT_LOAD_RENDER
-# Call FT_Render_Glyph after the glyph is loaded. By default, the glyph is
-# rendered in FT_RENDER_MODE_NORMAL mode. This can be overridden by
-# FT_LOAD_TARGET_XXX or FT_LOAD_MONOCHROME.
-#
-# This flag is unset by FT_LOAD_NO_SCALE.
-#
-# FT_LOAD_NO_BITMAP
-# Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.
-#
-# FT_LOAD_NO_SCALE always sets this flag.
-#
-# FT_LOAD_VERTICAL_LAYOUT
-# Load the glyph for vertical text layout. Don't use it as it is
problematic
-# currently.
-#
-# FT_LOAD_FORCE_AUTOHINT
-# Indicates that the auto-hinter is preferred over the font's native
-# hinter. See also the note below.
-#
-# FT_LOAD_CROP_BITMAP
-# Indicates that the font driver should crop the loaded bitmap glyph (i.e.,
-# remove all space around its black bits). Not all drivers implement this.
-#
-# FT_LOAD_PEDANTIC
-# Indicates that the font driver should perform pedantic verifications
during
-# glyph loading. This is mostly used to detect broken glyphs in fonts. By
-# default, FreeType tries to handle broken fonts also.
-#
-# FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH
-# Indicates that the font driver should ignore the global advance width
defined
-# in the font. By default, that value is used as the advance width for all
-# glyphs when the face has FT_FACE_FLAG_FIXED_WIDTH set.
-#
-# This flag exists for historical reasons (to support buggy CJK fonts).
-#
-# FT_LOAD_NO_RECURSE
-# This flag is only used internally. It merely indicates that the font
driver
-# should not load composite glyphs recursively. Instead, it should set the
-# 'num_subglyph' and 'subglyphs' values of the glyph slot accordingly, and
set
-# 'glyph->format' to FT_GLYPH_FORMAT_COMPOSITE.
-#
-# The description of sub-glyphs is not available to client applications
for now.
-#
-# This flag implies FT_LOAD_NO_SCALE and FT_LOAD_IGNORE_TRANSFORM.
-#
-# FT_LOAD_IGNORE_TRANSFORM
-# Indicates that the transform matrix set by FT_Set_Transform should be
ignored.
-#
-# FT_LOAD_MONOCHROME
-# This flag is used with FT_LOAD_RENDER to indicate that you want to
render an
-# outline glyph to a 1-bit monochrome bitmap glyph, with 8 pixels packed
into
-# each byte of the bitmap data.
-#
-# Note that this has no effect on the hinting algorithm used. You should
rather
-# use FT_LOAD_TARGET_MONO so that the monochrome-optimized hinting
algorithm is
-# used.
-#
-# FT_LOAD_LINEAR_DESIGN
-# Indicates that the 'linearHoriAdvance' and 'linearVertAdvance' fields of
-# FT_GlyphSlotRec should be kept in font units. See FT_GlyphSlotRec for
-# details.
-#
-# FT_LOAD_NO_AUTOHINT
-# Disable auto-hinter. See also the note below.
-#
-FT_LOAD_FLAGS = { 'FT_LOAD_DEFAULT' : 0x0,
- 'FT_LOAD_NO_SCALE' : 0x1,
- 'FT_LOAD_NO_HINTING' : 0x2,
- 'FT_LOAD_RENDER' : 0x4,
- 'FT_LOAD_NO_BITMAP' : 0x8,
- 'FT_LOAD_VERTICAL_LAYOUT' : 0x10,
- 'FT_LOAD_FORCE_AUTOHINT' : 0x20,
- 'FT_LOAD_CROP_BITMAP' : 0x40,
- 'FT_LOAD_PEDANTIC' : 0x80,
- 'FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH' : 0x200,
- 'FT_LOAD_NO_RECURSE' : 0x400,
- 'FT_LOAD_IGNORE_TRANSFORM' : 0x800,
- 'FT_LOAD_MONOCHROME' : 0x1000,
- 'FT_LOAD_LINEAR_DESIGN' : 0x2000,
- 'FT_LOAD_NO_AUTOHINT' : 0x8000 }
-globals().update(FT_LOAD_FLAGS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of bit-flags used to indicate the style of a given face. These are
-# used in the 'style_flags' field of FT_FaceRec.
-#
-# FT_STYLE_FLAG_ITALIC
-# Indicates that a given face style is italic or oblique.
-#
-# FT_STYLE_FLAG_BOLD
-# Indicates that a given face is bold.
-#
-FT_STYLE_FLAGS = {'FT_STYLE_FLAG_ITALIC' : 1,
- 'FT_STYLE_FLAG_BOLD' : 2 }
-globals().update(FT_STYLE_FLAGS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of bit flags used in the 'face_flags' field of the FT_FaceRec
-# structure. They inform client applications of properties of the
corresponding
-# face.
-#
-# FT_FACE_FLAG_SCALABLE
-# Indicates that the face contains outline glyphs. This doesn't prevent
bitmap
-# strikes, i.e., a face can have both this and and FT_FACE_FLAG_FIXED_SIZES
-# set.
-#
-# FT_FACE_FLAG_FIXED_SIZES
-# Indicates that the face contains bitmap strikes. See also the
-# 'num_fixed_sizes' and 'available_sizes' fields of FT_FaceRec.
-#
-# FT_FACE_FLAG_FIXED_WIDTH
-# Indicates that the face contains fixed-width characters (like Courier,
-# Lucido, MonoType, etc.).
-#
-# FT_FACE_FLAG_SFNT
-# Indicates that the face uses the 'sfnt' storage scheme. For now, this
means
-# TrueType and OpenType.
-#
-# FT_FACE_FLAG_HORIZONTAL
-# Indicates that the face contains horizontal glyph metrics. This should
be set
-# for all common formats.
-#
-# FT_FACE_FLAG_VERTICAL
-# Indicates that the face contains vertical glyph metrics. This is only
-# available in some formats, not all of them.
-#
-# FT_FACE_FLAG_KERNING
-# Indicates that the face contains kerning information. If set, the kerning
-# distance can be retrieved through the function FT_Get_Kerning. Otherwise
the
-# function always return the vector (0,0). Note that FreeType doesn't
handle
-# kerning data from the 'GPOS' table (as present in some OpenType fonts).
-#
-#
-# FT_FACE_FLAG_MULTIPLE_MASTERS
-# Indicates that the font contains multiple masters and is capable of
-# interpolating between them. See the multiple-masters specific API for
-# details.
-#
-# FT_FACE_FLAG_GLYPH_NAMES
-# Indicates that the font contains glyph names that can be retrieved
through
-# FT_Get_Glyph_Name. Note that some TrueType fonts contain broken glyph
name
-# tables. Use the function FT_Has_PS_Glyph_Names when needed.
-#
-# FT_FACE_FLAG_EXTERNAL_STREAM
-# Used internally by FreeType to indicate that a face's stream was
provided by
-# the client application and should not be destroyed when FT_Done_Face is
-# called. Don't read or test this flag.
-#
-# FT_FACE_FLAG_HINTER
-# Set if the font driver has a hinting machine of its own. For example,
with
-# TrueType fonts, it makes sense to use data from the SFNT 'gasp' table
only if
-# the native TrueType hinting engine (with the bytecode interpreter) is
-# available and active.
-#
-# FT_FACE_FLAG_CID_KEYED
-# Set if the font is CID-keyed. In that case, the font is not accessed by
glyph
-# indices but by CID values. For subsetted CID-keyed fonts this has the
-# consequence that not all index values are a valid argument to
-# FT_Load_Glyph. Only the CID values for which corresponding glyphs in the
-# subsetted font exist make FT_Load_Glyph return successfully; in all other
-# cases you get an 'FT_Err_Invalid_Argument' error.
-#
-# Note that CID-keyed fonts which are in an SFNT wrapper don't have this
flag
-# set since the glyphs are accessed in the normal way (using contiguous
-# indices); the 'CID-ness' isn't visible to the application.
-#
-# FT_FACE_FLAG_TRICKY
-# Set if the font is 'tricky', this is, it always needs the font format's
-# native hinting engine to get a reasonable result. A typical example is
the
-# Chinese font 'mingli.ttf' which uses TrueType bytecode instructions to
move
-# and scale all of its subglyphs.
-#
-# It is not possible to autohint such fonts using FT_LOAD_FORCE_AUTOHINT;
it
-# will also ignore FT_LOAD_NO_HINTING. You have to set both
FT_LOAD_NO_HINTING
-# and FT_LOAD_NO_AUTOHINT to really disable hinting; however, you probably
-# never want this except for demonstration purposes.
-#
-# Currently, there are six TrueType fonts in the list of tricky fonts;
they are
-# hard-coded in file 'ttobjs.c'.
-#
-FT_FACE_FLAGS = { 'FT_FACE_FLAG_SCALABLE' : 1 << 0,
- 'FT_FACE_FLAG_FIXED_SIZES' : 1 << 1,
- 'FT_FACE_FLAG_FIXED_WIDTH' : 1 << 2,
- 'FT_FACE_FLAG_SFNT' : 1 << 3,
- 'FT_FACE_FLAG_HORIZONTAL' : 1 << 4,
- 'FT_FACE_FLAG_VERTICAL' : 1 << 5,
- 'FT_FACE_FLAG_KERNING' : 1 << 6,
- 'FT_FACE_FLAG_FAST_GLYPHS' : 1 << 7,
- 'FT_FACE_FLAG_MULTIPLE_MASTERS' : 1 << 8,
- 'FT_FACE_FLAG_GLYPH_NAMES' : 1 << 9,
- 'FT_FACE_FLAG_EXTERNAL_STREAM' : 1 << 10,
- 'FT_FACE_FLAG_HINTER' : 1 << 11,
- 'FT_FACE_FLAGS_CID_KEYED' : 1 << 12,
- 'FT_FACE_FLAGS_CID_TRICKY' : 1 << 13
- }
-globals().update(FT_FACE_FLAGS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of bit-field constants use for the flags in an outline's 'flags'
-# field.
-#
-# FT_OUTLINE_NONE
-# Value 0 is reserved.
-#
-# FT_OUTLINE_OWNER
-# If set, this flag indicates that the outline's field arrays
(i.e., 'points',
-# 'flags', and 'contours') are 'owned' by the outline object, and should
thus
-# be freed when it is destroyed.
-#
-# FT_OUTLINE_EVEN_ODD_FILL
-# By default, outlines are filled using the non-zero winding rule. If set
to 1,
-# the outline will be filled using the even-odd fill rule (only works with
the
-# smooth rasterizer).
-#
-# FT_OUTLINE_REVERSE_FILL
-# By default, outside contours of an outline are oriented in clock-wise
-# direction, as defined in the TrueType specification. This flag is set if
the
-# outline uses the opposite direction (typically for Type 1 fonts). This
flag
-# is ignored by the scan converter.
-#
-# FT_OUTLINE_IGNORE_DROPOUTS
-# By default, the scan converter will try to detect drop-outs in an
outline and
-# correct the glyph bitmap to ensure consistent shape continuity. If set,
this
-# flag hints the scan-line converter to ignore such cases. See below for
more
-# information.
-#
-# FT_OUTLINE_SMART_DROPOUTS
-# Select smart dropout control. If unset, use simple dropout control.
Ignored
-# if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.
-#
-# FT_OUTLINE_INCLUDE_STUBS
-# If set, turn pixels on for 'stubs', otherwise exclude them. Ignored if
-# FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.
-#
-# FT_OUTLINE_HIGH_PRECISION
-# This flag indicates that the scan-line converter should try to convert
this
-# outline to bitmaps with the highest possible quality. It is typically
set for
-# small character sizes. Note that this is only a hint that might be
completely
-# ignored by a given scan-converter.
-#
-# FT_OUTLINE_SINGLE_PASS
-# This flag is set to force a given scan-converter to only use a single
pass
-# over the outline to render a bitmap glyph image. Normally, it is set for
very
-# large character sizes. It is only a hint that might be completely
ignored by
-# a given scan-converter.
-#
-FT_OUTLINE_FLAGS = { 'FT_OUTLINE_NONE' : 0x0,
- 'FT_OUTLINE_OWNER' : 0x1,
- 'FT_OUTLINE_EVEN_ODD_FILL' : 0x2,
- 'FT_OUTLINE_REVERSE_FILL' : 0x4,
- 'FT_OUTLINE_IGNORE_DROPOUTS' : 0x8,
- 'FT_OUTLINE_SMART_DROPOUTS' : 0x10,
- 'FT_OUTLINE_INCLUDE_STUBS' : 0x20,
- 'FT_OUTLINE_HIGH_PRECISION' : 0x100,
- 'FT_OUTLINE_SINGLE_PASS' : 0x200 }
-globals().update(FT_OUTLINE_FLAGS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of bit-field constants used within the 'flags' field of the
-# FT_Open_Args structure.
-#
-# FT_OPEN_MEMORY
-# This is a memory-based stream.
-#
-# FT_OPEN_STREAM
-# Copy the stream from the 'stream' field.
-#
-# FT_OPEN_PATHNAME
-# Create a new input stream from a C path name.
-#
-# FT_OPEN_DRIVER
-# Use the 'driver' field.
-#
-# FT_OPEN_PARAMS
-# Use the 'num_params' and 'params' fields.
-#
-FT_OPEN_MODES = {'FT_OPEN_MEMORY': 0x1,
- 'FT_OPEN_STREAM': 0x2,
- 'FT_OPEN_PATHNAME': 0x4,
- 'FT_OPEN_DRIVER': 0x8,
- 'FT_OPEN_PARAMS': 0x10 }
-globals().update(FT_OPEN_MODES)
-
-
-
-#
-----------------------------------------------------------------------------
-# An enumeration used to specify which kerning values to return in
-# FT_Get_Kerning.
-#
-# FT_KERNING_DEFAULT
-# Return scaled and grid-fitted kerning distances (value is 0).
-#
-# FT_KERNING_UNFITTED
-# Return scaled but un-grid-fitted kerning distances.
-#
-# FT_KERNING_UNSCALED
-# Return the kerning vector in original font units.
-#
-FT_KERNING_MODES = { 'FT_KERNING_DEFAULT' : 0,
- 'FT_KERNING_UNFITTED' : 1,
- 'FT_KERNING_UNSCALED' : 2 }
-globals().update(FT_KERNING_MODES)
-
-
-
-#
-----------------------------------------------------------------------------
-# These values determine how two joining lines are rendered in a stroker.
-#
-# FT_STROKER_LINEJOIN_ROUND
-# Used to render rounded line joins. Circular arcs are used to join two
lines
-# smoothly.
-#
-# FT_STROKER_LINEJOIN_BEVEL
-# Used to render beveled line joins; i.e., the two joining lines are
extended
-# until they intersect.
-#
-# FT_STROKER_LINEJOIN_MITER
-# Same as beveled rendering, except that an additional line break is added
if
-# the angle between the two joining lines is too closed (this is useful to
-# avoid unpleasant spikes in beveled rendering).
-#
-FT_STROKER_LINEJOINS = { 'FT_STROKER_LINEJOIN_ROUND' : 0,
- 'FT_STROKER_LINEJOIN_BEVEL' : 1,
- 'FT_STROKER_LINEJOIN_MITER' : 2}
-globals().update(FT_STROKER_LINEJOINS)
-
-
-
-#
-----------------------------------------------------------------------------
-# These values determine how the end of opened sub-paths are rendered in a
-# stroke.
-#
-# FT_STROKER_LINECAP_BUTT
-# The end of lines is rendered as a full stop on the last point itself.
-#
-# FT_STROKER_LINECAP_ROUND
-# The end of lines is rendered as a half-circle around the last point.
-#
-# FT_STROKER_LINECAP_SQUARE
-# The end of lines is rendered as a square around the last point.
-#
-FT_STROKER_LINECAPS = { 'FT_STROKER_LINECAP_BUTT' : 0,
- 'FT_STROKER_LINECAP_ROUND' : 1,
- 'FT_STROKER_LINECAP_SQUARE' : 2}
-globals().update(FT_STROKER_LINECAPS)
-
-
-
-#
-----------------------------------------------------------------------------
-# These values are used to select a given stroke border in
-# FT_Stroker_GetBorderCounts and FT_Stroker_ExportBorder.
-#
-# FT_STROKER_BORDER_LEFT
-# Select the left border, relative to the drawing direction.
-#
-# FT_STROKER_BORDER_RIGHT
-# Select the right border, relative to the drawing direction.
-#
-# Note
-# Applications are generally interested in the 'inside' and 'outside'
-# borders. However, there is no direct mapping between these and
the 'left' and
-# 'right' ones, since this really depends on the glyph's drawing
orientation,
-# which varies between font formats.
-#
-# You can however use FT_Outline_GetInsideBorder and
-# FT_Outline_GetOutsideBorder to get these.
-#
-FT_STROKER_BORDERS = { 'FT_STROKER_BORDER_LEFT' : 0,
- 'FT_STROKER_BORDER_RIGHT' : 1}
-globals().update(FT_STROKER_BORDERS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of values to identify various types of LCD filters.
-#
-# FT_LCD_FILTER_NONE
-# Do not perform filtering. When used with subpixel rendering, this
results in
-# sometimes severe color fringes.
-#
-# FT_LCD_FILTER_DEFAULT
-# The default filter reduces color fringes considerably, at the cost of a
-# slight blurriness in the output.
-#
-# FT_LCD_FILTER_LIGHT
-# The light filter is a variant that produces less blurriness at the cost
of
-# slightly more color fringes than the default one. It might be better,
-# depending on taste, your monitor, or your personal vision.
-#
-# FT_LCD_FILTER_LEGACY
-# This filter corresponds to the original libXft color filter. It provides
high
-# contrast output but can exhibit really bad color fringes if glyphs are
not
-# extremely well hinted to the pixel grid. In other words, it only works
well
-# if the TrueType bytecode interpreter is enabled and high-quality hinted
fonts
-# are used.
-#
-# This filter is only provided for comparison purposes, and might be
disabled
-# or stay unsupported in the future.
-
-FT_LCD_FILTERS = {'FT_LCD_FILTER_NONE' : 0,
- 'FT_LCD_FILTER_DEFAULT' : 1,
- 'FT_LCD_FILTER_LIGHT' : 2,
- 'FT_LCD_FILTER_LEGACY' : 16}
-globals().update(FT_LCD_FILTERS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of valid values for the 'platform_id' identifier code in
FT_CharMapRec
-# and FT_SfntName structures.
-#
-# TT_PLATFORM_APPLE_UNICODE
-# Used by Apple to indicate a Unicode character map and/or name entry. See
-# TT_APPLE_ID_XXX for corresponding 'encoding_id' values. Note that name
-# entries in this format are coded as big-endian UCS-2 character codes
only.
-#
-# TT_PLATFORM_MACINTOSH
-# Used by Apple to indicate a MacOS-specific charmap and/or name entry. See
-# TT_MAC_ID_XXX for corresponding 'encoding_id' values. Note that most
TrueType
-# fonts contain an Apple roman charmap to be usable on MacOS systems (even
if
-# they contain a Microsoft charmap as well).
-#
-# TT_PLATFORM_ISO
-# This value was used to specify ISO/IEC 10646 charmaps. It is however now
-# deprecated. See TT_ISO_ID_XXX for a list of corresponding 'encoding_id'
-# values.
-#
-# TT_PLATFORM_MICROSOFT
-# Used by Microsoft to indicate Windows-specific charmaps. See
TT_MS_ID_XXX for
-# a list of corresponding 'encoding_id' values. Note that most fonts
contain a
-# Unicode charmap using (TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS).
-#
-# TT_PLATFORM_CUSTOM
-# Used to indicate application-specific charmaps.
-#
-# TT_PLATFORM_ADOBE
-# This value isn't part of any font format specification, but is used by
-# FreeType to report Adobe-specific charmaps in an FT_CharMapRec
structure. See
-# TT_ADOBE_ID_XXX.
-
-TT_PLATFORMS = {
- 'TT_PLATFORM_APPLE_UNICODE' : 0,
- 'TT_PLATFORM_MACINTOSH' : 1,
- 'TT_PLATFORM_ISO' : 2, # deprecated
- 'TT_PLATFORM_MICROSOFT' : 3,
- 'TT_PLATFORM_CUSTOM' : 4,
- 'TT_PLATFORM_ADOBE' : 7} # artificial
-globals().update(TT_PLATFORMS)
-
-
-#
-----------------------------------------------------------------------------
-# A list of valid values for the 'encoding_id' for
TT_PLATFORM_APPLE_UNICODE
-# charmaps and name entries.
-#
-# TT_APPLE_ID_DEFAULT
-# Unicode version 1.0.
-#
-# TT_APPLE_ID_UNICODE_1_1
-# Unicode 1.1; specifies Hangul characters starting at U+34xx.
-#
-# TT_APPLE_ID_ISO_10646
-# Deprecated (identical to preceding).
-#
-# TT_APPLE_ID_UNICODE_2_0
-# Unicode 2.0 and beyond (UTF-16 BMP only).
-#
-# TT_APPLE_ID_UNICODE_32
-# Unicode 3.1 and beyond, using UTF-32.
-#
-# TT_APPLE_ID_VARIANT_SELECTOR
-# From Adobe, not Apple. Not a normal cmap. Specifies variations on a real
-# cmap.
-TT_APPLE_IDS = {
- 'TT_APPLE_ID_DEFAULT' : 0,
- 'TT_APPLE_ID_UNICODE_1_1' : 1,
- 'TT_APPLE_ID_ISO_10646' : 2,
- 'TT_APPLE_ID_UNICODE_2_0' : 3,
- 'TT_APPLE_ID_UNICODE_32' : 4,
- 'TT_APPLE_ID_VARIANT_SELECTOR' : 5 }
-globals().update(TT_APPLE_IDS)
-
-
-
-#
-----------------------------------------------------------------------------
-# A list of valid values for the 'encoding_id' for TT_PLATFORM_MACINTOSH
-# charmaps and name entries.
-TT_MAC_IDS = {
- 'TT_MAC_ID_ROMAN' : 0,
- 'TT_MAC_ID_JAPANESE' : 1,
- 'TT_MAC_ID_TRADITIONAL_CHINESE' : 2,
- 'TT_MAC_ID_KOREAN' : 3,
- 'TT_MAC_ID_ARABIC' : 4,
- 'TT_MAC_ID_HEBREW' : 5,
- 'TT_MAC_ID_GREEK' : 6,
- 'TT_MAC_ID_RUSSIAN' : 7,
- 'TT_MAC_ID_RSYMBOL' : 8,
- 'TT_MAC_ID_DEVANAGARI' : 9,
- 'TT_MAC_ID_GURMUKHI' : 10,
- 'TT_MAC_ID_GUJARATI' : 11,
- 'TT_MAC_ID_ORIYA' : 12,
- 'TT_MAC_ID_BENGALI' : 13,
- 'TT_MAC_ID_TAMIL' : 14,
- 'TT_MAC_ID_TELUGU' : 15,
- 'TT_MAC_ID_KANNADA' : 16,
- 'TT_MAC_ID_MALAYALAM' : 17,
- 'TT_MAC_ID_SINHALESE' : 18,
- 'TT_MAC_ID_BURMESE' : 19,
- 'TT_MAC_ID_KHMER' : 20,
- 'TT_MAC_ID_THAI' : 21,
- 'TT_MAC_ID_LAOTIAN' : 22,
- 'TT_MAC_ID_GEORGIAN' : 23,
- 'TT_MAC_ID_ARMENIAN' : 24,
- 'TT_MAC_ID_MALDIVIAN' : 25,
- 'TT_MAC_ID_SIMPLIFIED_CHINESE' : 25,
- 'TT_MAC_ID_TIBETAN' : 26,
- 'TT_MAC_ID_MONGOLIAN' : 27,
- 'TT_MAC_ID_GEEZ' : 28,
- 'TT_MAC_ID_SLAVIC' : 29,
- 'TT_MAC_ID_VIETNAMESE' : 30,
- 'TT_MAC_ID_SINDHI' : 31,
- 'TT_MAC_ID_UNINTERP' : 32}
-globals().update(TT_MAC_IDS)
-
-
-#
-----------------------------------------------------------------------------
-# A list of valid values for the 'encoding_id' for TT_PLATFORM_MICROSOFT
-# charmaps and name entries.
-#
-# TT_MS_ID_SYMBOL_CS
-# Corresponds to Microsoft symbol encoding. See FT_ENCODING_MS_SYMBOL.
-#
-# TT_MS_ID_UNICODE_CS
-# Corresponds to a Microsoft WGL4 charmap, matching Unicode. See
-# FT_ENCODING_UNICODE.
-#
-# TT_MS_ID_SJIS
-# Corresponds to SJIS Japanese encoding. See FT_ENCODING_SJIS.
-#
-# TT_MS_ID_GB2312
-# Corresponds to Simplified Chinese as used in Mainland China. See
-# FT_ENCODING_GB2312.
-#
-# TT_MS_ID_BIG_5
-# Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See
-# FT_ENCODING_BIG5.
-#
-# TT_MS_ID_WANSUNG
-# Corresponds to Korean Wansung encoding. See FT_ENCODING_WANSUNG.
-#
-# TT_MS_ID_JOHAB
-# Corresponds to Johab encoding. See FT_ENCODING_JOHAB.
-#
-# TT_MS_ID_UCS_4
-# Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the
OpenType
-# specification version 1.4 (mid-2001.)
-
-TT_MS_IDS = {
- 'TT_MS_ID_SYMBOL_CS' : 0,
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/examples/wordle.py Sun May 15 23:34:41 2011
+++ /trunk/examples/wordle.py Tue Jun 26 06:24:11 2012
@@ -90,7 +90,7 @@
import Image

n_words = 100
- H, W = 600, 800
+ H, W, dpi = 600, 800, 72.0
I = np.zeros((H, W, 3), dtype=np.ubyte)
S = np.random.normal(0,1,n_words)
S = (S-S.min())/(S.max()-S.min())
@@ -128,7 +128,10 @@
break

print "Number of fails:", fails
- plt.imshow(I, interpolation='nearest', cmap=plt.cm.gray,
origin='lower')
+ fig = plt.figure(figsize=(W/dpi,H/dpi), dpi=dpi)
+ ax = fig.add_axes([0,0,1,1], frameon=False)
+ ax.imshow(I, interpolation='nearest', cmap=plt.cm.gray, origin='lower')
+ #plt.axis('off')
plt.show()
I = Image.fromarray(I[::-1,::1,::1], mode='RGB')
I.save('wordle.png')
=======================================
--- /trunk/freetype/__init__.py Tue Apr 17 23:22:54 2012
+++ /trunk/freetype/__init__.py Tue Jun 26 06:24:11 2012
@@ -13,11 +13,10 @@
somewhere on your system).

Note:
------
-C Library will be searched using the ctypes.util.find_library. However,
this
-search might fail. In such a case (or for other reasons), you can specify
the
-FT_library_filename before importing the freetype library and freetype
will use
-the specified one.
+ C Library will be searched using the ctypes.util.find_library. However,
this
+ search might fail. In such a case (or for other reasons), you can
specify the
+ FT_library_filename before importing the freetype library and freetype
will use
+ the specified one.
'''
from ctypes import *
from ft_types import *
@@ -261,9 +260,7 @@
'''
Create a new BBox object.

- Parameters:
- -----------
- bbox : a FT_BBox or a tuple of 4 values
+ :param bbox: a FT_BBox or a tuple of 4 values
'''
if type(bbox) is FT_BBox:
self._FT_BBox = bbox
@@ -311,9 +308,7 @@
'''
Create a new SizeMetrics object.

- Parameters:
- -----------
- metrics : a FT_SizeMetrics
+ :param metrics: a FT_SizeMetrics
'''
self._FT_Size_Metrics = metrics

@@ -378,9 +373,7 @@
'''
Create a new SizeMetrics object.

- Parameters:
- -----------
- size : a FT_Bitmap_Size
+ :param size: a FT_Bitmap_Size
'''
self._FT_Bitmap_Size = size

@@ -412,19 +405,17 @@
A structure used to describe a bitmap or pixmap to the raster. Note
that we
now manage pixmaps of various depths through the 'pixel_mode' field.

- Note:
- -----
- For now, the only pixel modes supported by FreeType are mono and
- grays. However, drivers might be added in the future to support more
- 'colorful' options.
+ *Note*:
+
+ For now, the only pixel modes supported by FreeType are mono and
+ grays. However, drivers might be added in the future to support more
+ 'colorful' options.
'''
def __init__(self, bitmap):
'''
Create a new Bitmap object.

- Parameters:
- -----------
- bitmap : a FT_Bitmap
+ :param bitmap: a FT_Bitmap
'''
self._FT_Bitmap = bitmap

@@ -496,16 +487,16 @@
The currently active charmap is available as 'face.charmap'. You should
call FT_Set_Charmap to change it.

- Note:
- -----
- When a new face is created (either through FT_New_Face or
FT_Open_Face),
- the library looks for a Unicode charmap within the list and
automatically
- activates it.
-
- See also:
- ---------
- See FT_CharMapRec for the publicly accessible fields of a given
character
- map.
+ **Note**:
+
+ When a new face is created (either through FT_New_Face or
FT_Open_Face),
+ the library looks for a Unicode charmap within the list and
automatically
+ activates it.
+
+ **See also**:
+
+ See FT_CharMapRec for the publicly accessible fields of a given
character
+ map.
'''

def __init__( self, charmap ):
@@ -576,9 +567,7 @@
'''
Create a new Outline object.

- Parameters:
- -----------
- charmap : a FT_Outline
+ :param charmap: a FT_Outline
'''
self._FT_Outline = outline

@@ -631,9 +620,8 @@
Retrieve the FT_StrokerBorder value corresponding to the 'inside'
borders of a given outline.

- Return:
- The border index. FT_STROKER_BORDER_RIGHT for empty or invalid
- outlines.
+ :return: The border index. FT_STROKER_BORDER_RIGHT for empty or
invalid
+ outlines.
'''
return FT_Outline_GetInsideBorder( self._FT_Outline )

@@ -642,9 +630,8 @@
Retrieve the FT_StrokerBorder value corresponding to the 'outside'
borders of a given outline.

- Return:
- The border index. FT_STROKER_BORDER_RIGHT for empty or invalid
- outlines.
+ :return: The border index. FT_STROKER_BORDER_RIGHT for empty or
invalid
+ outlines.
'''
return FT_Outline_GetInsideBorder( self._FT_Outline )

@@ -693,9 +680,7 @@
'''
Create Glyph object from an FT glyph.

- Parameters:
- -----------
- glyph: valid FT_Glyph object
+ :param glyph: valid FT_Glyph object
'''
self._FT_Glyph = glyph

@@ -715,15 +700,14 @@
'''
Stroke a given outline glyph object with a given stroker.

- Parameters:
- -----------
- stroker: A stroker handle.
-
- destroy: A Boolean. If 1, the source glyph object is destroyed on
- success.
- Note:
- -----
- The source glyph is untouched in case of error.
+ :param stroker: A stroker handle.
+
+ :param destroy: A Boolean. If 1, the source glyph object is
destroyed on
+ success.
+
+ **Note**:
+
+ The source glyph is untouched in case of error.
'''
error = FT_Glyph_Stroke( byref(self._FT_Glyph),
stroker._FT_Stroker, destroy )
@@ -733,28 +717,26 @@
'''
Convert a given glyph object to a bitmap glyph object.

- Parameters:
- -----------
- mode: An enumeration that describes how the data is rendered.
-
- origin: A pointer to a vector used to translate the glyph image
- before rendering. Can be 0 (if no translation). The origin
is
- expressed in 26.6 pixels.
-
- destroy: A boolean that indicates that the original glyph image
- should be destroyed by this function. It is never
destroyed
- in case of error.
-
- Note:
- -----
- This function does nothing if the glyph format isn't scalable.
-
- The glyph image is translated with the 'origin' vector before
- rendering.
-
- The first parameter is a pointer to an FT_Glyph handle, that will
be
- replaced by this function (with newly allocated data). Typically,
you
- would use (omitting error handling):
+ :param mode: An enumeration that describes how the data is
rendered.
+
+ :param origin: A pointer to a vector used to translate the glyph
image
+ before rendering. Can be 0 (if no translation). The
origin is
+ expressed in 26.6 pixels.
+
+ :param destroy: A boolean that indicates that the original glyph
image
+ should be destroyed by this function. It is never
destroyed
+ in case of error.
+
+ **Note**:
+
+ This function does nothing if the glyph format isn't scalable.
+
+ The glyph image is translated with the 'origin' vector before
+ rendering.
+
+ The first parameter is a pointer to an FT_Glyph handle, that
will be
+ replaced by this function (with newly allocated data).
Typically, you
+ would use (omitting error handling):
'''
error = FT_Glyph_To_Bitmap( byref(self._FT_Glyph),
mode, origin, destroy)
@@ -774,44 +756,40 @@
in the outline. To get the latter, you can use the 'ftbbox'
component
which is dedicated to this single task.

- Parameters:
- -----------
-
- mode : The mode which indicates how to interpret the returned
bounding
- box values.
-
- Note:
- -----
-
- Coordinates are relative to the glyph origin, using the y upwards
- convention.
-
- If the glyph has been loaded with FT_LOAD_NO_SCALE, 'bbox_mode'
must be
- set to FT_GLYPH_BBOX_UNSCALED to get unscaled font units in 26.6
pixel
- format. The value FT_GLYPH_BBOX_SUBPIXELS is another name for this
- constant.
-
- Note that the maximum coordinates are exclusive, which means that
one
- can compute the width and height of the glyph image (be it in
integer
- or 26.6 pixels) as:
-
- width = bbox.xMax - bbox.xMin;
- height = bbox.yMax - bbox.yMin;
-
- Note also that for 26.6 coordinates, if 'bbox_mode' is set to
- FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,
which
- corresponds to:
-
- bbox.xMin = FLOOR(bbox.xMin);
- bbox.yMin = FLOOR(bbox.yMin);
- bbox.xMax = CEILING(bbox.xMax);
- bbox.yMax = CEILING(bbox.yMax);
-
- To get the bbox in pixel coordinates, set 'bbox_mode' to
- FT_GLYPH_BBOX_TRUNCATE.
-
- To get the bbox in grid-fitted pixel coordinates, set 'bbox_mode'
to
- FT_GLYPH_BBOX_PIXELS.
+ :param mode: The mode which indicates how to interpret the returned
+ bounding box values.
+
+ **Note**:
+
+ Coordinates are relative to the glyph origin, using the y upwards
+ convention.
+
+ If the glyph has been loaded with FT_LOAD_NO_SCALE, 'bbox_mode'
must be
+ set to FT_GLYPH_BBOX_UNSCALED to get unscaled font units in 26.6
pixel
+ format. The value FT_GLYPH_BBOX_SUBPIXELS is another name for
this
+ constant.
+
+ Note that the maximum coordinates are exclusive, which means
that one
+ can compute the width and height of the glyph image (be it in
integer
+ or 26.6 pixels) as:
+
+ width = bbox.xMax - bbox.xMin;
+ height = bbox.yMax - bbox.yMin;
+
+ Note also that for 26.6 coordinates, if 'bbox_mode' is set to
+ FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,
which
+ corresponds to:
+
+ bbox.xMin = FLOOR(bbox.xMin);
+ bbox.yMin = FLOOR(bbox.yMin);
+ bbox.xMax = CEILING(bbox.xMax);
+ bbox.yMax = CEILING(bbox.yMax);
+
+ To get the bbox in pixel coordinates, set 'bbox_mode' to
+ FT_GLYPH_BBOX_TRUNCATE.
+
+ To get the bbox in grid-fitted pixel coordinates,
set 'bbox_mode' to
+ FT_GLYPH_BBOX_PIXELS.
'''
bbox = FT_BBox()
error = FT_Glyph_Get_CBox(byref(self._FT_Glyph),
bbox_mode,byref(bbox))
@@ -984,6 +962,7 @@

:param str filename:
A path to the font file.
+
:param int index:
The index of the face within the font.
The first face has index 0.
@@ -1012,8 +991,11 @@
points).

:param float width: The nominal width, in 26.6 fractional points.
+
:param float height: The nominal height, in 26.6 fractional points.
+
:param float hres: The horizontal resolution in dpi.
+
:param float vres: The vertical resolution in dpi.

**Note**
@@ -1037,11 +1019,9 @@
This function calls FT_Request_Size to request the nominal size (in
pixels).

- Parameters:
- -----------
- width: The nominal width, in pixels.
-
- height: The nominal height, in pixels.
+ :param width: The nominal width, in pixels.
+
+ :param height: The nominal height, in pixels.
'''
error = FT_Set_Pixel_Sizes( self._FT_Face, width, height )
if error: raise FT_Exception(error)
@@ -1050,15 +1030,15 @@
'''
Select a given charmap by its encoding tag (as listed
in 'freetype.h').

- Note:
- -----
- This function returns an error if no charmap in the face
corresponds to
- the encoding queried here.
-
- Because many fonts contain more than a single cmap for Unicode
- encoding, this function has some special code to select the one
which
- covers Unicode best ('best' in the sense that a UCS-4 cmap is
preferred
- to a UCS-2 cmap). It is thus preferable to FT_Set_Charmap in this
case.
+ **Note**:
+
+ This function returns an error if no charmap in the face
corresponds to
+ the encoding queried here.
+
+ Because many fonts contain more than a single cmap for Unicode
+ encoding, this function has some special code to select the one
which
+ covers Unicode best ('best' in the sense that a UCS-4 cmap is
preferred
+ to a UCS-2 cmap). It is thus preferable to FT_Set_Charmap in
this case.
'''
error = FT_Select_Charmap( self._FT_Face, encoding )
if error: raise FT_Exception(error)
@@ -1067,9 +1047,7 @@
'''
Select a given charmap for character code to glyph index mapping.

- Parameters:
- -----------
- charmap: A handle to the selected charmap.
+ :param charmap: A handle to the selected charmap.
'''
error = FT_Set_Charmap( self._FT_Face, charmap._FT_Charmap )
if error : raise FT_Exception(error)
@@ -1079,16 +1057,14 @@
Return the glyph index of a given character code. This function
uses a
charmap object to do the mapping.

- Parameters:
- -----------
- charcode: The character code.
-
- Note:
- -----
- If you use FreeType to manipulate the contents of font files
directly,
- be aware that the glyph index returned by this function doesn't
always
- correspond to the internal indices used within the file. This is
done
- to ensure that value 0 always corresponds to the 'missing glyph'.
+ :param charcode: The character code.
+
+ **Note**:
+
+ If you use FreeType to manipulate the contents of font files
directly,
+ be aware that the glyph index returned by this function doesn't
always
+ correspond to the internal indices used within the file. This is
done
+ to ensure that value 0 always corresponds to the 'missing glyph'.
'''
if type( charcode ) in (str,unicode):
charcode = ord( charcode )
@@ -1099,19 +1075,17 @@
This function is used to return the first character code in the
current
charmap of a given face. It also returns the corresponding glyph
index.

- Return:
- -------
- Glyph index of first character code. 0 if charmap is empty.
-
- Note:
- -----
- You should use this function with get_next_char to be able to parse
- all character codes available in a given charmap. The code should
look
- like this:
-
- Note that 'agindex' is set to 0 if the charmap is empty. The result
- itself can be 0 in two cases: if the charmap is empty or if the
value 0
- is the first valid character code.
+ :return: Glyph index of first character code. 0 if charmap is
empty.
+
+ **Note**:
+
+ You should use this function with get_next_char to be able to
parse
+ all character codes available in a given charmap. The code
should look
+ like this:
+
+ Note that 'agindex' is set to 0 if the charmap is empty. The
result
+ itself can be 0 in two cases: if the charmap is empty or if the
value 0
+ is the first valid character code.
'''
agindex = FT_UInt()
charcode = FT_Get_First_Char( self._FT_Face, byref(agindex) )
@@ -1123,20 +1097,18 @@
charmap of a given face following the value 'charcode', as well as
the
corresponding glyph index.

- Parameters:
- -----------
- charcode: The starting character code.
-
- agindex: Glyph index of next character code. 0 if charmap is empty.
-
- Note:
- -----
- You should use this function with FT_Get_First_Char to walk over
all
- character codes available in a given charmap. See the note for this
- function for a simple code example.
-
- Note that 'agindex' is set to 0 when there are no more
- codes in the charmap.
+ :param charcode: The starting character code.
+
+ :param agindex: Glyph index of next character code. 0 if charmap
is empty.
+
+ **Note**:
+
+ You should use this function with FT_Get_First_Char to walk over
all
+ character codes available in a given charmap. See the note for
this
+ function for a simple code example.
+
+ Note that 'agindex' is set to 0 when there are no more codes in
the
+ charmap.
'''
agindex = FT_UInt( 0 ) #agindex )
charcode = FT_Get_Next_Char( self._FT_Face, charcode,
byref(agindex) )
@@ -1147,9 +1119,7 @@
Return the glyph index of a given glyph name. This function uses
driver
specific objects to do the translation.

- Parameters:
- -----------
- glyph_name: The glyph name.
+ :param name: The glyph name.
'''
return FT_Get_Name_Index( self._FT_Face, name )

@@ -1158,23 +1128,21 @@
A function used to set the transformation that is applied to glyph
images when they are loaded into a glyph slot through
FT_Load_Glyph.

- Parameters:
- -----------
- matrix: A pointer to the transformation's 2x2 matrix.
- Use 0 for the identity matrix.
-
- delta: A pointer to the translation vector.
- Use 0 for the null vector.
-
- Note:
- -----
- The transformation is only applied to scalable image formats after
the
- glyph has been loaded. It means that hinting is unaltered by the
- transformation and is performed on the character size given in the
last
- call to FT_Set_Char_Size or FT_Set_Pixel_Sizes.
-
- Note that this also transforms the 'face.glyph.advance'
- field, but not the values in 'face.glyph.metrics'.
+ :param matrix: A pointer to the transformation's 2x2 matrix.
+ Use 0 for the identity matrix.
+
+ :parm delta: A pointer to the translation vector.
+ Use 0 for the null vector.
+
+ **Note**:
+
+ The transformation is only applied to scalable image formats
after the
+ glyph has been loaded. It means that hinting is unaltered by the
+ transformation and is performed on the character size given in
the last
+ call to FT_Set_Char_Size or FT_Set_Pixel_Sizes.
+
+ Note that this also transforms the 'face.glyph.advance' field,
but
+ not the values in 'face.glyph.metrics'.
'''
FT_Set_Transform( self._FT_Face,
byref(matrix), byref(delta) )
@@ -1183,11 +1151,8 @@
'''
Select a bitmap strike.

- Parameters:
- -----------
-
- strike_index: The index of the bitmap strike in the
- 'available_sizes' field of Face object.
+ :param strike_index: The index of the bitmap strike in the
+ 'available_sizes' field of Face object.
'''
error = FT_Select_Size( self._FT_Face, strike_index )
if error: raise FT_Exception( error )
@@ -1197,26 +1162,24 @@
A function used to load a single glyph into the glyph slot of a
face
object.

- Parameters:
- -----------
- index: The index of the glyph in the font file. For CID-keyed fonts
- (either in PS or in CFF format) this argument specifies the
CID
- value.
-
- flags: A flag indicating what to load for this glyph. The
FT_LOAD_XXX
- constants can be used to control the glyph loading process
- (e.g., whether the outline should be scaled, whether to load
- bitmaps or not, whether to hint the outline, etc).
-
- Note:
- -----
- The loaded glyph may be transformed. See FT_Set_Transform for the
- details.
-
- For subsetted CID-keyed fonts, 'FT_Err_Invalid_Argument' is
returned
- for invalid CID values (this is, for CID values which don't have a
- corresponding glyph in the font). See the discussion of the
- FT_FACE_FLAG_CID_KEYED flag for more details.
+ :param index: The index of the glyph in the font file. For
CID-keyed
+ fonts (either in PS or in CFF format) this argument
+ specifies the CID value.
+
+ :param flags: A flag indicating what to load for this glyph. The
FT_LOAD_XXX
+ constants can be used to control the glyph loading
process
+ (e.g., whether the outline should be scaled, whether
to load
+ bitmaps or not, whether to hint the outline, etc).
+
+ **Note**:
+
+ The loaded glyph may be transformed. See FT_Set_Transform for the
+ details.
+
+ For subsetted CID-keyed fonts, 'FT_Err_Invalid_Argument' is
returned
+ for invalid CID values (this is, for CID values which don't have
a
+ corresponding glyph in the font). See the discussion of the
+ FT_FACE_FLAG_CID_KEYED flag for more details.
'''
error = FT_Load_Glyph( self._FT_Face, index, flags )
if error: raise FT_Exception( error )
@@ -1226,19 +1189,18 @@
A function used to load a single glyph into the glyph slot of a
face
object, according to its character code.

- Parameters:
- -----------
- char: The glyph's character code, according to the current charmap
used
- in the face.
-
- flags: A flag indicating what to load for this glyph. The
FT_LOAD_XXX
- constants can be used to control the glyph loading process
- (e.g., whether the outline should be scaled, whether to load
- bitmaps or not, whether to hint the outline, etc).
-
- Note:
- -----
- This function simply calls FT_Get_Char_Index and FT_Load_Glyph.
+ :param char: The glyph's character code, according to the current
+ charmap used in the face.
+
+ :param flags: A flag indicating what to load for this glyph. The
+ FT_LOAD_XXX constants can be used to control the
glyph
+ loading process (e.g., whether the outline should be
+ scaled, whether to load bitmaps or not, whether to
hint
+ the outline, etc).
+
+ **Note**:
+
+ This function simply calls FT_Get_Char_Index and FT_Load_Glyph.
'''

if len(char) == 1:
@@ -1252,21 +1214,17 @@
Retrieve the advance value of a given glyph outline in an FT_Face.
By
default, the unhinted advance is returned in font units.

- Parameters:
- -----------
- gindex: The glyph index.
-
- flags: A set of bit flags similar to those used when calling
- FT_Load_Glyph, used to determine what kind of advances you
- need.
-
- Return:
- -------
- The advance value, in either font units or 16.16 format.
-
- If FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical advance
- corresponding to a vertical layout. Otherwise, it is the horizontal
- advance in a horizontal layout.
+ :param gindex: The glyph index.
+
+ :param flags: A set of bit flags similar to those used when calling
+ FT_Load_Glyph, used to determine what kind of
advances
+ you need.
+
+ :return: The advance value, in either font units or 16.16 format.
+
+ If FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical
+ advance corresponding to a vertical layout. Otherwise, it
is
+ the horizontal advance in a horizontal layout.
'''

padvance = FT_Fixed(0)
@@ -1280,21 +1238,19 @@
'''
Return the kerning vector between two glyphs of a same face.

- Parameters:
- -----------
- left: The index of the left glyph in the kern pair.
-
- right: The index of the right glyph in the kern pair.
-
- mode: See FT_Kerning_Mode for more information. Determines the
scale
- and dimension of the returned kerning vector.
-
- Note:
- -----
- Only horizontal layouts (left-to-right & right-to-left) are
supported
- by this method. Other layouts, or more sophisticated kernings, are
out
- of the scope of this API function -- they can be implemented
through
- format-specific interfaces.
+ :param left: The index of the left glyph in the kern pair.
+
+ :param right: The index of the right glyph in the kern pair.
+
+ :param mode: See FT_Kerning_Mode for more information. Determines
the scale
+ and dimension of the returned kerning vector.
+
+ **Note**:
+
+ Only horizontal layouts (left-to-right & right-to-left) are
supported
+ by this method. Other layouts, or more sophisticated kernings,
are out
+ of the scope of this API function -- they can be implemented
through
+ format-specific interfaces.
'''
left_glyph = self.get_char_index( left )
right_glyph = self.get_char_index( right )
@@ -1308,8 +1264,8 @@
'''
Return a string describing the format of a given face, using values
which can be used as an X11 FONT_PROPERTY. Possible values are
- ‘TrueType’, ‘Type 1’, ‘BDF’, ‘PCF’, ‘Type 42’, ‘CID Type 1’, ‘CFF’,
- ‘PFR’, and ‘Windows FNT’.
+ 'TrueType', 'Type 1', 'BDF', ‘PCF', ‘Type 42', ‘CID Type 1', ‘CFF',
+ 'PFR', and ‘Windows FNT'.
'''

return FT_Get_X11_Font_Format( self._FT_Face )
@@ -1338,19 +1294,17 @@
'''
Retrieve a string of the SFNT 'name' table for a given index

- Parameters:
- -----------
- index: The index of the 'name' string.
-
- Note:
- -----
- The 'string' array returned in the 'aname' structure is not
- null-terminated. The application should deallocate it if it is no
- longer in use.
-
- Use FT_Get_Sfnt_Name_Count to get the total number of
available 'name'
- table entries, then do a loop until you get the right platform,
- encoding, and name ID.
+ :param index: The index of the 'name' string.
+
+ **Note**:
+
+ The 'string' array returned in the 'aname' structure is not
+ null-terminated. The application should deallocate it if it is no
+ longer in use.
+
+ Use FT_Get_Sfnt_Name_Count to get the total number of available
+ 'name' table entries, then do a loop until you get the right
+ platform, encoding, and name ID.
'''
name = FT_SfntName( )
error = FT_Get_Sfnt_Name( self._FT_Face, index, byref(name) )
@@ -1603,9 +1557,7 @@
'''
Create a new SfntName object.

- Parameters:
- -----------
- name : SFNT 'name' table entry.
+ :param name : SFNT 'name' table entry.

'''
self._FT_SfntName = name
@@ -1681,21 +1633,18 @@
'''
Reset a stroker object's attributes.

- Parameters:
- -----------
- radius : The border radius.
-
- line_cap : The line cap style.
-
- line_join : The line join style.
-
- miter_limit: The miter limit for the FT_STROKER_LINEJOIN_MITER
- style, expressed as 16.16 fixed point value.
-
- Note:
- -----
- The radius is expressed in the same units as the outline
- coordinates.
+ :param radius: The border radius.
+
+ :param line_cap: The line cap style.
+
+ :param line_join: The line join style.
+
+ :param miter_limit: The miter limit for the
FT_STROKER_LINEJOIN_MITER
+ style, expressed as 16.16 fixed point value.
+
+ **Note**:
+
+ The radius is expressed in the same units as the outline
coordinates.
'''
FT_Stroker_Set( self._FT_Stroker,
radius, line_cap, line_join, miter_limit )
@@ -1716,43 +1665,39 @@
stroker. The resulting outline(s) can be retrieved later by
functions
like FT_Stroker_GetCounts and FT_Stroker_Export.

- Parameters:
- -----------
- outline: The source outline.
-
- opened : A boolean. If 1, the outline is treated as an open path
- instead of a closed one.
-
- Note:
- -----
- If 'opened' is 0 (the default), the outline is treated as a closed
- path, and the stroker generates two distinct 'border' outlines.
-
- If 'opened' is 1, the outline is processed as an open path, and the
- stroker generates a single 'stroke' outline.
-
- This function calls 'rewind' automatically.
+ :param outline: The source outline.
+
+ :pram opened: A boolean. If 1, the outline is treated as an open
path
+ instead of a closed one.
+
+ **Note**:
+
+ If 'opened' is 0 (the default), the outline is treated as a
closed
+ path, and the stroker generates two distinct 'border' outlines.
+
+ If 'opened' is 1, the outline is processed as an open path, and
the
+ stroker generates a single 'stroke' outline.
+
+ This function calls 'rewind' automatically.
'''
error = FT_Stroker_ParseOutline( self._FT_Stroker, outline, opened)
if error: raise FT_Exception( error )


- def begin_subpath( self, to, open_ ):
+ def begin_subpath( self, to, _open ):
'''
Start a new sub-path in the stroker.

- Parameters:
- -----------
- to : A pointer to the start vector.
-
- open_: A boolean. If 1, the sub-path is treated as an open one.
-
- Note:
- -----
- This function is useful when you need to stroke a path that is not
- stored as an 'Outline' object.
+ :param to A pointer to the start vector.
+
+ :param _open: A boolean. If 1, the sub-path is treated as an open
one.
+
+ **Note**:
+
+ This function is useful when you need to stroke a path that is
not
+ stored as an 'Outline' object.
'''
- error = FT_Stroker_BeginSubPath( self._FT_Stroker, to, open_ )
+ error = FT_Stroker_BeginSubPath( self._FT_Stroker, to, _open )
if error: raise FT_Exception( error )


@@ -1760,11 +1705,11 @@
'''
Close the current sub-path in the stroker.

- Note:
- -----
- You should call this function after 'begin_subpath'. If the subpath
- was not 'opened', this function 'draws' a single line segment to
the
- start position when needed.
+ **Note**:
+
+ You should call this function after 'begin_subpath'. If the
subpath
+ was not 'opened', this function 'draws' a single line segment to
the
+ start position when needed.
'''
error = FT_Stroker_EndSubPath( self._FT_Stroker)
if error: raise FT_Exception( error )
@@ -1775,14 +1720,12 @@
'Draw' a single line segment in the stroker's current sub-path,
from
the last position.

- Parameters:
- -----------
- to: A pointer to the destination point.
-
- Note:
- -----
- You should call this function between 'begin_subpath' and
- 'end_subpath'.
+ :param to: A pointer to the destination point.
+
+ **Note**:
+
+ You should call this function between 'begin_subpath' and
+ 'end_subpath'.
'''
error = FT_Stroker_LineTo( self._FT_Stroker, to )
if error: raise FT_Exception( error )
@@ -1793,15 +1736,14 @@
'Draw' a single quadratic Bezier in the stroker's current sub-path,
from the last position.

- Parameters:
- -----------
- control: A pointer to a Bezier control point.
- to : A pointer to the destination point.
-
- Note:
- -----
- You should call this function between 'begin_subpath' and
- 'end_subpath'.
+ :param control: A pointer to a Bezier control point.
+
+ :param to: A pointer to the destination point.
+
+ **Note**:
+
+ You should call this function between 'begin_subpath' and
+ 'end_subpath'.
'''
error = FT_Stroker_ConicTo( self._FT_Stroker, control, to )
if error: raise FT_Exception( error )
@@ -1812,19 +1754,16 @@
'Draw' a single quadratic Bezier in the stroker's current sub-path,
from the last position.

- Parameters:
- -----------
- control1: A pointer to the first Bezier control point.
-
- control2: A pointer to second Bezier control point.
-
- to : A pointer to the destination point.
-
- Note:
- -----
-
- You should call this function between 'begin_subpath' and
- 'end_subpath'.
+ :param control1: A pointer to the first Bezier control point.
+
+ :param control2: A pointer to second Bezier control point.
+
+ :param to: A pointer to the destination point.
+
+ **Note**:
+
+ You should call this function between 'begin_subpath' and
+ 'end_subpath'.
'''
error = FT_Stroker_CubicTo( self._FT_Stroker, control1, control2,
to )
if error: raise FT_Exception( error )
@@ -1837,13 +1776,9 @@
export one of the 'border' or 'stroke' outlines generated by the
stroker.

- Parameters:
- -----------
- border: The border index.
-
- Return:
- -------
- number of points, number of contours
+ :param border: The border index.
+
+ :return: number of points, number of contours
'''
anum_points = FT_UInt()
anum_contours = FT_UInt()
@@ -1861,27 +1796,25 @@
Note that this function appends the border points and contours to
your
outline, but does not try to resize its arrays.

- Parameters:
- -----------
- border: The border index.
-
- outline: The target outline.
-
- Note:
- -----
- Always call this function after get_border_counts to get sure that
- there is enough room in your 'Outline' object to receive all new
- data.
-
- When an outline, or a sub-path, is 'closed', the stroker generates
two
- independent 'border' outlines, named 'left' and 'right'
-
- When the outline, or a sub-path, is 'opened', the stroker merges
the
- 'border' outlines with caps. The 'left' border receives all points,
- while the 'right' border becomes empty.
-
- Use the function export instead if you want to retrieve all borders
- at once.
+ :param border: The border index.
+
+ :param outline: The target outline.
+
+ **Note**:
+
+ Always call this function after get_border_counts to get sure
that
+ there is enough room in your 'Outline' object to receive all new
+ data.
+
+ When an outline, or a sub-path, is 'closed', the stroker
generates two
+ independent 'border' outlines, named 'left' and 'right'
+
+ When the outline, or a sub-path, is 'opened', the stroker merges
the
+ 'border' outlines with caps. The 'left' border receives all
points,
+ while the 'right' border becomes empty.
+
+ Use the function export instead if you want to retrieve all
borders
+ at once.
'''
FT_Stroker_ExportBorder( self._FT_Stroker, border,
outline._FT_Outline )

@@ -1892,9 +1825,7 @@
stroker. It returns the number of points and contours necessary to
export all points/borders from the stroked outline/path.

- Return:
- -------
- number of points, number of contours
+ :return: number of points, number of contours
'''

anum_points = FT_UInt()
@@ -1913,8 +1844,6 @@
Note that this function appends the border points and contours to
your
outline, but does not try to resize its arrays.

- Parameters:
- -----------
- outline: The target outline.
+ :param outline: The target outline.
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/setup.py Mon Jul 25 08:56:16 2011
+++ /trunk/setup.py Tue Jun 26 06:24:11 2012
@@ -6,14 +6,14 @@
from distutils.core import setup

setup( name = 'freetype-py',
- version = '0.3.3',
+ version = '1.0',
description = 'Freetype python bindings',
author = 'Nicolas P. Rougier',
author_email='Nicolas...@inria.fr',
url='http://code.google.com/p/freetype-py/',
- packages=['freetype'],
+ packages=['freetype', 'freetype.ft_enums'],
classifiers = [
- 'Development Status :: 4 - Beta',
+ 'Development Status :: 5 - Production/Stable',
'Environment :: X11 Applications',
'Environment :: MacOS X',
'Intended Audience :: Developers',
Reply all
Reply to author
Forward
0 new messages