More fonts!

This commit is contained in:
Neale Pickett 2015-07-06 13:17:06 -06:00
parent a4756da6d2
commit b4db27087c
9 changed files with 40 additions and 17 deletions

View File

@ -4,29 +4,29 @@
""
],
"companyName": "dartcatcher@gmail.com",
"longName": "Helvetica",
"longName": "%FONT %COLOR",
"projectType": "native",
"resources": {
"media": [
{
"characterRegex": "[0-9A-Za-z\u00e9\u00f4 ]",
"file": "fonts/HelveticaNeue-Regular.ttf",
"name": "HELVETICA_R_28",
"file": "fonts/%FONT-Regular.ttf",
"name": "FONT_R_28",
"type": "font"
},
{
"characterRegex": "[0-9:]",
"file": "fonts/HelveticaNeue-Bold.ttf",
"name": "HELVETICA_B_48",
"file": "fonts/%FONT-Bold.ttf",
"name": "FONT_B_48",
"type": "font"
}
]
},
"sdkVersion": "3",
"shortName": "Helvetica",
"uuid": "534e5853-7be7-447e-a67d-b236ac9f4f51",
"shortName": "%FONT %COLOR",
"uuid": "%UUID",
"versionCode": 1,
"versionLabel": "1.0",
"versionLabel": "1.1",
"watchapp": {
"watchface": true
},

View File

@ -1,12 +1,35 @@
#! /bin/sh -e
echo PATH=$PATH:$HOME/pebble-dev/PebbleSDK-3.1/bin
cd $(dirname $0)
build () {
echo $1
[ $1 = Black ] && uuid=1 || uuid=0
sed "s/%COLOR/$1/;s/%UUID/$uuid/" appinfo.json.tmpl > appinfo.json
pebble build
cp build/HelveticaFace.pbw HelveticaFace-$1.pbw
font=$1
color=$2
uuid=$3
name=${font}Face-$color
sed "s/%COLOR/$color/;s/%FONT/$font/;s/%UUID/$uuid/" appinfo.json.tmpl > appinfo.json
pebble build
cp build/FontFace.pbw $name.pbw
echo $name.pbw
}
build Black
build White
if [ -n "$1" ]; then
pbw=$(build $1 White 879db5ec-8bfc-41ca-8988-96da8ae23d14)
pebble install $pbw
else
while read font color uuid; do
build $font $color $uuid
done <<EOF
Helvetica White cd20e38f-4e2d-4a01-83a5-a02c67fa4ce4
Helvetica Black cd20e38f-4e2d-4a01-83a5-a02c67fa4ce5
Ubuntu White 534e5853-7be7-447e-a67d-b236ac9f4f50
Ubuntu Black 534e5853-7be7-447e-a67d-b236ac9f4f51
LobsterTwo White 09f6a566-5e2e-4927-8bb2-e84de862af78
LobsterTwo Black 09f6a566-5e2e-4927-8bb2-e84de862af79
AveriaSerifLibre White e03bd7a7-a8a5-4584-98aa-44496d74d766
AveriaSerifLibre Black e03bd7a7-a8a5-4584-98aa-44496d74d767
ExpletusSans White 4ba792cf-26c4-4c3a-a194-4db5ae7e4be8
ExpletusSans Black 4ba792cf-26c4-4c3a-a194-4db5ae7e4be9
EOF
fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -50,13 +50,13 @@ static void main_window_load(Window *window) {
s_date_layer = text_layer_create(GRect(8, 66, 136, 100));
text_layer_set_text_color(s_date_layer, FG);
text_layer_set_background_color(s_date_layer, GColorClear);
text_layer_set_font(s_date_layer, fonts_load_custom_font(resource_get_handle(RESOURCE_ID_HELVETICA_R_28)));
text_layer_set_font(s_date_layer, fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_R_28)));
layer_add_child(window_layer, text_layer_get_layer(s_date_layer));
s_time_layer = text_layer_create(GRect(7, 92, 137, 76));
text_layer_set_text_color(s_time_layer, FG);
text_layer_set_background_color(s_time_layer, GColorClear);
text_layer_set_font(s_time_layer, fonts_load_custom_font(resource_get_handle(RESOURCE_ID_HELVETICA_B_48)));
text_layer_set_font(s_time_layer, fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_B_48)));
layer_add_child(window_layer, text_layer_get_layer(s_time_layer));
}