mirror of
https://github.com/googlefonts/noto-emoji.git
synced 2025-06-08 15:57:59 +00:00
Copy original file if pngquant can't compress it.
--skip_if_larger does nothing and returns an error if pngquant would generate a larger file than the original. Formerly we would not copy the file in this case so later operations expecting the file would fail. No image triggered this, though, so the issue went unnoticed. We want the smaller of the two files. It's unclear if later compression using optipng would still do better with the larger quantized file vs the original unquantized file, but we need to have a file.
This commit is contained in:
parent
11868c62b7
commit
494fb41a68
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -168,10 +168,10 @@ flag-symlinks: $(RESIZED_FLAG_FILES) | $(RENAMED_FLAGS_DIR)
|
||||||
$(RENAMED_FLAG_FILES): | flag-symlinks
|
$(RENAMED_FLAG_FILES): | flag-symlinks
|
||||||
|
|
||||||
$(QUANTIZED_DIR)/%.png: $(RENAMED_FLAGS_DIR)/%.png $(PNGQUANT) | $(QUANTIZED_DIR)
|
$(QUANTIZED_DIR)/%.png: $(RENAMED_FLAGS_DIR)/%.png $(PNGQUANT) | $(QUANTIZED_DIR)
|
||||||
$(PNGQUANT) $(PNGQUANTFLAGS) -o "$@" "$<"
|
@($(PNGQUANT) $(PNGQUANTFLAGS) -o "$@" "$<"; case "$$?" in "98") cp $< $@;; *) exit "$$?";; esac)
|
||||||
|
|
||||||
$(QUANTIZED_DIR)/%.png: $(EMOJI_DIR)/%.png $(PNGQUANT) | $(QUANTIZED_DIR)
|
$(QUANTIZED_DIR)/%.png: $(EMOJI_DIR)/%.png $(PNGQUANT) | $(QUANTIZED_DIR)
|
||||||
$(PNGQUANT) $(PNGQUANTFLAGS) -o "$@" "$<"
|
@($(PNGQUANT) $(PNGQUANTFLAGS) -o "$@" "$<"; case "$$?" in "98") cp $< $@;; *) exit "$$?";; esac)
|
||||||
|
|
||||||
$(COMPRESSED_DIR)/%.png: $(QUANTIZED_DIR)/%.png | check_compress_tool $(COMPRESSED_DIR)
|
$(COMPRESSED_DIR)/%.png: $(QUANTIZED_DIR)/%.png | check_compress_tool $(COMPRESSED_DIR)
|
||||||
ifdef MISSING_ZOPFLI
|
ifdef MISSING_ZOPFLI
|
||||||
|
|
Loading…
Add table
Reference in a new issue