#include <stdio.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/wait.h>#include <unistd.h>#include <dirent.h>#include <math.h>#include <signal.h>#include <time.h>#include <ft2build.h>Go to the source code of this file.
Classes | |
| struct | fontlist |
Defines | |
| #define | true 1 |
| #define | false 0 |
| #define | forever for (;;) |
| #define | GOOD_FONTS_DIR "/home/wl/freetype-testfonts" |
Functions | |
| static int | FT_MoveTo (const FT_Vector *to, void *user) |
| static int | FT_LineTo (const FT_Vector *to, void *user) |
| static int | FT_ConicTo (const FT_Vector *_cp, const FT_Vector *to, void *user) |
| static int | FT_CubicTo (const FT_Vector *cp1, const FT_Vector *cp2, const FT_Vector *to, void *user) |
| static void | TestFace (FT_Face face) |
| static void | ExecuteTest (char *testfont) |
| static int | extmatch (char *filename, char **extensions) |
| static void | figurefiletype (struct fontlist *item) |
| static void | FindFonts (char **fontdirs, char **extensions) |
| static int | getErrorCnt (struct fontlist *item) |
| static int | getRandom (int low, int high) |
| static int | copyfont (struct fontlist *item, char *newfont) |
| static void | abort_test (int sig) |
| static void | do_test (void) |
| static void | usage (FILE *out, char *name) |
| int | main (int argc, char **argv) |
Variables | |
| static int | check_outlines = false |
| static int | nohints = false |
| static int | rasterize = false |
| static char * | results_dir = "results" |
| static char * | default_dir_list [] |
| static char * | default_ext_list [] |
| static int | error_count = 1 |
| static int | error_fraction = 0 |
| static FT_F26Dot6 | font_size = 12 * 64 |
| static int | fcnt |
| static FT_Outline_Funcs | outlinefuncs |
| static int | child_pid |
| #define false 0 |
Definition at line 50 of file ftrandom.c.
Referenced by ROOT::TCollectionProxyInfo::Type< ROOT::TStdBitsetHelper< Bitset_t > >::first().
| #define forever for (;;) |
| #define GOOD_FONTS_DIR "/home/wl/freetype-testfonts" |
Definition at line 59 of file ftrandom.c.
| #define true 1 |
Definition at line 49 of file ftrandom.c.
Referenced by ROOT::TTreeProxyGenerator::AnalyzeOldLeaf(), FindAndAddOperator(), FitUsingNewFitter(), PyROOT::TMemberAdapter::FunctionParameterDefaultAt(), PyROOT::Utility::MapOperatorName(), PyROOT::TReturnTypeAdapter::Name(), PyROOT::TMemberAdapter::Name(), and PyROOT::TScopeAdapter::Name().
| static void abort_test | ( | int | sig | ) | [static] |
Definition at line 482 of file ftrandom.c.
References child_pid, and write.
Referenced by do_test().
| static int copyfont | ( | struct fontlist * | item, | |
| char * | newfont | |||
| ) | [static] |
Definition at line 414 of file ftrandom.c.
References buffer, fclose(), fopen, fprintf(), fread, fseek, fwrite, getErrorCnt(), getRandom(), i, if(), fontlist::isascii, fontlist::isbinary, len, fontlist::len, fontlist::name, NULL, SEEK_SET, unlink, and x20.
Referenced by do_test().
| static void do_test | ( | void | ) | [static] |
Definition at line 491 of file ftrandom.c.
References abort_test(), buffer, child_pid, copyfont(), ExecuteTest(), fcnt, fork(), fprintf(), getRandom(), i, results_dir, sprintf(), unlink, and WIFSIGNALED.
Referenced by main().
| static void ExecuteTest | ( | char * | testfont | ) | [static] |
Definition at line 183 of file ftrandom.c.
References fprintf(), FT_Done_Face(), FT_Init_FreeType(), FT_New_Face(), i, num, and TestFace().
| static int extmatch | ( | char * | filename, | |
| char ** | extensions | |||
| ) | [static] |
Definition at line 221 of file ftrandom.c.
References i, NULL, and strcasecmp.
Referenced by FindFonts().
| static void figurefiletype | ( | struct fontlist * | item | ) | [static] |
Definition at line 247 of file ftrandom.c.
References fclose(), fopen, fprintf(), fontlist::isascii, fontlist::isbinary, fontlist::ishex, fontlist::name, NULL, and x80.
Referenced by FindFonts().
| static void FindFonts | ( | char ** | fontdirs, | |
| char ** | extensions | |||
| ) | [static] |
Definition at line 119 of file ftrandom.c.
| static int FT_CubicTo | ( | const FT_Vector * | cp1, | |
| const FT_Vector * | cp2, | |||
| const FT_Vector * | to, | |||
| void * | user | |||
| ) | [static] |
Definition at line 128 of file ftrandom.c.
| static int FT_LineTo | ( | const FT_Vector * | to, | |
| void * | user | |||
| ) | [static] |
Definition at line 111 of file ftrandom.c.
| static int FT_MoveTo | ( | const FT_Vector * | to, | |
| void * | user | |||
| ) | [static] |
Definition at line 103 of file ftrandom.c.
| static int getErrorCnt | ( | struct fontlist * | item | ) | [static] |
Definition at line 393 of file ftrandom.c.
References ceil(), error_count, error_fraction, and fontlist::len.
Referenced by copyfont().
| static int getRandom | ( | int | low, | |
| int | high | |||
| ) | [static] |
Definition at line 403 of file ftrandom.c.
References random, and x10000L.
Referenced by copyfont(), and do_test().
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 554 of file ftrandom.c.
References calloc(), check_outlines, default_dir_list, default_ext_list, dirs(), do_test(), error_count, error_fraction, ExecuteTest(), FindFonts(), font_size, forever, fprintf(), i, mkdir, nohints, NULL, rasterize, results_dir, strtol(), and usage.
| static void TestFace | ( | FT_Face | face | ) | [static] |
Definition at line 148 of file ftrandom.c.
References check_outlines, font_size, FT_Done_Face(), FT_IS_SCALABLE, FT_LOAD_DEFAULT, FT_Load_Glyph(), FT_LOAD_NO_BITMAP, FT_LOAD_NO_HINTING, FT_Outline_Decompose(), FT_Render_Glyph(), ft_render_mode_normal, FT_Set_Char_Size(), nohints, NULL, outlinefuncs, and rasterize.
Referenced by ExecuteTest().
| static void usage | ( | FILE * | out, | |
| char * | name | |||
| ) | [static] |
int check_outlines = false [static] |
int child_pid [static] |
char* default_dir_list[] [static] |
Initial value:
{
GOOD_FONTS_DIR,
NULL
}
Definition at line 61 of file ftrandom.c.
Referenced by main().
char* default_ext_list[] [static] |
Initial value:
{
"ttf",
"otf",
"ttc",
"cid",
"pfb",
"pfa",
"bdf",
"pcf",
"pfr",
"fon",
"otb",
"cff",
NULL
}
Definition at line 67 of file ftrandom.c.
Referenced by main().
int error_count = 1 [static] |
Definition at line 84 of file ftrandom.c.
int error_fraction = 0 [static] |
int fcnt [static] |
Definition at line 99 of file ftrandom.c.
Referenced by do_test(), FindFonts(), XrdOssFile::Fsync(), XrdOssFile::Read(), and XrdOssFile::Write().
FT_F26Dot6 font_size = 12 * 64 [static] |
int nohints = false [static] |
FT_Outline_Funcs outlinefuncs [static] |
Initial value:
{
FT_MoveTo,
FT_LineTo,
FT_ConicTo,
FT_CubicTo,
0, 0
}
Definition at line 137 of file ftrandom.c.
Referenced by TestFace().
int rasterize = false [static] |
char* results_dir = "results" [static] |
1.5.1