summaryrefslogtreecommitdiff
path: root/packages/opie-ttf-support/files
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/opie-ttf-support/files
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/opie-ttf-support/files')
-rw-r--r--packages/opie-ttf-support/files/.mtn2git_empty0
-rw-r--r--packages/opie-ttf-support/files/fontdir11
-rw-r--r--packages/opie-ttf-support/files/update-qtttffontdir.c95
3 files changed, 106 insertions, 0 deletions
diff --git a/packages/opie-ttf-support/files/.mtn2git_empty b/packages/opie-ttf-support/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opie-ttf-support/files/.mtn2git_empty
diff --git a/packages/opie-ttf-support/files/fontdir b/packages/opie-ttf-support/files/fontdir
index e69de29bb2..e537066891 100644
--- a/packages/opie-ttf-support/files/fontdir
+++ b/packages/opie-ttf-support/files/fontdir
@@ -0,0 +1,11 @@
+
+DejaVuSans /usr/share/fonts/truetype/DejaVuSans.ttf FT n 50 80 su
+DejaVuSans /usr/share/fonts/truetype/DejaVuSans-Bold.ttf FT n 75 80 su
+DejaVuSans /usr/share/fonts/truetype/DejaVuSans-BoldOblique.ttf FT y 75 80 su
+DejaVuSans /usr/share/fonts/truetype/DejaVuSans-Oblique.ttf FT y 50 80 su
+
+DejaVuMono /usr/share/fonts/truetype/DejaVuSansMono-Roman.ttf FT n 50 80 su
+DejaVuMono /usr/share/fonts/truetype/DejaVuSansMono-Bold.ttf FT n 75 80 su
+DejaVuMono /usr/share/fonts/truetype/DejaVuSansMono-BoldOb.ttf FT y 75 80 su
+DejaVuMono /usr/share/fonts/truetype/DejaVuSansMono-Oblique.ttf FT y 50 80 su
+
diff --git a/packages/opie-ttf-support/files/update-qtttffontdir.c b/packages/opie-ttf-support/files/update-qtttffontdir.c
index e69de29bb2..fb29ba4852 100644
--- a/packages/opie-ttf-support/files/update-qtttffontdir.c
+++ b/packages/opie-ttf-support/files/update-qtttffontdir.c
@@ -0,0 +1,95 @@
+/*
+ * Utility to generate 'fontdir' for Qt/Embedded
+ *
+ * (C) 2004-2005 Marcin Juszkiewicz <openembedded@hrw.one.pl>
+ *
+ * License: GPLv2
+ *
+ * History:
+ *
+ * v0.1 2004.10.06 - first version (sent to OPIE devel ML)
+ * v0.2 2005.03.12 - added Oblique fonts support
+ * v1.0 2005.06.29 - switched font style handling to not based on filenames
+ * v1.1 2005.06.29 - fixed filename comparing
+ *
+ */
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#include <stdio.h>
+#include <dirent.h>
+#include <unistd.h>
+
+
+int main(int argc, char* argv[])
+{
+ DIR *katalog;
+ struct dirent *plik;
+
+ FT_Library library;
+ FT_Face face;
+
+ if(argc == 1)
+ {
+ fprintf(stderr, "Usage: %s <path to TTF fonts>\n", argv[0]);
+ exit(10);
+ }
+
+ if(FT_Init_FreeType(&library))
+ {
+ fprintf(stderr, "Error during initialising FreeType library.\n");
+ exit(5);
+ }
+
+ chdir(argv[1]);
+ if((katalog = opendir(".")))
+ {
+ while((plik = readdir(katalog)))
+ {
+ if(!strstr(plik->d_name, ".ttf"))
+ {
+ continue;
+ }
+
+ fprintf(stderr, "plik: %s\n\n", plik->d_name);
+ if(!FT_New_Face(library, plik->d_name, 0, &face))
+ {
+ /*
+ * change spaces in family_name into _
+ */
+
+ char* ptr;
+
+ for(ptr = strchr(face->family_name,' '); (ptr = strchr(ptr, ' ')); ) *ptr = '_';
+
+ printf("%s %s/%s FT", face->family_name, argv[1], plik->d_name);
+
+ if(face->style_flags & FT_STYLE_FLAG_ITALIC)
+ {
+ printf(" y");
+ }
+ else
+ {
+ printf(" n");
+ }
+
+ if(face->style_flags & FT_STYLE_FLAG_BOLD)
+ {
+ printf(" 75");
+ }
+ else
+ {
+ printf(" 50");
+ }
+
+ printf(" 60 su \n");
+
+ FT_Done_Face(face);
+ }
+ }
+ }
+
+ return 0;
+}