From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: rename packages/ to recipes/ per earlier agreement See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- recipes/opie-ttf-support/files/02qtttffont-update | 6 + recipes/opie-ttf-support/files/fontdir | 11 ++ .../opie-ttf-support/files/update-qtttffontdir.c | 127 +++++++++++++++++++++ recipes/opie-ttf-support/opie-ttf-support_1.1.bb | 26 +++++ 4 files changed, 170 insertions(+) create mode 100644 recipes/opie-ttf-support/files/02qtttffont-update create mode 100644 recipes/opie-ttf-support/files/fontdir create mode 100644 recipes/opie-ttf-support/files/update-qtttffontdir.c create mode 100644 recipes/opie-ttf-support/opie-ttf-support_1.1.bb (limited to 'recipes/opie-ttf-support') diff --git a/recipes/opie-ttf-support/files/02qtttffont-update b/recipes/opie-ttf-support/files/02qtttffont-update new file mode 100644 index 0000000000..8f8058faea --- /dev/null +++ b/recipes/opie-ttf-support/files/02qtttffont-update @@ -0,0 +1,6 @@ +#!/bin/sh +# Author: Rolf Leggewie + +mkdir -p @@PALMTOPDIR@@/lib/fonts + +@@SBINDIR@@/update-qtttffontdir @@DATADIR@@/fonts/truetype > @@PALMTOPDIR@@/lib/fonts/fontdir diff --git a/recipes/opie-ttf-support/files/fontdir b/recipes/opie-ttf-support/files/fontdir new file mode 100644 index 0000000000..e537066891 --- /dev/null +++ b/recipes/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/recipes/opie-ttf-support/files/update-qtttffontdir.c b/recipes/opie-ttf-support/files/update-qtttffontdir.c new file mode 100644 index 0000000000..fa45e38a8b --- /dev/null +++ b/recipes/opie-ttf-support/files/update-qtttffontdir.c @@ -0,0 +1,127 @@ +/* + * Utility to generate 'fontdir' for Qt/Embedded + * + * (C) 2004-2005 Marcin Juszkiewicz + * + * 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 +#include FT_FREETYPE_H + +#include +#include +#include + + +int main(int argc, char* argv[]) +{ + DIR *katalog; + struct dirent *plik; + + FT_Library library; + FT_Face face; + + if(argc == 1) + { + fprintf(stderr, "Usage: %s \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("."))) + { + int found_fixed = 0; + + while((plik = readdir(katalog))) + { + if(!strstr(plik->d_name, ".ttf")) + { + continue; + } + + 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 = '_'; + + if( + face->face_flags & FT_FACE_FLAG_FIXED_WIDTH && + !found_fixed && + !(face->style_flags & FT_STYLE_FLAG_ITALIC) && + !(face->style_flags & FT_STYLE_FLAG_BOLD) + ) + { + found_fixed = 1; + printf("fixed %s/%s FT", 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"); + } + + 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; +} diff --git a/recipes/opie-ttf-support/opie-ttf-support_1.1.bb b/recipes/opie-ttf-support/opie-ttf-support_1.1.bb new file mode 100644 index 0000000000..18ce7ac0c9 --- /dev/null +++ b/recipes/opie-ttf-support/opie-ttf-support_1.1.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Meta-package for Opie TTF support" +SECTION = "opie/fonts" +DEPENDS = "freetype" +PR = "r5" + +SRC_URI = "file://update-qtttffontdir.c \ + file://02qtttffont-update" +S = "${WORKDIR}" + +do_compile() { + ${CC} ${CFLAGS} ${LDFLAGS} -I${STAGING_INCDIR}/freetype2 -lfreetype -o update-qtttffontdir update-qtttffontdir.c +} + +do_install() { + install -d ${D}${sbindir} + install -d ${D}${sysconfdir}/update-fonts-common.d/ + install -m 0755 update-qtttffontdir ${D}${sbindir} + install -m 0755 02qtttffont-update ${D}${sysconfdir}/update-fonts-common.d/ + sed -i 's!@@SBINDIR@@!${sbindir}!g' ${D}${sysconfdir}/update-fonts-common.d/02qtttffont-update + sed -i 's!@@PALMTOPDIR@@!${palmtopdir}!g' ${D}${sysconfdir}/update-fonts-common.d/02qtttffont-update + sed -i 's!@@DATADIR@@!${datadir}!g' ${D}${sysconfdir}/update-fonts-common.d/02qtttffont-update +} + +pkg_postinst() { + ${sysconfdir}/update-fonts-common.d/02qtttffont-update +} -- cgit 1.2.3-korg