Merge remote-tracking branch 'upstream/master'
commit
4d3b32cf92
30
Makefile
30
Makefile
|
@ -18,12 +18,12 @@ font: $(EMOJI).ttf
|
|||
|
||||
CFLAGS = -std=c99 -Wall -Wextra `pkg-config --cflags --libs cairo`
|
||||
LDFLAGS = `pkg-config --libs cairo`
|
||||
PNGQUANTDIR := $(abspath `pwd`/../../third_party/pngquant)
|
||||
PNGQUANTDIR := $(abspath `pwd`/../third_party/pngquant)
|
||||
PNGQUANT := $(PNGQUANTDIR)/pngquant
|
||||
PNGQUANTFLAGS = --speed 1 --skip-if-larger --ext '.png' --force
|
||||
|
||||
$(PNGQUANT):
|
||||
cd $(PNGQUANTDIR) && make
|
||||
"$(PNGQUANT)":
|
||||
cd "$(PNGQUANTDIR)" && make
|
||||
|
||||
waveflag: waveflag.c
|
||||
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS)
|
||||
|
@ -55,30 +55,34 @@ FLAGS = AD AE AF AG AI AL AM AO AR AS AT AU AW AX AZ \
|
|||
YE \
|
||||
ZA ZM ZW
|
||||
|
||||
FLAGS_SRC_DIR = ../third_party/region-flags/png
|
||||
FLAGS_SRC_DIR = third_party/region-flags/png
|
||||
FLAGS_DIR = ./flags
|
||||
|
||||
glyph_name = $(shell ./flag_glyph_name.py $(flag))
|
||||
|
||||
GLYPH_NAMES := $(shell ./flag_glyph_name.py $(FLAGS))
|
||||
WAVED_FLAGS := $(foreach flag,$(FLAGS),$(FLAGS_DIR)/$(flag).png)
|
||||
PNG128_FLAGS := $(foreach flag,$(FLAGS),$(addprefix ./png/128/emoji_$(glyph_name),.png))
|
||||
PNG128_FLAGS := $(foreach glyph_name,$(GLYPH_NAMES),$(addprefix ./png/128/emoji_$(glyph_name),.png))
|
||||
|
||||
$(FLAGS_DIR)/%.png: $(FLAGS_SRC_DIR)/%.png ./waveflag $(PNGQUANT)
|
||||
$(FLAGS_DIR)/%.png: $(FLAGS_SRC_DIR)/%.png ./waveflag "$(PNGQUANT)"
|
||||
mkdir -p $(FLAGS_DIR)
|
||||
./waveflag "$<" "$@"
|
||||
optipng -quiet -o7 "$@"
|
||||
$(PNGQUANT) $(PNGQUANTFLAGS) "$@"
|
||||
"$(PNGQUANT)" $(PNGQUANTFLAGS) "$@"
|
||||
|
||||
flag-symlinks: $(WAVED_FLAGS)
|
||||
$(foreach flag,$(FLAGS),ln -fs ../../flags/$(flag).png ./png/128/emoji_$(glyph_name).png;)
|
||||
$(subst ^, , \
|
||||
$(join \
|
||||
$(FLAGS:%=ln^-fs^../../flags/%.png^), \
|
||||
$(GLYPH_NAMES:%=./png/128/emoji_%.png;) \
|
||||
) \
|
||||
)
|
||||
|
||||
$(PNG128_FLAGS): flag-symlinks
|
||||
|
||||
EMOJI_PNG128 = ./png/128/emoji_u
|
||||
|
||||
EMOJI_BUILDER = ../third_party/color_emoji/emoji_builder.py
|
||||
ADD_GLYPHS = ../third_party/color_emoji/add_glyphs.py
|
||||
PUA_ADDER = ../nototools/map_pua_emoji.py
|
||||
EMOJI_BUILDER = third_party/color_emoji/emoji_builder.py
|
||||
ADD_GLYPHS = third_party/color_emoji/add_glyphs.py
|
||||
PUA_ADDER = map_pua_emoji.py
|
||||
|
||||
%.ttx: %.ttx.tmpl $(ADD_GLYPHS) $(UNI) flag-symlinks
|
||||
python $(ADD_GLYPHS) "$<" "$@" "$(EMOJI_PNG128)"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2014 Google Inc. All rights reserved.
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015 Google, Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -33,8 +33,8 @@ from fontTools.ttLib.tables import otTables
|
|||
from fontTools.ttLib.tables import _g_l_y_f
|
||||
from fontTools.ttLib.tables import S_V_G_ as SVG
|
||||
from fontTools import ttx
|
||||
from nototools import add_emoji_gsub
|
||||
|
||||
import add_emoji_gsub
|
||||
import svg_builder
|
||||
import svg_cleaner
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015 Google, Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2014 Google Inc. All rights reserved.
|
||||
#
|
||||
|
@ -20,7 +20,7 @@ __author__ = 'roozbeh@google.com (Roozbeh Pournader)'
|
|||
|
||||
import sys
|
||||
|
||||
from nototools import add_emoji_gsub
|
||||
import add_emoji_gsub
|
||||
|
||||
def two_letter_code_to_glyph_name(iso_code):
|
||||
return 'u%04x_%04x' % (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015 Google, Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2014 Google Inc. All rights reserved.
|
||||
#
|
||||
|
@ -22,9 +22,10 @@ import sys
|
|||
|
||||
from fontTools import ttLib
|
||||
|
||||
from nototools import add_emoji_gsub
|
||||
from nototools import font_data
|
||||
|
||||
import add_emoji_gsub
|
||||
|
||||
|
||||
def get_glyph_name_from_gsub(char_seq, font):
|
||||
"""Find the glyph name for ligature of a given character sequence from GSUB.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015 Google, Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
import glob, sys
|
||||
from fontTools import ttx
|
||||
from fontTools.ttLib.tables import otTables
|
||||
from png import PNG
|
||||
|
||||
sys.path.append('../../nototools')
|
||||
from nototools import add_emoji_gsub
|
||||
sys.path.append('../../')
|
||||
import add_emoji_gsub
|
||||
|
||||
|
||||
def glyph_name(string):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2013 Google, Inc. All Rights Reserved.
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2013 Google, Inc. All Rights Reserved.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue