Files
textmate/Frameworks/text/tests
Allan Odgaard 45f847d01e Add text::is_east_asian_width
This checks if the character needs to be counted as double-width (for soft wrap and similar).

I used the following script to generate the tables, it should be improved to collapse the ranges:

    #!/usr/bin/ruby

    fixed, start, stop = [ ], [ ], [ ]
    open('|curl -Ls http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt') do |io|
      io.grep(/^([0-9A-F]+)(?:..([0-9A-F]+))?;[A-Za-z]*W/) do
        if $2
          start << "0x#$1"
          stop << "0x#$2"
        else
          fixed << "0x#$1"
        end
      end
    end
    puts "static uint32_t Fixed[]      = { #{fixed.join(', ')} };\n"
    puts "static uint32_t RangeBegin[] = { #{start.join(', ')} };\n"
    puts "static uint32_t RangeEnd[]   = { #{stop.join(', ')} };\n"
2012-08-18 21:29:05 +02:00
..
2012-08-09 16:25:56 +02:00
2012-08-18 21:29:05 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00
2012-08-09 16:25:56 +02:00