diff options
author | Dave Parker <dparker@chromium.org> | 2012-08-15 14:00:01 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-15 22:49:09 -0700 |
commit | 12ef75d84d2e45884c150b65bb584c0bc4e3342b (patch) | |
tree | c09821b5a04536c8f6c10963f728a296966efb3d | |
parent | 06e8e900188429b842550f7c17d0a1b12349db3c (diff) | |
download | vboot-12ef75d84d2e45884c150b65bb584c0bc4e3342b.tar.gz |
Fix alignment of HWID on firmware screens and bitmap viewer.
BUG=chrome-os-partner:12701
TEST=Disable the 'clean' step in the Makefile and
run 'make' in newbitmaps directory. Use the bitmap_viewer to
verify the HWID is correctly aligned when compared with the "Model"
text.
Change-Id: Icd3977f50461492a0999059ccd4982d16a373dce
Reviewed-on: https://gerrit.chromium.org/gerrit/30453
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
-rw-r--r-- | scripts/newbitmaps/images/hwid_unknown.bmp | bin | 3662 -> 0 bytes | |||
-rwxr-xr-x | scripts/newbitmaps/images/make_default_yaml | 4 | ||||
-rwxr-xr-x | scripts/newbitmaps/lib/bmpblock.py | 4 | ||||
-rw-r--r-- | scripts/newbitmaps/lib/current_hwid.bmp | bin | 3662 -> 0 bytes | |||
-rw-r--r-- | scripts/newbitmaps/strings/Makefile | 2 | ||||
-rwxr-xr-x | scripts/newbitmaps/strings/build_font | 6 | ||||
-rw-r--r-- | scripts/newbitmaps/strings/hwid_placeholder.TXT | 1 |
7 files changed, 12 insertions, 5 deletions
diff --git a/scripts/newbitmaps/images/hwid_unknown.bmp b/scripts/newbitmaps/images/hwid_unknown.bmp Binary files differdeleted file mode 100644 index be196e3b..00000000 --- a/scripts/newbitmaps/images/hwid_unknown.bmp +++ /dev/null diff --git a/scripts/newbitmaps/images/make_default_yaml b/scripts/newbitmaps/images/make_default_yaml index 10b51ee8..216cc0f5 100755 --- a/scripts/newbitmaps/images/make_default_yaml +++ b/scripts/newbitmaps/images/make_default_yaml @@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # -# Generate a new DEFAULT.yaml file using hwid_unknown.bmp as a placeholder. +# Generate a new DEFAULT.yaml file using hwid_placeholder.bmp as a placeholder. # yaml_file="DEFAULT.yaml" @@ -271,7 +271,7 @@ add_footer_without_url() { # 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 +for hwid_bmp in hwid_placeholder.bmp; do echo "$yaml_file" # Global variables matching the yaml definitions diff --git a/scripts/newbitmaps/lib/bmpblock.py b/scripts/newbitmaps/lib/bmpblock.py index a0d9ac5e..e03e5b7b 100755 --- a/scripts/newbitmaps/lib/bmpblock.py +++ b/scripts/newbitmaps/lib/bmpblock.py @@ -62,8 +62,8 @@ class BmpBlock(object): if "$HWID.rtol" in images: print "WARNING: ignoring $HWID.rtol font blob" # TODO(hungte) Replace this by rendering with font block. - images["$HWID"] = os.path.join(self.libdir,'current_hwid.bmp') - images["$HWID.rtol"] = os.path.join(self.libdir, 'current_hwid.bmp') + images["$HWID"] = 'hwid_placeholder.bmp' + images["$HWID.rtol"] = 'hwid_placeholder.bmp' screens = thing["screens"] assert isinstance(screens, dict) diff --git a/scripts/newbitmaps/lib/current_hwid.bmp b/scripts/newbitmaps/lib/current_hwid.bmp Binary files differdeleted file mode 100644 index be196e3b..00000000 --- a/scripts/newbitmaps/lib/current_hwid.bmp +++ /dev/null diff --git a/scripts/newbitmaps/strings/Makefile b/scripts/newbitmaps/strings/Makefile index cfb7c957..1c7c5858 100644 --- a/scripts/newbitmaps/strings/Makefile +++ b/scripts/newbitmaps/strings/Makefile @@ -13,7 +13,7 @@ LOCALEDIR=localized_text .txt.png: ./text_to_png $< -all: font Url.png localized_text +all: font Url.png hwid_placeholder.png localized_text localized_text: make -C $(LOCALEDIR) diff --git a/scripts/newbitmaps/strings/build_font b/scripts/newbitmaps/strings/build_font index 50f483b1..59fb05c5 100755 --- a/scripts/newbitmaps/strings/build_font +++ b/scripts/newbitmaps/strings/build_font @@ -10,6 +10,7 @@ SCRIPT_DIR="$(dirname "$SCRIPT")" GLYPHS='* 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ{}-_' COLOR="#888888" FONT="Droid Sans Bold" +MARGIN="3" die() { echo "ERROR: $*" >&2 @@ -35,6 +36,11 @@ main() { 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 diff --git a/scripts/newbitmaps/strings/hwid_placeholder.TXT b/scripts/newbitmaps/strings/hwid_placeholder.TXT new file mode 100644 index 00000000..78bc28d1 --- /dev/null +++ b/scripts/newbitmaps/strings/hwid_placeholder.TXT @@ -0,0 +1 @@ +HWID GOES HERE 4857 |