mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
Inspired by https://gerrit.chromium.org/gerrit/#/c/30631/ - Increase gray colored text contrast - Enlarge font size to 17pt - Change standard font to Verdata (which is wider than usually fonts, to provide better quality when stretched in horizontal) - Decomposed tonorm_confirmation & devmode so we can have better control to verif_* prompt, and look more similar to original mock. BUG=chrome-os-partner:11078 TEST=make # All platforms generated BRANCH=none Change-Id: If019b5767f13556df0e4da77f6457e092fa06016 Reviewed-on: https://gerrit.chromium.org/gerrit/30679 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
48 lines
1.1 KiB
Bash
Executable File
48 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# Generates font source images.
|
|
|
|
SCRIPT="$(readlink -f "$0")"
|
|
SCRIPT_DIR="$(dirname "$SCRIPT")"
|
|
GLYPHS='* 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ{}-_'
|
|
COLOR="#505050"
|
|
FONT=""
|
|
MARGIN="3"
|
|
|
|
die() {
|
|
echo "ERROR: $*" >&2
|
|
exit 1
|
|
}
|
|
|
|
main() {
|
|
[ "$#" = "1" ] || die "Usage: $0 output_dir"
|
|
local output="$1"
|
|
mkdir -p "$output"
|
|
|
|
local i=1
|
|
local c=''
|
|
echo "Generating glyph text source..."
|
|
while true; do
|
|
c="$(echo "$GLYPHS" | cut -b $i)"
|
|
[ -z "$c" ] && break
|
|
ord="0x$(echo "$c" | od -t x1 -A none | awk '{print $1}')"
|
|
echo "$c" >"$output/idx$(printf "%03d" $ord)_$(printf "%x" $ord).txt"
|
|
i=$((i + 1))
|
|
done
|
|
|
|
echo "Converting glyph images..."
|
|
"$SCRIPT_DIR/text_to_png" --margin=0 --font="$FONT" --color="$COLOR" \
|
|
"$output/*.txt"
|
|
|
|
echo "Adding vertical margin to images..."
|
|
for i in $output/*.png; do
|
|
convert $i -bordercolor white -border 0x$MARGIN $i
|
|
done
|
|
}
|
|
|
|
set -e
|
|
main "$@"
|