From c951eb8257862a3f85c8d23050cf3b617ce1e1c0 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Fri, 10 Aug 2012 19:01:52 +0800 Subject: [PATCH] newbitmaps: Refine font and text generation. The bmpblk build scripts used to rely on lots of pre-generated resources, and the HWID font data was fixed to x86 special size & scaling parameters. Since the screens now rely on more platform dependent parameters, this CL refined whole flow so fonts are now generated and processed (ex, re-scale) in the same way as other text messages. BUG=chrome-os-partner:11078 TEST=make # x86 and arm bitmaps both works. Change-Id: I59a4fb31718ef052c6b54cd4642f4fc487893f2b Reviewed-on: https://gerrit.chromium.org/gerrit/29873 Tested-by: Hung-Te Lin Reviewed-by: Bill Richardson Commit-Ready: Hung-Te Lin --- .gitignore | 7 +- scripts/newbitmaps/Makefile | 21 +- scripts/newbitmaps/fonts/make_ascii_bmps.py | 90 -- scripts/newbitmaps/images/DEFAULT.yaml | 1002 ----------------- scripts/newbitmaps/images/Makefile | 20 +- scripts/newbitmaps/images/Url.bmp | Bin 8086 -> 0 bytes scripts/newbitmaps/images/build_images | 42 +- scripts/newbitmaps/images/hwid_fonts.bin | Bin 52592 -> 0 bytes scripts/newbitmaps/images/make_default_yaml | 45 +- scripts/newbitmaps/lib/bmpblock.py | 1 + scripts/newbitmaps/strings/Makefile | 27 + scripts/newbitmaps/strings/Url.TXT | 2 +- scripts/newbitmaps/strings/Url.txt | 1 - scripts/newbitmaps/strings/build_font | 41 + scripts/newbitmaps/strings/current_hwid.txt | 1 - scripts/newbitmaps/strings/hwid_unknown.txt | 1 - .../strings/localized_text/Makefile | 6 +- scripts/newbitmaps/strings/text_to_png | 71 +- 18 files changed, 194 insertions(+), 1184 deletions(-) delete mode 100755 scripts/newbitmaps/fonts/make_ascii_bmps.py delete mode 100644 scripts/newbitmaps/images/DEFAULT.yaml delete mode 100644 scripts/newbitmaps/images/Url.bmp delete mode 100644 scripts/newbitmaps/images/hwid_fonts.bin create mode 100644 scripts/newbitmaps/strings/Makefile delete mode 100644 scripts/newbitmaps/strings/Url.txt create mode 100755 scripts/newbitmaps/strings/build_font delete mode 100644 scripts/newbitmaps/strings/current_hwid.txt delete mode 100644 scripts/newbitmaps/strings/hwid_unknown.txt diff --git a/.gitignore b/.gitignore index b2f7a2eabc..dde2e785e3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ /build-au /build-main ID -scripts/newbitmaps/lib/*.pyc -scripts/newbitmaps/strings/localized_text/*/*.png -scripts/newbitmaps/fonts/outdir scripts/newbitmaps/images/out_* +scripts/newbitmaps/lib/*.pyc +scripts/newbitmaps/strings/font +scripts/newbitmaps/strings/localized_text/*/*.png +scripts/newbitmaps/strings/*.png diff --git a/scripts/newbitmaps/Makefile b/scripts/newbitmaps/Makefile index 90c4a56011..d9840ab114 100644 --- a/scripts/newbitmaps/Makefile +++ b/scripts/newbitmaps/Makefile @@ -11,9 +11,9 @@ ALL_LOCALES=en es_419 pt_BR en_GB fr es pt_PT ca it de \ uk tr iw ar fa hi th vi id fil zh_CN zh_TW ko ja # Here are the launch locales for Stumpy/Lumpy (issue 6595), same ordering. -DEFAULT_LOCALES=en es_419 pt_BR en_GB fr es it de nl da no sv ko ja +LOCALES=en es_419 pt_BR en_GB fr es it de nl da no sv ko ja -default: outside_chroot fonts strings x86 arm clean +default: outside_chroot strings x86 arm clean outside_chroot: @if [ -e /etc/debian_chroot ]; then \ @@ -23,26 +23,19 @@ outside_chroot: exit 1; \ fi - -fonts: - # TODO(hungte) Move fonts generation to its own Makefile. - cd fonts && ./make_ascii_bmps.py - bmpblk_font --outfile images/hwid_fonts.bin fonts/outdir/* - strings: - $(MAKE) -C strings/localized_text + $(MAKE) -C strings x86: - $(MAKE) -C images $@ DEFAULT_LOCALES="$(DEFAULT_LOCALES)" + $(MAKE) -C images $@ LOCALES="$(LOCALES)" cp -f images/out_$@/bmpblock.bin bmpblock_$@.bin arm: - $(MAKE) -C images $@ DEFAULT_LOCALES="$(DEFAULT_LOCALES)" + $(MAKE) -C images $@ LOCALES="$(LOCALES)" cp -f images/out_$@/bmpblock.bin bmpblock_$@.bin clean: - rm -rf fonts/outdir - $(MAKE) -C strings/localized_text clean + $(MAKE) -C strings clean $(MAKE) -C images clean -.PHONY: outside_chroot fonts strings x86 arm +.PHONY: outside_chroot strings x86 arm clean diff --git a/scripts/newbitmaps/fonts/make_ascii_bmps.py b/scripts/newbitmaps/fonts/make_ascii_bmps.py deleted file mode 100755 index 8d58849da5..0000000000 --- a/scripts/newbitmaps/fonts/make_ascii_bmps.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/python -tt -# Copyright (c) 2011 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. - -import optparse -import os -import subprocess -import sys -import tempfile - -chars = '* 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ{}-_' - -def main(): - """Convert a set of text chars into individual BMPs. - - This uses ImageMagick, so don't run it inside the build chroot. - Not all characters in the world are supported. - """ - - parser = optparse.OptionParser() - parser.description = ' '.join(main.__doc__.split()) - parser.add_option("--foreground", default='#000000', - dest="fg", action="store", metavar="COLOR", - help="foreground color (%default)") - parser.add_option("--background", default='#ffffff', - dest="bg", action="store", metavar="COLOR", - help="background color (%default)") - parser.add_option("--font", default='Helvetica', - dest="font", action="store", - help="font to use (%default)") - parser.add_option("--size", default='15', metavar="POINTSIZE", - dest="size", action="store", - help="font size (%default)") - parser.add_option('--dir', default='./outdir', - dest="outdir", action="store", - help="output directory (%default)") - (options, args) = parser.parse_args() - - - if not os.path.isdir(options.outdir): - os.mkdir(options.outdir) - - # ARM U-Boot is very picky about its BMPs. They have to have exactly 256 - # colors in their colormap. Imagemagick generally tries to reduce the - # colormap when it can, so we have to play some games to force it not to. - # We'll create a gradient file with 256 colors, and then make sure that all - # our rendered characters use the same colormap. This makes the resulting - # images larger, but it also means they'll work on x86 too. Sigh. - (handle, gradient_file) = tempfile.mkstemp(".png") - os.close(handle) - - cmd = ('convert', '-size', '256x1', - 'gradient:%s-%s' % (options.fg, options.bg), - gradient_file) - print ' '.join(cmd) - subprocess.call(cmd) - - - count=0 - for ascii in chars: - outfile = os.path.join(options.outdir, - "idx%03d_%x.bmp" % (count,ord(ascii))) - # TODO(hungte) Support assigning size & scaling for character images. - print outfile - cmd = ('convert', - '-font', options.font, - '-background', options.bg, - '-fill', options.fg, - '-bordercolor', options.bg, - '-border', '0x3', - '-gravity', 'Center', - '-pointsize', options.size, - '-resize', '120%x100', # Yes, magic. - '-scale', '59%x78%', # Here, too. - 'label:%s' % ascii, - '-remap', gradient_file, - '-compress', 'none', - '-alpha', 'off', - outfile) - print ' '.join(cmd) - count += 1 - subprocess.call(cmd) - - os.unlink(gradient_file) - - -# Start it all off -if __name__ == '__main__': - main() diff --git a/scripts/newbitmaps/images/DEFAULT.yaml b/scripts/newbitmaps/images/DEFAULT.yaml deleted file mode 100644 index aea250ba6a..0000000000 --- a/scripts/newbitmaps/images/DEFAULT.yaml +++ /dev/null @@ -1,1002 +0,0 @@ -bmpblock: 1.2 - -compression: 2 - -images: - - # We must specify a font blob to use to render the HWID - $HWID: hwid_fonts.bin - - # This URL never changes - url: Url.bmp - - # Various UI elements - arrow_left: arrow_left.bmp - arrow_right: arrow_right.bmp - chrome_logo: chrome_logo.bmp - devmode_graphic: Devmode_graphic.bmp - divider_btm: divider_btm.bmp - divider_top: divider_top.bmp - remove_graphic: Remove_graphic.bmp - insert_graphic: Insert_graphic.bmp - white_bg: Background_white.bmp - yuck_graphic: Yuck_graphic.bmp - - # The following strings must be approved by the localization people - en_model_text: ./localized_images/en/model.bmp - en_devmode_text: ./localized_images/en/devmode.bmp - en_remove_text: ./localized_images/en/remove.bmp - en_yuck_text: ./localized_images/en/yuck.bmp - en_insert_text: ./localized_images/en/insert.bmp - en_insert_usb_text: ./localized_images/en/insert_usb.bmp - en_language_text: ./localized_images/en/language.bmp - en_for_help_text: ./localized_images/en/for_help.bmp - - es_419_model_text: ./localized_images/es_419/model.bmp - es_419_devmode_text: ./localized_images/es_419/devmode.bmp - es_419_remove_text: ./localized_images/es_419/remove.bmp - es_419_yuck_text: ./localized_images/es_419/yuck.bmp - es_419_insert_text: ./localized_images/es_419/insert.bmp - es_419_insert_usb_text: ./localized_images/es_419/insert_usb.bmp - es_419_language_text: ./localized_images/es_419/language.bmp - es_419_for_help_text: ./localized_images/es_419/for_help.bmp - - pt_BR_model_text: ./localized_images/pt_BR/model.bmp - pt_BR_devmode_text: ./localized_images/pt_BR/devmode.bmp - pt_BR_remove_text: ./localized_images/pt_BR/remove.bmp - pt_BR_yuck_text: ./localized_images/pt_BR/yuck.bmp - pt_BR_insert_text: ./localized_images/pt_BR/insert.bmp - pt_BR_insert_usb_text: ./localized_images/pt_BR/insert_usb.bmp - pt_BR_language_text: ./localized_images/pt_BR/language.bmp - pt_BR_for_help_text: ./localized_images/pt_BR/for_help.bmp - - en_GB_model_text: ./localized_images/en_GB/model.bmp - en_GB_devmode_text: ./localized_images/en_GB/devmode.bmp - en_GB_remove_text: ./localized_images/en_GB/remove.bmp - en_GB_yuck_text: ./localized_images/en_GB/yuck.bmp - en_GB_insert_text: ./localized_images/en_GB/insert.bmp - en_GB_insert_usb_text: ./localized_images/en_GB/insert_usb.bmp - en_GB_language_text: ./localized_images/en_GB/language.bmp - en_GB_for_help_text: ./localized_images/en_GB/for_help.bmp - - fr_model_text: ./localized_images/fr/model.bmp - fr_devmode_text: ./localized_images/fr/devmode.bmp - fr_remove_text: ./localized_images/fr/remove.bmp - fr_yuck_text: ./localized_images/fr/yuck.bmp - fr_insert_text: ./localized_images/fr/insert.bmp - fr_insert_usb_text: ./localized_images/fr/insert_usb.bmp - fr_language_text: ./localized_images/fr/language.bmp - fr_for_help_text: ./localized_images/fr/for_help.bmp - - es_model_text: ./localized_images/es/model.bmp - es_devmode_text: ./localized_images/es/devmode.bmp - es_remove_text: ./localized_images/es/remove.bmp - es_yuck_text: ./localized_images/es/yuck.bmp - es_insert_text: ./localized_images/es/insert.bmp - es_insert_usb_text: ./localized_images/es/insert_usb.bmp - es_language_text: ./localized_images/es/language.bmp - es_for_help_text: ./localized_images/es/for_help.bmp - - it_model_text: ./localized_images/it/model.bmp - it_devmode_text: ./localized_images/it/devmode.bmp - it_remove_text: ./localized_images/it/remove.bmp - it_yuck_text: ./localized_images/it/yuck.bmp - it_insert_text: ./localized_images/it/insert.bmp - it_insert_usb_text: ./localized_images/it/insert_usb.bmp - it_language_text: ./localized_images/it/language.bmp - it_for_help_text: ./localized_images/it/for_help.bmp - - de_model_text: ./localized_images/de/model.bmp - de_devmode_text: ./localized_images/de/devmode.bmp - de_remove_text: ./localized_images/de/remove.bmp - de_yuck_text: ./localized_images/de/yuck.bmp - de_insert_text: ./localized_images/de/insert.bmp - de_insert_usb_text: ./localized_images/de/insert_usb.bmp - de_language_text: ./localized_images/de/language.bmp - de_for_help_text: ./localized_images/de/for_help.bmp - - nl_model_text: ./localized_images/nl/model.bmp - nl_devmode_text: ./localized_images/nl/devmode.bmp - nl_remove_text: ./localized_images/nl/remove.bmp - nl_yuck_text: ./localized_images/nl/yuck.bmp - nl_insert_text: ./localized_images/nl/insert.bmp - nl_insert_usb_text: ./localized_images/nl/insert_usb.bmp - nl_language_text: ./localized_images/nl/language.bmp - nl_for_help_text: ./localized_images/nl/for_help.bmp - - da_model_text: ./localized_images/da/model.bmp - da_devmode_text: ./localized_images/da/devmode.bmp - da_remove_text: ./localized_images/da/remove.bmp - da_yuck_text: ./localized_images/da/yuck.bmp - da_insert_text: ./localized_images/da/insert.bmp - da_insert_usb_text: ./localized_images/da/insert_usb.bmp - da_language_text: ./localized_images/da/language.bmp - da_for_help_text: ./localized_images/da/for_help.bmp - - no_model_text: ./localized_images/no/model.bmp - no_devmode_text: ./localized_images/no/devmode.bmp - no_remove_text: ./localized_images/no/remove.bmp - no_yuck_text: ./localized_images/no/yuck.bmp - no_insert_text: ./localized_images/no/insert.bmp - no_insert_usb_text: ./localized_images/no/insert_usb.bmp - no_language_text: ./localized_images/no/language.bmp - no_for_help_text: ./localized_images/no/for_help.bmp - - sv_model_text: ./localized_images/sv/model.bmp - sv_devmode_text: ./localized_images/sv/devmode.bmp - sv_remove_text: ./localized_images/sv/remove.bmp - sv_yuck_text: ./localized_images/sv/yuck.bmp - sv_insert_text: ./localized_images/sv/insert.bmp - sv_insert_usb_text: ./localized_images/sv/insert_usb.bmp - sv_language_text: ./localized_images/sv/language.bmp - sv_for_help_text: ./localized_images/sv/for_help.bmp - - ko_model_text: ./localized_images/ko/model.bmp - ko_devmode_text: ./localized_images/ko/devmode.bmp - ko_remove_text: ./localized_images/ko/remove.bmp - ko_yuck_text: ./localized_images/ko/yuck.bmp - ko_insert_text: ./localized_images/ko/insert.bmp - ko_insert_usb_text: ./localized_images/ko/insert_usb.bmp - ko_language_text: ./localized_images/ko/language.bmp - ko_for_help_text: ./localized_images/ko/for_help.bmp - - ja_model_text: ./localized_images/ja/model.bmp - ja_devmode_text: ./localized_images/ja/devmode.bmp - ja_remove_text: ./localized_images/ja/remove.bmp - ja_yuck_text: ./localized_images/ja/yuck.bmp - ja_insert_text: ./localized_images/ja/insert.bmp - ja_insert_usb_text: ./localized_images/ja/insert_usb.bmp - ja_language_text: ./localized_images/ja/language.bmp - ja_for_help_text: ./localized_images/ja/for_help.bmp - -screens: - en_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [342, 333, en_devmode_text] - - [211, 482, divider_btm] - - [341, 506, en_model_text] - - [379, 508, $HWID] - - en_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_language_text] - - [585, 83, arrow_right] - - [262, 169, en_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [282, 506, en_for_help_text] - - [348, 506, url] - - [341, 530, en_model_text] - - [379, 532, $HWID] - - en_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_language_text] - - [585, 83, arrow_right] - - [278, 169, en_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [282, 506, en_for_help_text] - - [348, 506, url] - - [341, 530, en_model_text] - - [379, 532, $HWID] - - en_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [252, 347, en_insert_usb_text] - - [211, 482, divider_btm] - - [282, 506, en_for_help_text] - - [348, 506, url] - - [341, 530, en_model_text] - - [379, 532, $HWID] - - es_419_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_419_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [297, 333, es_419_devmode_text] - - [211, 482, divider_btm] - - [339, 506, es_419_model_text] - - [382, 508, $HWID] - - es_419_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_419_language_text] - - [585, 83, arrow_right] - - [187, 169, es_419_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [249, 506, es_419_for_help_text] - - [380, 506, url] - - [339, 530, es_419_model_text] - - [382, 532, $HWID] - - es_419_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_419_language_text] - - [585, 83, arrow_right] - - [275, 169, es_419_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [249, 506, es_419_for_help_text] - - [380, 506, url] - - [339, 530, es_419_model_text] - - [382, 532, $HWID] - - es_419_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_419_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [179, 347, es_419_insert_usb_text] - - [211, 482, divider_btm] - - [249, 506, es_419_for_help_text] - - [380, 506, url] - - [339, 530, es_419_model_text] - - [382, 532, $HWID] - - pt_BR_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [521, 83, arrow_left] - - [530, 78, pt_BR_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [327, 333, pt_BR_devmode_text] - - [211, 482, divider_btm] - - [339, 506, pt_BR_model_text] - - [382, 508, $HWID] - - pt_BR_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [521, 83, arrow_left] - - [530, 78, pt_BR_language_text] - - [585, 83, arrow_right] - - [181, 169, pt_BR_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [270, 506, pt_BR_for_help_text] - - [360, 506, url] - - [339, 530, pt_BR_model_text] - - [382, 532, $HWID] - - pt_BR_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [521, 83, arrow_left] - - [530, 78, pt_BR_language_text] - - [585, 83, arrow_right] - - [294, 169, pt_BR_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [270, 506, pt_BR_for_help_text] - - [360, 506, url] - - [339, 530, pt_BR_model_text] - - [382, 532, $HWID] - - pt_BR_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [521, 83, arrow_left] - - [530, 78, pt_BR_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [202, 347, pt_BR_insert_usb_text] - - [211, 482, divider_btm] - - [270, 506, pt_BR_for_help_text] - - [360, 506, url] - - [339, 530, pt_BR_model_text] - - [382, 532, $HWID] - - en_GB_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_GB_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [342, 333, en_GB_devmode_text] - - [211, 482, divider_btm] - - [341, 506, en_GB_model_text] - - [379, 508, $HWID] - - en_GB_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_GB_language_text] - - [585, 83, arrow_right] - - [262, 169, en_GB_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [282, 506, en_GB_for_help_text] - - [348, 506, url] - - [341, 530, en_GB_model_text] - - [379, 532, $HWID] - - en_GB_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_GB_language_text] - - [585, 83, arrow_right] - - [278, 169, en_GB_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [282, 506, en_GB_for_help_text] - - [348, 506, url] - - [341, 530, en_GB_model_text] - - [379, 532, $HWID] - - en_GB_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, en_GB_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [252, 347, en_GB_insert_usb_text] - - [211, 482, divider_btm] - - [282, 506, en_GB_for_help_text] - - [348, 506, url] - - [341, 530, en_GB_model_text] - - [379, 532, $HWID] - - fr_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, fr_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [321, 333, fr_devmode_text] - - [211, 482, divider_btm] - - [337, 506, fr_model_text] - - [383, 508, $HWID] - - fr_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, fr_language_text] - - [585, 83, arrow_right] - - [167, 169, fr_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [262, 506, fr_for_help_text] - - [367, 506, url] - - [337, 530, fr_model_text] - - [383, 532, $HWID] - - fr_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, fr_language_text] - - [585, 83, arrow_right] - - [251, 169, fr_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [262, 506, fr_for_help_text] - - [367, 506, url] - - [337, 530, fr_model_text] - - [383, 532, $HWID] - - fr_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, fr_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [206, 347, fr_insert_usb_text] - - [211, 482, divider_btm] - - [262, 506, fr_for_help_text] - - [367, 506, url] - - [337, 530, fr_model_text] - - [383, 532, $HWID] - - es_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [297, 333, es_devmode_text] - - [211, 482, divider_btm] - - [339, 506, es_model_text] - - [382, 508, $HWID] - - es_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_language_text] - - [585, 83, arrow_right] - - [187, 169, es_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [249, 506, es_for_help_text] - - [380, 506, url] - - [339, 530, es_model_text] - - [382, 532, $HWID] - - es_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_language_text] - - [585, 83, arrow_right] - - [275, 169, es_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [249, 506, es_for_help_text] - - [380, 506, url] - - [339, 530, es_model_text] - - [382, 532, $HWID] - - es_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [533, 83, arrow_left] - - [542, 78, es_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [179, 347, es_insert_usb_text] - - [211, 482, divider_btm] - - [249, 506, es_for_help_text] - - [380, 506, url] - - [339, 530, es_model_text] - - [382, 532, $HWID] - - it_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, it_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [333, 333, it_devmode_text] - - [211, 482, divider_btm] - - [337, 506, it_model_text] - - [383, 508, $HWID] - - it_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, it_language_text] - - [585, 83, arrow_right] - - [200, 169, it_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [267, 506, it_for_help_text] - - [363, 506, url] - - [337, 530, it_model_text] - - [383, 532, $HWID] - - it_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, it_language_text] - - [585, 83, arrow_right] - - [294, 169, it_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [267, 506, it_for_help_text] - - [363, 506, url] - - [337, 530, it_model_text] - - [383, 532, $HWID] - - it_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [535, 83, arrow_left] - - [544, 78, it_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [222, 347, it_insert_usb_text] - - [211, 482, divider_btm] - - [267, 506, it_for_help_text] - - [363, 506, url] - - [337, 530, it_model_text] - - [383, 532, $HWID] - - de_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [530, 83, arrow_left] - - [539, 78, de_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [308, 333, de_devmode_text] - - [211, 482, divider_btm] - - [340, 506, de_model_text] - - [380, 508, $HWID] - - de_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [530, 83, arrow_left] - - [539, 78, de_language_text] - - [585, 83, arrow_right] - - [207, 169, de_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [274, 506, de_for_help_text] - - [355, 506, url] - - [340, 530, de_model_text] - - [380, 532, $HWID] - - de_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [530, 83, arrow_left] - - [539, 78, de_language_text] - - [585, 83, arrow_right] - - [275, 169, de_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [274, 506, de_for_help_text] - - [355, 506, url] - - [340, 530, de_model_text] - - [380, 532, $HWID] - - de_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [530, 83, arrow_left] - - [539, 78, de_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [176, 347, de_insert_usb_text] - - [211, 482, divider_btm] - - [274, 506, de_for_help_text] - - [355, 506, url] - - [340, 530, de_model_text] - - [380, 532, $HWID] - - nl_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [517, 83, arrow_left] - - [526, 78, nl_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [300, 333, nl_devmode_text] - - [211, 482, divider_btm] - - [341, 506, nl_model_text] - - [379, 508, $HWID] - - nl_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [517, 83, arrow_left] - - [526, 78, nl_language_text] - - [585, 83, arrow_right] - - [252, 169, nl_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [256, 506, nl_for_help_text] - - [373, 506, url] - - [341, 530, nl_model_text] - - [379, 532, $HWID] - - nl_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [517, 83, arrow_left] - - [526, 78, nl_language_text] - - [585, 83, arrow_right] - - [278, 169, nl_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [256, 506, nl_for_help_text] - - [373, 506, url] - - [341, 530, nl_model_text] - - [379, 532, $HWID] - - nl_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [517, 83, arrow_left] - - [526, 78, nl_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [184, 347, nl_insert_usb_text] - - [211, 482, divider_btm] - - [256, 506, nl_for_help_text] - - [373, 506, url] - - [341, 530, nl_model_text] - - [379, 532, $HWID] - - da_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [540, 83, arrow_left] - - [549, 78, da_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [332, 333, da_devmode_text] - - [211, 482, divider_btm] - - [341, 506, da_model_text] - - [379, 508, $HWID] - - da_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [540, 83, arrow_left] - - [549, 78, da_language_text] - - [585, 83, arrow_right] - - [266, 169, da_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [274, 506, da_for_help_text] - - [355, 506, url] - - [341, 530, da_model_text] - - [379, 532, $HWID] - - da_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [540, 83, arrow_left] - - [549, 78, da_language_text] - - [585, 83, arrow_right] - - [281, 169, da_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [274, 506, da_for_help_text] - - [355, 506, url] - - [341, 530, da_model_text] - - [379, 532, $HWID] - - da_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [540, 83, arrow_left] - - [549, 78, da_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [248, 347, da_insert_usb_text] - - [211, 482, divider_btm] - - [274, 506, da_for_help_text] - - [355, 506, url] - - [341, 530, da_model_text] - - [379, 532, $HWID] - - no_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 83, arrow_left] - - [552, 78, no_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [339, 333, no_devmode_text] - - [211, 482, divider_btm] - - [340, 506, no_model_text] - - [380, 508, $HWID] - - no_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 83, arrow_left] - - [552, 78, no_language_text] - - [585, 83, arrow_right] - - [250, 169, no_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [249, 506, no_for_help_text] - - [381, 506, url] - - [340, 530, no_model_text] - - [380, 532, $HWID] - - no_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 83, arrow_left] - - [552, 78, no_language_text] - - [585, 83, arrow_right] - - [290, 169, no_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [249, 506, no_for_help_text] - - [381, 506, url] - - [340, 530, no_model_text] - - [380, 532, $HWID] - - no_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 83, arrow_left] - - [552, 78, no_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [255, 347, no_insert_usb_text] - - [211, 482, divider_btm] - - [249, 506, no_for_help_text] - - [381, 506, url] - - [340, 530, no_model_text] - - [380, 532, $HWID] - - sv_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [531, 83, arrow_left] - - [540, 78, sv_language_text] - - [585, 83, arrow_right] - - [362, 211, devmode_graphic] - - [311, 333, sv_devmode_text] - - [211, 482, divider_btm] - - [340, 506, sv_model_text] - - [380, 508, $HWID] - - sv_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [531, 83, arrow_left] - - [540, 78, sv_language_text] - - [585, 83, arrow_right] - - [252, 169, sv_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [277, 506, sv_for_help_text] - - [353, 506, url] - - [340, 530, sv_model_text] - - [380, 532, $HWID] - - sv_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [531, 83, arrow_left] - - [540, 78, sv_language_text] - - [585, 83, arrow_right] - - [301, 169, sv_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [277, 506, sv_for_help_text] - - [353, 506, url] - - [340, 530, sv_model_text] - - [380, 532, $HWID] - - sv_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [531, 83, arrow_left] - - [540, 78, sv_language_text] - - [585, 83, arrow_right] - - [392, 199, insert_graphic] - - [216, 347, sv_insert_usb_text] - - [211, 482, divider_btm] - - [277, 506, sv_for_help_text] - - [353, 506, url] - - [340, 530, sv_model_text] - - [380, 532, $HWID] - - ko_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [541, 82, arrow_left] - - [550, 77, ko_language_text] - - [585, 82, arrow_right] - - [362, 211, devmode_graphic] - - [316, 334, ko_devmode_text] - - [211, 482, divider_btm] - - [346, 507, ko_model_text] - - [375, 509, $HWID] - - ko_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [541, 82, arrow_left] - - [550, 77, ko_language_text] - - [585, 82, arrow_right] - - [286, 170, ko_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [287, 507, ko_for_help_text] - - [343, 507, url] - - [346, 532, ko_model_text] - - [375, 534, $HWID] - - ko_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [541, 82, arrow_left] - - [550, 77, ko_language_text] - - [585, 82, arrow_right] - - [298, 170, ko_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [287, 507, ko_for_help_text] - - [343, 507, url] - - [346, 532, ko_model_text] - - [375, 534, $HWID] - - ko_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [541, 82, arrow_left] - - [550, 77, ko_language_text] - - [585, 82, arrow_right] - - [392, 199, insert_graphic] - - [282, 349, ko_insert_usb_text] - - [211, 482, divider_btm] - - [287, 507, ko_for_help_text] - - [343, 507, url] - - [346, 532, ko_model_text] - - [375, 534, $HWID] - - ja_devel: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 84, arrow_left] - - [552, 80, ja_language_text] - - [585, 84, arrow_right] - - [362, 211, devmode_graphic] - - [314, 333, ja_devmode_text] - - [211, 482, divider_btm] - - [342, 504, ja_model_text] - - [379, 505, $HWID] - - ja_remove: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 84, arrow_left] - - [552, 80, ja_language_text] - - [585, 84, arrow_right] - - [254, 167, ja_remove_text] - - [245, 191, remove_graphic] - - [211, 482, divider_btm] - - [277, 507, ja_for_help_text] - - [352, 506, url] - - [342, 528, ja_model_text] - - [379, 529, $HWID] - - ja_yuck: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 84, arrow_left] - - [552, 80, ja_language_text] - - [585, 84, arrow_right] - - [270, 169, ja_yuck_text] - - [369, 254, yuck_graphic] - - [211, 482, divider_btm] - - [277, 507, ja_for_help_text] - - [352, 506, url] - - [342, 528, ja_model_text] - - [379, 529, $HWID] - - ja_insert: - - [0, 0, white_bg] - - [211, 105, divider_top] - - [211, 74, chrome_logo] - - [543, 84, arrow_left] - - [552, 80, ja_language_text] - - [585, 84, arrow_right] - - [392, 199, insert_graphic] - - [267, 345, ja_insert_usb_text] - - [211, 482, divider_btm] - - [277, 507, ja_for_help_text] - - [352, 506, url] - - [342, 528, ja_model_text] - - [379, 529, $HWID] - -localizations: - - # This determines the order in which the localizations appear. The first - # one is the default. - - - [ en_devel, en_remove, en_yuck, en_insert ] - - [ es_419_devel, es_419_remove, es_419_yuck, es_419_insert ] - - [ pt_BR_devel, pt_BR_remove, pt_BR_yuck, pt_BR_insert ] - - [ en_GB_devel, en_GB_remove, en_GB_yuck, en_GB_insert ] - - [ fr_devel, fr_remove, fr_yuck, fr_insert ] - - [ es_devel, es_remove, es_yuck, es_insert ] - - [ it_devel, it_remove, it_yuck, it_insert ] - - [ de_devel, de_remove, de_yuck, de_insert ] - - [ nl_devel, nl_remove, nl_yuck, nl_insert ] - - [ da_devel, da_remove, da_yuck, da_insert ] - - [ no_devel, no_remove, no_yuck, no_insert ] - - [ sv_devel, sv_remove, sv_yuck, sv_insert ] - - [ ko_devel, ko_remove, ko_yuck, ko_insert ] - - [ ja_devel, ja_remove, ja_yuck, ja_insert ] - -locale_index: - - # List the locale names in order so we can choose the default at the factory - - - en - - es_419 - - pt_BR - - en_GB - - fr - - es - - it - - de - - nl - - da - - no - - sv - - ko - - ja diff --git a/scripts/newbitmaps/images/Makefile b/scripts/newbitmaps/images/Makefile index b36b8c0bcd..9757cbf323 100644 --- a/scripts/newbitmaps/images/Makefile +++ b/scripts/newbitmaps/images/Makefile @@ -11,20 +11,16 @@ # this occasional need. TARGETS=x86 arm - -# These are all the known locales, sorted more-or-less geograpically. We -# generally don't have room in the BIOS for all of them at once. -DEFAULT_LOCALES=en es_419 pt_BR en_GB fr es pt_PT ca it de \ - el nl da no sv fi et lv lt ru pl cs sk hu sl sr hr bg ro \ - uk tr iw ar fa hi th vi id fil zh_CN zh_TW ko ja +# To generate all locales, make from top level. +LOCALES=en default: outside_chroot @echo "Specify a target to build for:" @echo " ${TARGETS}" +# TODO(hungte) It's now not easy to have bmpblk_utility outside +# chroot... We need some better way to do this. outside_chroot: - # TODO(hungte) It's now not easy to have bmpblk_utility outside - # chroot... We need some better way to do this. @if [ -e /etc/debian_chroot ]; then \ echo "ImageMagick is too complex to build inside the chroot."; \ echo "You must be outside the chroot to do this"; \ @@ -35,15 +31,15 @@ outside_chroot: ${TARGETS}:: outside_chroot x86:: - ./build_images "$@" - cd "out_$@" && ../make_default_yaml ${DEFAULT_LOCALES} + LOCALES="$(LOCALES)" ./build_images "$@" + cd "out_$@" && ../make_default_yaml $(LOCALES) cd "out_$@" && bmpblk_utility -c DEFAULT.yaml bmpblock.bin ls -l "out_$@"/bmpblock.bin arm:: - ./build_images "$@" - cd "out_$@" && ../make_default_yaml ${DEFAULT_LOCALES} + LOCALES="$(LOCALES)" ./build_images "$@" + cd "out_$@" && ../make_default_yaml $(LOCALES) cd "out_$@" && bmpblk_utility -c DEFAULT.yaml bmpblock.bin ls -l "out_$@"/bmpblock.bin diff --git a/scripts/newbitmaps/images/Url.bmp b/scripts/newbitmaps/images/Url.bmp deleted file mode 100644 index ec6cd58d1146fbce41b74918e95dd516e547a833..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8086 zcmeHLdsI}%8ULkt?)IGBbJ|jBku(&orFft^ML#NkZpKBAc97NZUchpc^kei=aX*-0<8)($qQKb`)^_0gh0Z# zQ8zINb(6kB=#RRj@1pLZVAL}n9)S8sLI}5`e)9LQe##w$P^?c5BMiibse`Z~or=JjpV$;k!vFWj&5~8tb)-Y_E9fQq` z$A5;+bA}T}K+OF);TI53{1PJlSJ?8GIKr>7#eNUAGUkuM)+a|3euJ%l`z^LP;tBU+ z+u!fQwx{mL_KXB<&wPNOWBb#;L&JixX!yrCG-N$UNJPWJ@!0Xq1nh85#Exet5t7iD z{SX@e`7q%TG(I;OjX6`Wlkxnc*qNJ5n2McwDcH4WI^mDloj(J+7pGyj`!VeC%)*`* zXA>UBo|ooe?~*@b@5@hM?IyK(eA501Y7 zBH<+*``~55D>(Myt2nl%5KZN;q3NU72}{xR@xRdY$s0J%@D}0tr^^U$;zY%ALNQKM zzKs)WOK`I49h|H#C9J^7&)!Az=PS`%vkJ}sSxtBk&9(32)Veal2RK#tAx_n=LCgA& z(6ZrU!Y63)dC{`*Q=DdOt{_z6v{;KXTdD}vIJ5OLoZ0p{p$2CgY6UIhAngg4L8AP1?0ai`kM{^scVXHRR_OPe#& zgZbmjKfA;8Hdj%(P`w@;k((D0T1)Byi-gBU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1gED(HM?JghZncZK?nG{4{#uT5GgwLW*Qq&2 + echo "ERROR: $*" >&2 exit 1 } @@ -85,12 +85,11 @@ main() { # Prepare output folder mkdir -p "$output" - cp hwid_fonts.bin "$output" # Prepare images in current folder # TODO(hungte) Deprecate arrow*.bmp by markup ◀ and ▶, and # Url.bmp by http://. - for X in *.bmp *.png; do + for X in $(ls *.bmp *.png); do if [ "$X" = "$BACKGROUND_IMAGE" ]; then convert_to_bmp3 "$X" "$output" "$background_scale_param" else @@ -98,13 +97,38 @@ main() { fi done - # Prepares localized images. All these images were rendered by pango-view and - # should not have transparency, so we specify flatten="" to speed up. - base="../strings/localized_text" - for X in $base/*/*.png; do - locale="$(basename $(dirname $X))" - convert_to_bmp3 "$X" "$output/locale/$locale" "$scale_param" "" + # Prepares strings and localized images. All these images were rendered by + # pango-view and should not have transparency, so we specify flatten="" to + # speed up. + echo "Preparing common strings..." + base="../strings" + for X in $base/*.png; do + convert_to_bmp3 "$X" "$output" "$scale_param" "" done + echo "Preparing localized messages... $LOCALES" + base="../strings/localized_text" + if [ -z "$LOCALES" ]; then + # Collect all locales + for X in $(cd $base; ls); do + if [ -d "$base/$X" ]; then + LOCALES="${LOCALES}${X} " + fi + done + echo "Found locales: $LOCALES" + fi + for locale in $LOCALES; do + # Prepare all locales. + for X in $base/$locale/*.png; do + convert_to_bmp3 "$X" "$output/locale/$locale" "$scale_param" "" + done + done + + # Prepare fonts + base="../strings/font" + for X in $base/*.png; do + convert_to_bmp3 "$X" "$output/font" "$scale_param" "" + done + bmpblk_font --outfile "$output/hwid_fonts.bin" "$output"/font/*.bmp } set -e diff --git a/scripts/newbitmaps/images/hwid_fonts.bin b/scripts/newbitmaps/images/hwid_fonts.bin deleted file mode 100644 index 2ec1f6ed3ddeb39c54cff2ebc1b82dd02bb1feec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52592 zcmeI5d0fre|Hof5WA=UD_kCxWF~-ao!q{RgNhK7aqD?7Us7Pf*c3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ILWxyV4S|*XKj*?&vrh8vDG4M!SMA&-oI)zNzNR*iW&j-wTg-w z0AhSy?RhL}39$ah+5kf(<0RuG<0Ru+gK?yH)6|<*DxE9lJve2LD6Oyc4i|S?E}xf0&Y+toQm1pMbf6aSyZp z^D`SpYni7f^Ymn%p3Kv0Ay1F9-WoxtrM@7YxY#ClS{cwxow^8VzaX8)41<7jb;pRP_MDA z!Icp)6#wpQO8qGpr))DRbHF}2H#UWz&%Y>MY9W5h*ly?p!=x`LeL?99N?)*5d_mr8 zpvq-@PB(i=xz687rE>StQNi%|gyE<8R=k;2l&IxiGSIX{04$?hcMfr>%HJ#4tCDD! zS$2WdCQ|u?>nO^-io_;}vJoO|jSaAnjFXI$jFXIOCB_LBsbfnOB&o+T*~HkORl@|* zh*CQQ34g6}a)_Cj*k)Z2GQEl_$IhpmVac@D_B5$Og7jXb;mv2_TMZ4cG%(IsAx}Rc z>*>i{WSNUBbCLgbE^Rf`WUkii#=%oweV>nRi@QC2`~_CHAfM z4XjpT(PGP0{C*2=8_n6iI5YFm=q;eR{0g6M6I*z{g|~rmZCD$x>9t(b*l4X^(~~ug zWgQk-heg(5xpf^D-hwT0-A6|q>L|sD#HEQ2qH3pTR)1xz%pY~oP^s&FP6$@2MhTVy zzLHNe&XjScj5F_CoXP83<*uu_#)&J@@64xEzD_xu=gHl4%IUl^7V~_+WHQ?|S`Pz0 zm3)$Xl6;bUx^sLIj!@H9TcxEno*9&}^J3FmjmN-91E1tMQF%^Oo)eYlMDO4^(ORWZ Vnz<=A^E6Fut@vw> "$yaml_file" } +# TODO(hungte) Remove the unnecessary hwid_*.bmp loop below. # Generate a new yaml file for each specified hwid_*.bmp file. for hwid_bmp in hwid_unknown.bmp; do echo "$yaml_file" @@ -302,7 +303,7 @@ images: # The following strings must be approved by the localization people EOF1 - # some global variables matching the yaml definitions + # Global variables matching the yaml definitions arrow_left='arrow_left.bmp' arrow_right='arrow_right.bmp' chrome_logo='chrome_logo.bmp' @@ -318,23 +319,7 @@ EOF1 # Enumerate the bitmaps for each locale-specific string. for lc in $locales; do - cat >>"$yaml_file" <>"$yaml_file" < http://google.com/chromeos/recovery diff --git a/scripts/newbitmaps/strings/Url.txt b/scripts/newbitmaps/strings/Url.txt deleted file mode 100644 index 3ff970c75f..0000000000 --- a/scripts/newbitmaps/strings/Url.txt +++ /dev/null @@ -1 +0,0 @@ -http://google.com/chromeos/recovery diff --git a/scripts/newbitmaps/strings/build_font b/scripts/newbitmaps/strings/build_font new file mode 100755 index 0000000000..50f483b146 --- /dev/null +++ b/scripts/newbitmaps/strings/build_font @@ -0,0 +1,41 @@ +#!/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="#888888" +FONT="Droid Sans Bold" + +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" +} + +set -e +main "$@" diff --git a/scripts/newbitmaps/strings/current_hwid.txt b/scripts/newbitmaps/strings/current_hwid.txt deleted file mode 100644 index bc38691bce..0000000000 --- a/scripts/newbitmaps/strings/current_hwid.txt +++ /dev/null @@ -1 +0,0 @@ -<<< model name goes here >>> diff --git a/scripts/newbitmaps/strings/hwid_unknown.txt b/scripts/newbitmaps/strings/hwid_unknown.txt deleted file mode 100644 index b7faba0be0..0000000000 --- a/scripts/newbitmaps/strings/hwid_unknown.txt +++ /dev/null @@ -1 +0,0 @@ -CHROMEOS PROTOTYPE 0001 diff --git a/scripts/newbitmaps/strings/localized_text/Makefile b/scripts/newbitmaps/strings/localized_text/Makefile index bd074288e8..96d8c8a185 100644 --- a/scripts/newbitmaps/strings/localized_text/Makefile +++ b/scripts/newbitmaps/strings/localized_text/Makefile @@ -2,9 +2,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -LOCALES=ar bg ca cs da de el en en_GB es es_419 et fa fi fil fr hi hr hu \ - id it iw ja ko lt lv nl no pl pt_BR pt_PT ro ru sk sl sr sv th tr \ - uk vi zh_CN zh_TW +LOCALES=ar bg bn ca cs da de el en en_GB es es_419 et fa fi fil fr gu hi hr \ + hu id it iw ja kn ko lt lv ml mr ms nl no pl pt_BR pt_PT ro ru sk sl \ + sr sv ta te th tr uk vi zh_CN zh_TW DIR_TARGETS=$(foreach DIR,$(LOCALES),$(DIR)-dir) diff --git a/scripts/newbitmaps/strings/text_to_png b/scripts/newbitmaps/strings/text_to_png index 260ca1aecd..60d19f12cd 100755 --- a/scripts/newbitmaps/strings/text_to_png +++ b/scripts/newbitmaps/strings/text_to_png @@ -3,17 +3,27 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # -# Render a text file into a bitmap. Files named '*.txt' are small font, those -# named '*.TXT' are large font. +# Render a text file into a bitmap. Files named '*.txt' are normal text files, +# while '*.TXT' files may contain markup. # # Options: # # --lan=LANGUAGE Render language (locale) settings # --font=FONTNAME Use specified font (instead of Droid Sans) +# --point=POINT Font size, in points (72dpi) +# --margin=MARGIN Set different margin (usually for font bitmaps) +# --color=COLOR Override foreground color (in '#ffffff' format) +# --markup Render text as pango-view markup file +# --align Override align settings # font="Droid Sans" language="" -point=15 +pointsize=15 +margin=3 +align="center" +bgcolor="#ffffff" +color="#000000" +params="" while true ; do case "$1" in @@ -27,8 +37,24 @@ while true ; do [ -n "$param" ] && font="$param" shift ;; + --align=*) + align="${1##*=}" + shift + ;; + --color=*) + color="${1##*=}" + shift + ;; --point=*) - point="${1##*=}" + pointsize="${1##*=}" + shift + ;; + --margin=*) + margin="${1##*=}" + shift + ;; + --markup) + params="$params --markup" shift ;; *) @@ -42,42 +68,33 @@ done # - New pango-view has --pixel to assign font size in pixel, but that is not # supported by old (ex, 1.24.5 in chroot) so we must assign --dpi 72 for # pointsize. -# TODO(hungte) Replace font color & size settings to pango --markup. -bg="#ffffff" -small_color="#000000" -small_font="$font" -small_pointsize="$point" -large_color="#585858" -large_font="$font" -large_pointsize="$((point * 8 / 3))" for txtfile in $*; do # pango-view does not support assigning output format options for bitmap, so # we must create images in PNG format and then post-process it (ex, convert # into BMP by ImageMagick). - pngfile="${txtfile%.*}".png + file_opt="" case "$txtfile" in *.txt) - pango-view -q $language \ - --background "$bg" --foreground "$small_color" \ - --font "$small_font $small_pointsize" --dpi 72 \ - --margin=3 --align=center \ - --output "$pngfile" \ - "$txtfile" - echo "wrote $pngfile" + file_opt="" ;; *.TXT) - pango-view -q $language \ - --background "$bg" --foreground "$large_color" \ - --font "$large_font $large_pointsize" --dpi 72 \ - --margin=10 --align=center \ - --output "$pngfile" \ - "$txtfile" - echo "wrote $pngfile" + file_opt="--markup " ;; *) echo "Ignoring $txtfile. Filename should end with .txt or .TXT" + continue ;; esac + pango-view -q $language \ + --hinting=full \ + --background "$bgcolor" --foreground "$color" \ + --font "$font $pointsize" --dpi 72 \ + --margin $margin \ + --align="$align" \ + $params $file_opt \ + --output "$pngfile" \ + "$txtfile" + echo "wrote $pngfile" done