Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c62b2e5

Browse files
committed
STY/MNT: fix indentation + tab->space + remove undefined function
1 parent b18962d commit c62b2e5

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

src/ft2font.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ void FT2Font::set_text(
527527
ft_object_with_glyph->has_kerning() && // if the font knows how to kern
528528
previous && glyph_index // and we really have 2 glyphs
529529
) {
530-
531530
FT_Vector delta;
532531
pen.x += ft_object_with_glyph->get_kerning(previous, glyph_index, FT_KERNING_DEFAULT, delta);
533532
}

src/ft2font.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ class FT2Font
9595
bool override);
9696
void load_glyph(FT_UInt glyph_index, FT_Int32 flags, FT2Font *&ft_object, bool fallback);
9797
void load_glyph(FT_UInt glyph_index, FT_Int32 flags);
98-
void load_parent_glyph(std::vector<FT_Glyph> &parent_glyphs, long charcode, FT_Int32 flags);
9998
void get_width_height(long *width, long *height);
10099
void get_bitmap_offset(long *x, long *y);
101100
long get_descent();

src/ft2font_wrapper.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -373,22 +373,21 @@ static int PyFT2Font_init(PyFT2Font *self, PyObject *args, PyObject *kwds)
373373
memset((void *)&open_args, 0, sizeof(FT_Open_Args));
374374
open_args.flags = FT_OPEN_STREAM;
375375
open_args.stream = &self->stream;
376-
377376
if (fallback_list) {
378-
if (!PyList_Check(fallback_list)) {
379-
PyErr_SetString(PyExc_TypeError, "Fallback list must be a list");
380-
goto exit;
381-
}
382-
Py_ssize_t size = PyList_Size(fallback_list);
383-
384-
// go through fallbacks once to make sure the types are right
385-
for (Py_ssize_t i = 0; i < size; ++i) {
386-
// this returns a borrowed reference
387-
PyObject* item = PyList_GetItem(fallback_list, i);
388-
if (!PyObject_IsInstance(item, PyObject_Type(reinterpret_cast<PyObject *>(self)))) {
389-
PyErr_SetString(PyExc_TypeError, "Fallback fonts must be FT2Font objects.");
390-
goto exit;
391-
}
377+
if (!PyList_Check(fallback_list)) {
378+
PyErr_SetString(PyExc_TypeError, "Fallback list must be a list");
379+
goto exit;
380+
}
381+
Py_ssize_t size = PyList_Size(fallback_list);
382+
383+
// go through fallbacks once to make sure the types are right
384+
for (Py_ssize_t i = 0; i < size; ++i) {
385+
// this returns a borrowed reference
386+
PyObject* item = PyList_GetItem(fallback_list, i);
387+
if (!PyObject_IsInstance(item, PyObject_Type(reinterpret_cast<PyObject *>(self)))) {
388+
PyErr_SetString(PyExc_TypeError, "Fallback fonts must be FT2Font objects.");
389+
goto exit;
390+
}
392391
}
393392
// go through a second time to add them to our lists
394393
for (Py_ssize_t i = 0; i < size; ++i) {

0 commit comments

Comments
 (0)