mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
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>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
1
scripts/newbitmaps/strings/hwid_placeholder.TXT
Normal file
1
scripts/newbitmaps/strings/hwid_placeholder.TXT
Normal file
@@ -0,0 +1 @@
|
||||
HWID GOES HERE 4857
|
||||
Reference in New Issue
Block a user