diff --git a/font/glyf/OpenMoji-Black.ttf b/font/glyf/OpenMoji-Black.ttf index a97e6935d..bb0b6106e 100644 Binary files a/font/glyf/OpenMoji-Black.ttf and b/font/glyf/OpenMoji-Black.ttf differ diff --git a/font/glyf_colr_0/OpenMoji-Color.ttf b/font/glyf_colr_0/OpenMoji-Color.ttf index e9b95a57d..9989108fd 100644 Binary files a/font/glyf_colr_0/OpenMoji-Color.ttf and b/font/glyf_colr_0/OpenMoji-Color.ttf differ diff --git a/font/picosvgz/OpenMoji-Color.ttf b/font/picosvgz/OpenMoji-Color.ttf index ff6010d5a..1e357fcb0 100644 Binary files a/font/picosvgz/OpenMoji-Color.ttf and b/font/picosvgz/OpenMoji-Color.ttf differ diff --git a/font/untouchedsvgz/OpenMoji-Color.ttf b/font/untouchedsvgz/OpenMoji-Color.ttf index 03ed7a3b1..8a32f527b 100644 Binary files a/font/untouchedsvgz/OpenMoji-Color.ttf and b/font/untouchedsvgz/OpenMoji-Color.ttf differ diff --git a/helpers/generate-ttf.sh b/helpers/generate-ttf.sh index a0d4ddf08..ad666a9ee 100644 --- a/helpers/generate-ttf.sh +++ b/helpers/generate-ttf.sh @@ -12,23 +12,31 @@ name=OpenMoji-${saturation^} mkdir -p "$build_dir" rsync -ru "/mnt/$saturation/svg/" "$build_dir/scale/" -grep -FL 'transform="scale(1.3)"' "$build_dir"/scale/*.svg \ - | xargs --no-run-if-empty \ - xmlstarlet edit \ - --inplace \ - --omit-decl \ - -N svg=http://www.w3.org/2000/svg \ - --delete '/svg:svg/@transform' \ - --insert '/svg:svg' \ - --type attr \ - --name transform \ - --value 'translate(36 0) scale(1.3) translate(-36 0)' - -nanoemoji \ - --color_format="$format" \ - --build_dir="$build_dir" \ - --output_file="$build_dir/$name.$format.ttf" \ - "$build_dir"/scale/*.svg +grep -FL '' \ + "$build_dir"/scale/*.svg \ + | xargs --no-run-if-empty \ + sed -E -i \ + -e 's/()/\1\n/;' \ + -e 's/(<\/svg>)/<\/g>\n\1/;' + +cat >"$build_dir/$name.toml" <<-EOF + output_file = "$build_dir/$name.$format.ttf" + color_format = "$format" + + [axis.wght] + name = "Weight" + default = 400 + + [master.regular] + style_name = "Regular" + srcs = ["$build_dir/scale/*.svg"] + + [master.regular.position] + wght = 400 +EOF + +nanoemoji --build_dir="$build_dir" \ + --config="$build_dir/$name.toml" sed "s/Color/${saturation^}/;" \ /mnt/font/OpenMoji-Color.ttx \