{ "name": "freetype", "version": "2.14.3", "summary": "FreeType: font loading and glyph rendering (PHP's gd, ImageMagick)", "category": "library", "license": "FTL OR GPL-2.0-or-later", "homepage": "https://freetype.org/", "source": { "url": "https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz", "sha256": "36bc4f1cc413335368ee656c42afca65c5a3987e8768cc28cf11ba775e785a5f" }, "watch": {"kind": "index", "url": "https://download-mirror.savannah.gnu.org/releases/freetype/", "regex": "freetype-([0-9]+(?:\\.[0-9]+)+[a-z]?[0-9]*)\\.tar\\.xz"}, "deps": [ "zlib" ], "env_packages": [], "static": true, "nss": false, "check": "CHECK_CPPFLAGS=\"-DF=\\\"$TMPDIR/a.bdf\\\"\" check_lib freetype2 'ft2build.h freetype/freetype.h' 'FT_Library l; FT_Face f; FT_Int a, b, c; int n = 0; FILE *o = fopen(F, \"w\"); if (!o || fputs(\"STARTFONT 2.1\\nFONT -bvs-check-medium-r-normal--8-80-75-75-c-80-iso10646-1\\nSIZE 8 75 75\\nFONTBOUNDINGBOX 8 8 0 0\\nSTARTPROPERTIES 2\\nFONT_ASCENT 8\\nFONT_DESCENT 0\\nENDPROPERTIES\\nCHARS 1\\nSTARTCHAR A\\nENCODING 65\\nSWIDTH 1000 0\\nDWIDTH 8 0\\nBBX 8 8 0 0\\nBITMAP\\n18\\n24\\n42\\n42\\n7E\\n42\\n42\\n00\\nENDCHAR\\nENDFONT\\n\", o) < 0 || fclose(o)) return 9; if (FT_Init_FreeType(&l) || FT_New_Face(l, F, 0, &f)) return 1; if (f->num_fixed_sizes != 1 || FT_Select_Size(f, 0) || FT_Load_Char(f, 0x41, FT_LOAD_RENDER | FT_LOAD_TARGET_MONO)) return 2; FT_Bitmap *m = &f->glyph->bitmap; if (m->rows != 8 || m->width != 8 || m->pixel_mode != FT_PIXEL_MODE_MONO) return 3; for (unsigned r = 0; r < m->rows; r++) for (unsigned x = 0; x < m->width; x++) n += (m->buffer[r * m->pitch + x / 8] >> (7 - x % 8)) & 1; if (n != 18 || FT_Get_Char_Index(f, 0x42) != 0) return 4; FT_Library_Version(l, &a, &b, &c); printf(\"freetype %d.%d.%d: the glyph A of a BDF font loaded and rendered as an 8x8 bitmap with its 18 pixels set; a character outside the font has no glyph\\n\", a, b, c); FT_Done_Face(f); FT_Done_FreeType(l)' " }