unicode-display_width 1.0.5 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +4 -0
- data/README.md +7 -3
- data/data/display_width.marshal.gz +0 -0
- data/lib/unicode/display_width/constants.rb +2 -2
- data/unicode-display_width.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 388b49680063aa1e89739dda870f2a9d8897def7
|
4
|
+
data.tar.gz: 76ad33513f9e7c231883947e300fbc6daf4c3751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ace05864118bdba8c2997528e2d36a77e680ceef71910a555e706964bdd2c4e6a2d1f830fb41c29f70e5d3b26e22b2f581b89313d29e47b99d33556c5aac93
|
7
|
+
data.tar.gz: 391a87d005d7a7722163836e2e7472190cf023cc8748a86408ff7bfce4a3355abab68f99428053015a3b3e0515609b6d4ca11808b556088c08e962f8c083ce4d
|
data/CHANGELOG.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
## Unicode::DisplayWidth [![[version]](https://badge.fury.io/rb/unicode-display_width.svg)](http://badge.fury.io/rb/unicode-display_width) [<img src="https://travis-ci.org/janlelis/unicode-display_width.png" />](https://travis-ci.org/janlelis/unicode-display_width)
|
2
2
|
|
3
|
-
Determines the monospace display width of a string in Ruby. Implementation based on [EastAsianWidth.txt](http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt) and other data, 100% in Ruby.
|
3
|
+
Determines the monospace display width of a string in Ruby. Implementation based on [EastAsianWidth.txt](http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt) and other data, 100% in Ruby. Other than [wcwidth()](https://github.com/janlelis/wcswidth-ruby), which fulfills a similar purpose, it does not rely on the OS vendor to provide an up-to-date method for measuring string width.
|
4
|
+
|
5
|
+
Unicode version: **9.0.0**
|
4
6
|
|
5
7
|
## Introduction to Character Widths
|
6
8
|
|
@@ -8,7 +10,7 @@ Guesing the correct space a character will consume on terminals is not easy. The
|
|
8
10
|
|
9
11
|
### How this Library Handles Widths
|
10
12
|
|
11
|
-
|
13
|
+
Further at the top means higher precedence. Please expect changes to this algorithm with every MINOR version update (the X in 1.X.0)!
|
12
14
|
|
13
15
|
Width | Characters | Comment
|
14
16
|
-------|------------------------------|--------------------------------------------------
|
@@ -75,7 +77,7 @@ You can actively opt-out from the string extension with: `require 'unicode/displ
|
|
75
77
|
|
76
78
|
### Usage From the CLI
|
77
79
|
|
78
|
-
|
80
|
+
Use this one-liner to print out display widths for strings from the command-line:
|
79
81
|
|
80
82
|
```
|
81
83
|
$ gem install unicode-display_width
|
@@ -90,6 +92,8 @@ Replace "一" with the actual string to measure
|
|
90
92
|
- C: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
|
91
93
|
- C for Julia: https://github.com/JuliaLang/utf8proc/issues/2
|
92
94
|
|
95
|
+
See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries.
|
96
|
+
|
93
97
|
## Copyright & Info
|
94
98
|
|
95
99
|
- Copyright (c) 2011, 2015-2016 Jan Lelis, http://janlelis.com, released under the MIT
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Unicode
|
2
2
|
module DisplayWidth
|
3
|
-
VERSION = '1.0
|
4
|
-
UNICODE_VERSION = "
|
3
|
+
VERSION = '1.1.0'
|
4
|
+
UNICODE_VERSION = "9.0.0".freeze
|
5
5
|
DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
|
6
6
|
INDEX_FILENAME = (DATA_DIRECTORY + '/display_width.marshal.gz').freeze
|
7
7
|
end
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.email = "mail@janlelis.de"
|
9
9
|
s.homepage = "http://github.com/janlelis/unicode-display_width"
|
10
10
|
s.summary = "Determines the monospace display width of a string in Ruby."
|
11
|
-
s.description = "Determines the monospace display width of a string using EastAsianWidth.txt, Unicode general category, and other data."
|
11
|
+
s.description = "[Unicode #{Unicode::DisplayWidth::VERSION}] Determines the monospace display width of a string using EastAsianWidth.txt, Unicode general category, and other data."
|
12
12
|
s.files = Dir.glob(%w[{lib,spec}/**/*.rb [A-Z]*.{txt,rdoc} data/display_width.marshal.gz]) + %w{Rakefile unicode-display_width.gemspec}
|
13
13
|
s.extra_rdoc_files = ["README.md", "MIT-LICENSE.txt", "CHANGELOG.txt"]
|
14
14
|
s.license = 'MIT'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-display_width
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -38,8 +38,8 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.4'
|
41
|
-
description: Determines the monospace display width of a string using
|
42
|
-
Unicode general category, and other data.
|
41
|
+
description: "[Unicode 1.1.0] Determines the monospace display width of a string using
|
42
|
+
EastAsianWidth.txt, Unicode general category, and other data."
|
43
43
|
email: mail@janlelis.de
|
44
44
|
executables: []
|
45
45
|
extensions: []
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Determines the monospace display width of a string in Ruby.
|