39 lines
1008 B
Bash
Executable File
39 lines
1008 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/../builtinFonts"
|
|
|
|
echo "// The contents of this file are generated by ./lib/EpdFont/scripts/build-font-ids.sh"
|
|
echo "#pragma once"
|
|
echo ""
|
|
|
|
echo "#define READER_FONT_ID ($(
|
|
ruby -rdigest -e 'puts [
|
|
"./aleo_14_regular.h",
|
|
"./aleo_14_bold.h",
|
|
"./aleo_14_bolditalic.h",
|
|
"./aleo_14_italic.h",
|
|
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
|
))"
|
|
|
|
echo "#define UI_10_FONT_ID ($(
|
|
ruby -rdigest -e 'puts [
|
|
"./ubuntu_10_regular.h",
|
|
"./ubuntu_10_bold.h",
|
|
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
|
))"
|
|
|
|
echo "#define UI_12_FONT_ID ($(
|
|
ruby -rdigest -e 'puts [
|
|
"./ubuntu_12_regular.h",
|
|
"./ubuntu_12_bold.h",
|
|
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
|
))"
|
|
|
|
echo "#define SMALL_FONT_ID ($(
|
|
ruby -rdigest -e 'puts [
|
|
"./pixelarial14.h",
|
|
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
|
))"
|