Created
April 1, 2014 05:28
-
-
Save tnayuki/9908213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require "suddenly_death" | |
require "ttfunk" | |
file = TTFunk::File.open(ARGV[0]) | |
ARGV[1].split(//).each do |c| | |
l = 0 | |
file.cmap.unicode.each do |u| | |
begin | |
l = u[c.unpack("U*").first] | |
break unless l == 0 | |
rescue NotImplementedError | |
end | |
end | |
next unless l == 0 | |
suddenly_death "表示できません" | |
exit 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brushed up version:
https://github.com/tnayuki/check_ngui_localization