Skip to content

Commit 8cddd01

Browse files
committed
freetype -> FreeType
1 parent 565f42a commit 8cddd01

File tree

10 files changed

+30
-15
lines changed

10 files changed

+30
-15
lines changed

doc/source/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Freetypy API documentation
33

44
.. currentmodule:: freetypy
55

6-
The API closely follows the `freetype API
6+
The API closely follows the `FreeType API
77
<http://freetype.org/freetype2/docs/reference/ft2-toc.html>`_. It is
88
not 100% complete, but it does contain the functionality that most
99
would need.
@@ -12,7 +12,7 @@ Names have been modified to follow Python's `PEP8 style guidelines
1212
<http://www.python.org/dev/peps/pep-0008/>`_.
1313

1414
Where appropriate, extra API functions have been added to make working
15-
with freetype more Pythonic. These methods are marked with the
15+
with FreeType more Pythonic. These methods are marked with the
1616
|freetypy| in the documentation.
1717

1818
Face

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
# dir menu entry, description, category)
241241
texinfo_documents = [
242242
('index', 'freetypy', u'freetypy Documentation',
243-
u'Michael Droettboom', 'freetypy', 'Python wrappers for freetype',
243+
u'Michael Droettboom', 'freetypy', 'Python wrappers for FreeType',
244244
'Fonts'),
245245
]
246246

doc/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
freetypy documentation
77
======================
88

9-
`freetypy` is a general-purpose Python wrapper to `freetype
9+
`freetypy` is a general-purpose Python wrapper to `FreeType
1010
<http://www.freetype.org>`_ with a goal to be fast and flexible as
1111
possible.
1212

doc/source/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Introduction to freetypy
22
========================
33

4-
Since freetypy closely follows freetype's native C API, the `freetype
4+
Since freetypy closely follows FreeType's native C API, the `FreeType
55
documentation <http://freetype.org/freetype2/docs/documentation.html>`_
66
serves as a good introduction to freetypy as well.
77

@@ -22,7 +22,7 @@ Then the size (in points) must be selected::
2222
>>> face.set_char_size(48)
2323

2424
Once that setup is performed, a glyph may be loaded. We pass
25-
``load_flags=ft.LOAD.RENDER`` to tell freetype to load the glyph
25+
``load_flags=ft.LOAD.RENDER`` to tell FreeType to load the glyph
2626
outline and then subsequently render it to a bitmap::
2727

2828
>>> glyph = face.load_char_unicode(u"S", load_flags=ft.LOAD.RENDER)

docstrings/bitmap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@
135135
- `LCD`: An 8-bit bitmap, representing RGB or BGR decimated glyph
136136
images used for display on LCD displays; the bitmap is three times
137137
wider than the original glyph image. See also `RENDER_MODE.LCD`. On
138-
many freetype builds, this functionality will be disabled due to
138+
many FreeType builds, this functionality will be disabled due to
139139
patent restrictions, in which case the resulting bitmap will be
140140
grayscale.
141141
142142
- `LCD_V`: An 8-bit bitmap, representing RGB or BGR decimated glyph
143143
images used for display on rotated LCD displays; the bitmap is three
144144
times taller than the original glyph image. See also
145-
`RENDER_MODE.LCD_V`. On many freetype builds, this functionality
145+
`RENDER_MODE.LCD_V`. On many FreeType builds, this functionality
146146
will be disabled due to patent restrictions, in which case the
147147
resulting bitmap will be grayscale.
148148
"""

docstrings/face.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,22 +346,37 @@
346346

347347
Face_tt_horiheader = """
348348
The TrueType horizontal header (`TT_HoriHeader`).
349+
350+
Isn't present in all font files. If missing, `AttributeError` is
351+
raised.
349352
"""
350353

351354
Face_tt_os2 = """
352355
The OS/2 TrueType header (`TT_OS2`).
356+
357+
Isn't present in all font files. If missing, `AttributeError` is
358+
raised.
353359
"""
354360

355361
Face_tt_pclt = """
356362
The PCLT header (`TT_Pclt`).
363+
364+
Isn't present in all font files. If missing, `AttributeError` is
365+
raised.
357366
"""
358367

359368
Face_tt_postscript = """
360369
The Postscript header (`TT_Postscript`).
370+
371+
Isn't present in all font files. If missing, `AttributeError` is
372+
raised.
361373
"""
362374

363375
Face_tt_vertheader = """
364376
The TrueType vertical header (`TT_VertHeader`).
377+
378+
Isn't present in all font files. If missing, `AttributeError` is
379+
raised.
365380
"""
366381

367382
Face_glyph = """
@@ -921,7 +936,7 @@
921936
rendered in non-monochrome modes.
922937
923938
- `TARGET_LCD`: A variant of `LOAD.TARGET_NORMAL` optimized for
924-
horizontally decimated LCD displays. On many freetype builds, this
939+
horizontally decimated LCD displays. On many FreeType builds, this
925940
functionality will be disabled due to patent restrictions, in which
926941
case the resulting bitmap will be grayscale.
927942

docstrings/subglyph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
7777
- `TWOXTWO`: If set, there is a 2-by-2 transformation that will be
7878
used to scale the component. (|freetypy| This is named `2X2` in the
79-
underlying freetype library, but was renamed here so it doesn't
79+
underlying FreeType library, but was renamed here so it doesn't
8080
begin with a digit.)
8181
8282
- `USE_MY_METRICS`: Use metrics from this component for the compound

src/freetypy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ PyObject *freetypy_module;
127127
#else
128128
freetypy_module = Py_InitModule3(
129129
"_freetypy", module_methods,
130-
"Freetype bindings");
130+
"FreeType bindings");
131131
#endif
132132

133133
if (freetypy_module == NULL) {

src/freetypy_error.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ int ftpy_exc(FT_Error error)
4949
entry = &errors[error];
5050
if (entry->code == 0) {
5151
PyErr_Format(
52-
PyExc_RuntimeError, "unknown freetype exception %x", error);
52+
PyExc_RuntimeError, "Unknown FreeType exception %x", error);
5353
return 1;
5454
} else {
55-
PyErr_Format(entry->cls, "freetype error: %s", entry->msg);
55+
PyErr_Format(entry->cls, "FreeType error %x: %s", error, entry->msg);
5656
return 1;
5757
}
5858
}

src/pyutil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ int ftpy_setup_buffer_type(
6060
int setup_pyutil(PyObject *m);
6161

6262

63-
/* For an 8-bit string in Freetype that should be returned as a Unicode
63+
/* For an 8-bit string in FreeType that should be returned as a Unicode
6464
string in Python. If NULL, return None to Python. */
6565
#define T_NULL_STRING_AS_UNICODE 0x10001
66-
/* For an 8-bit string in Freetype that should be returned as a Unicode
66+
/* For an 8-bit string in FreeType that should be returned as a Unicode
6767
string in Python. Should never be NULL. */
6868
#define T_STRING_AS_UNICODE 0x10002
6969
/* FT_Fixed 16.16 fixed point values. Returned to Python as a float. */

0 commit comments

Comments
 (0)