Mariusz Glebocki 5f32cb3c44 Add a tool for generating character width tables
Summary:
The uni2characterwidth tool, converts Unicode Character Database files
into character width lookup tables. It uses a template file to place
the tables in a source code file together with a function for finding
the width for specified character. It also allows to generate few forms
of lists with width data for debug and test purposes, or for future use
as a replacement of Unicode files.

Set `KONSOLE_BUILD_UNI2CHARACTERWIDTH` cmake flag to build the tool.
Use `--help` argument for more detailed usage.

There is a possibility to generate separate "width" for Ambiguous
characters. It can be used to add ability to configure the characters
width in Konsole settings.

The `example.template` file contains all possible named tags, and some
additional tags to show how to use them.

CCBUG: 396435

Depends on D15756

Test Plan:
Download files listed below from `11.0.0` and `emoji/11.0` directories
on `https://unicode.org/Public/`. You can also directly use URLs to the
files.

* UnicodeData.txt
* EastAsianWidth.txt
* emoji-data.txt

Generate any available list except compact-ranges (e.g. `details`):

```
uni2characterwidth \
    -U UnicodeData.txt  -A EastAsianWidth.txt  -E emoji-data.txt \
    -g details  result.txt
```

The list should contain ranges for all possible widths
(-2, -1, 0, 1, 2). You can choose some characters with a width you know
and check how they were classified. -2 is a special non-standard width
for ambiguous characters, which can be overriden by adding `-a 1` or
`-a 2` parameter. With this flag, all ranges from -2 group should
disappear and become assigned to selected width (1 or 2).

Generate output using a template:

```
uni2characterwidth \
    -U UnicodeData.txt  -A EastAsianWidth.txt  -E emoji-data.txt \
    -g code,./template.example  result.txt
```

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: hindenburg, konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D15757
2018-09-30 12:22:30 -04:00
2018-09-17 10:20:10 +02:00
2017-01-28 23:10:53 -05:00
2018-09-18 09:36:37 -04:00
2018-08-29 13:27:24 +02:00
2006-07-11 18:17:49 +00:00
2011-06-27 00:45:30 +02:00
2011-06-27 00:45:30 +02:00
2018-08-29 13:27:24 +02:00
2016-06-23 00:33:34 -04:00

Konsole - KDE's Terminal Emulator
==================================

Konsole is a terminal program for KDE.

As well as being a standalone program, it is also used by other KDE programs
such as the Kate editor and KDevelop development environment to provide easy
access to a terminal window. Konsole's features and usage are explained and
illustrated in the Konsole handbook, which can be accessed by browsing to
"help:/konsole" in Konqueror.


Directory Structure
===================

 /doc/user      README files, primarily for advanced users, explaining various
                aspects of Konsole such as fonts and keyboard handling
                in-depth.

 /doc/developer README files and resources for developers of Konsole. This
                includes information on the design of Konsole's internals and
                the VT100 terminal on which Konsole's emulation is based.

 /src           Source code for Konsole, including the embedded versions of
                Konsole which are used in Kate, KDevelop and others.

 /desktop       .desktop files for Konsole, used to launch the program
                from KDE's various menus and other application launchers.

 /data          Data files for use with Konsole as well as the keyboard setup
                and color schemes provided with Konsole.


Contact
=======

Up-to-date information about the latest releases can be found on Konsole's
website at http://konsole.kde.org. Discussions about Konsole's development are
held on the konsole-devel mailing list, which can be accessed at
https://mail.kde.org/mailman/listinfo/konsole-devel.


Share and enjoy it,
  Lars
Description
No description provided
Readme 277 MiB
Languages
C++ 97%
C 1.3%
CMake 1.2%
Shell 0.4%
Python 0.1%