Skip to content

Instantly share code, notes, and snippets.

@tnayuki
Created April 1, 2014 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnayuki/9908213 to your computer and use it in GitHub Desktop.
Save tnayuki/9908213 to your computer and use it in GitHub Desktop.
# 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
@tnayuki
Copy link
Author

tnayuki commented Apr 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment