[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] veeki-gsoc-experimental 0ed6f66: Remove unnecessary co
From: |
Veeki Yadav |
Subject: |
[freetype2-demos] veeki-gsoc-experimental 0ed6f66: Remove unnecessary code. |
Date: |
Mon, 2 Sep 2019 11:30:27 -0400 (EDT) |
branch: veeki-gsoc-experimental
commit 0ed6f66382ae49ef1a7aacaccfef9bb8a5ba6a24
Author: gevic <address@hidden>
Commit: gevic <address@hidden>
Remove unnecessary code.
Removed `debugEngine' function which was added to implement `ftlint'
functionality.
---
src/ftinspect/engine/engine.cpp | 76 -----------------------------------------
src/ftinspect/engine/engine.hpp | 1 -
2 files changed, 77 deletions(-)
diff --git a/src/ftinspect/engine/engine.cpp b/src/ftinspect/engine/engine.cpp
index 1d1dccf..24b0a80 100644
--- a/src/ftinspect/engine/engine.cpp
+++ b/src/ftinspect/engine/engine.cpp
@@ -467,82 +467,6 @@ Engine::removeFont(int fontIndex)
}
}
-int
-Engine::debugEngine(QStringList fontList)
-{
- FT_Face f;
- FT_Library lib;
- int num_glyphs;
- FT_Error error;
- static int ptsize = 20;
- int Fail;
-
- error = FT_Init_FreeType( &lib );
-
- /* try to open the file with no extra extension first */
- error = FT_New_Face(library,
- fontList[0].toLatin1().constData(),
- 0,
- &f);
-
- if (!error)
- {
- num_glyphs = (unsigned int)f->num_glyphs;
- }
-
- if ( error == FT_Err_Unknown_File_Format )
- {
- return 0;
- }
-
- error = FT_Set_Char_Size( f, ptsize << 6, ptsize << 6, 72, 72 );
- if (error)
- {
- return 0;
- }
-
- Fail = 0;
- {
- for ( int id = 0; id < num_glyphs; id++ )
- {
- error = FT_Load_Glyph( f, id, FT_LOAD_DEFAULT );
- if (error)
- {
- if ( Fail < 10 )
- {
-
- }
- //printf( "glyph %4u: 0x%04x\n" , id, error );
- Fail++;
- }
- }
- }
-
- if ( Fail == 0 )
- {
-
- }
- //printf( "OK.\n" );
- else
- {
- if ( Fail == 1 )
- {
-
- }
- //printf( "1 fail.\n" );
- else
- {
-
- }
- //printf( "%d fails.\n", Fail );
- }
-
-FT_Done_Face( f );
-
-FT_Done_FreeType(lib);
-exit( 0 ); /* for safety reasons */
-}
-
const QString&
Engine::currentFamilyName()
diff --git a/src/ftinspect/engine/engine.hpp b/src/ftinspect/engine/engine.hpp
index 8e98d7d..9225d37 100644
--- a/src/ftinspect/engine/engine.hpp
+++ b/src/ftinspect/engine/engine.hpp
@@ -59,7 +59,6 @@ public:
int namedInstanceIndex); // return number of glyphs
FT_Outline* loadOutline(int glyphIndex);
void removeFont(int fontIndex);
- int debugEngine(QStringList fontList);
void setCFFHintingMode(int mode);
void setWarping();
FT_Size getFtSize();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] veeki-gsoc-experimental 0ed6f66: Remove unnecessary code.,
Veeki Yadav <=