1. 07 Sep, 2019 1 commit
  2. 23 Aug, 2019 1 commit
  3. 21 May, 2019 1 commit
  4. 22 Feb, 2019 1 commit
    • Mariusz Glebocki's avatar
      Improve built-in line/block characters drawing · 13132fc7
      Mariusz Glebocki authored
      Summary:
      * Fix bold lines (BUG 402415).
      * Make drawing pixel-perfect.
      * Make line width proportional to font size.
      * Move relevant code to separate file and namespace.
      * Remove code for checking supported line characters from Character
        class. Information about what is supported is now in one place
        together width drawing code.
      * Remove fontembedder/LineFont files (no longer used).
      * Add test script for displaying supported characters table.
      * Add triple and quadruple dashes (U+2504...U+250B).
      * Change shade block characters (U+2591...U+2593) look. When
        antialiasing is turned on, shades are drawn as transculent solid
        rectangles with 25%, 50% and 75% alpha. This matches the characters
        name/description and their usage. Without antialiasing, previous
        method with patterns is used.
      
      **Screenshots**
      
      Font size: 10pt; character width: 8px
      {F6602823}
      
      Font size: 11pt; character width: 9px
      {F6602824}
      
      Font size: 12pt; character width: 10px
      {F6602825}
      
      Font size: 13-14pt; character width: 11px; w/o antialiasing
      {F6602826}
      
      Font size: 13-14pt; character width: 11px
      {F6602827}
      
      Font size: 15pt; character width: 12px
      {F6602828}
      
      Font size: 6-7pt; character width: 5px
      {F6602829}
      
      Font size: 8-9pt; character width: 7px; w/o antialiasing
      {F6602830}
      
      Font size: 8-9pt; character width: 7px
      {F6602831}
      
      Alignment test (8pt)
      {F6602832}
      
      Note: Copyrights in LineBlockCharactersDrawer.cpp are based on
      `git blame -w src/TerminalDisplay.cpp` executed before moving the code
      to a separate file. Years from first/last commit. Authors sorted by
      year. Whitespace-only changes were ignored. Maksim's code was commited
      by Waldo Bastian who mentioned him as the author in commit message
      (see 5062b40d).
      
      BUG: 402415
      
      Test Plan:
      == Common steps for all tests ==
      
      * Open //Edit Current Profile → Appearance//.
      * Turn on //Draw intense colors in bold font//.
      * Turn off //Use line characters contained in font//.
      * (Optional) select a font which is able to display bold characters in
        Konsole (e.g. DejaVu Sans Mono).
      
      == Check characters validity ==
      
      * Run `./tests/line_block_characters_table.py`.
      * Open //Edit Current Profile → Appearance//.
      * By switching //Use line characters contained in font// on and off,
        compare built-in characters drawing with characters from a font.
        General shape and line directions must be the same. Small offsets,
        line width differences (as long as proportions between lines in
        a character are kept), and quality differences are allowed.
      
      == Review overall quality ==
      
      * Run `./tests/line_block_characters_table.py`.
      * Review glyphs quality in different font sizes.
      * Open //Edit Current Profile → Appearance//.
      * Toggle //Smooth fonts//, review quality again.
      
      == Check alignment ==
      
      * Display `tests/UTF-8-demo.txt`
      * At the bottom of the file you can find a few alignment images. Check
        if all lines align properly. If you're unsure how it should look,
        compare it with font characters by turning on //Use line characters
        contained in font// option.
      
      Reviewers: #konsole, #vdg, fvogt, hindenburg
      
      Reviewed By: #konsole, hindenburg
      
      Subscribers: hindenburg, sandsmark, fvogt, konsole-devel
      
      Tags: #konsole
      
      Differential Revision: https://phabricator.kde.org/D18735
      13132fc7
  5. 23 Dec, 2018 1 commit
  6. 28 Oct, 2018 1 commit
  7. 09 Oct, 2018 1 commit
  8. 06 Oct, 2018 1 commit
  9. 03 Oct, 2018 1 commit
    • Mariusz Glebocki's avatar
      Use new character width code based on Unicode 11 · e74cf6c3
      Mariusz Glebocki authored
      Summary:
      Adds a code for getting character width togeter with LUTs generated
      using uni2characterwidth from Unicode 11 lists.
      
      Skin tone, flags, gender, and other emoji with and modifer are not
      joined (you will see e.g. a skin tone square + generic yellow emoji).
      I think joining them would cause problems in most editors, command line
      prompts, and other programs which use character width data, as the
      characters would behave as combining or emoji depending on context (like
      ligatures).
      
      Examples:
      * light thumb up: 👍🏻
      * dark thumb up:  👍🏿
      * Polish flag:    🇵🇱
      
      This behavior is allowed:
      * https://unicode.org/reports/tr51/#Emoji_Modifiers_Display
      * https://unicode.org/reports/tr51/#Emoji_ZWJ_Sequences
      
      It is possible to add support for sequences, but those would work
      only for a string width functions.
      
      Some characters which can be presented as emoji are narrow (e.g. ️, ©️).
      Those characters are listed without "presentation" mode, which means
      they should be rendered as text by default (real presentation depends on
      renderer and/or font). Noto Sans Color Emoji renders them as wide,
      DejaVu Sans as narrow. Vim, bash and zsh treat them as narrow, so I made
      them narrow.
      
      https://unicode.org/reports/tr51/#Presentation_Style
      
      BUG: 396435
      BUG: 378124
      BUG: 392171
      BUG: 339439
      
      FIXED-IN: 18.12
      
      Depends on D15757
      
      Test Plan:
      * Look at emoji_test.txt - emojis should look "normal" (two characters
      width).
      * Look at GLASS.txt - characters width should look correct.
      * CharacterWidthTest should pass.
      * perl -XCSDL -e 'print map{chr($_), " "} 1..0xffff'
      
      Reviewers: #konsole, #vdg, hindenburg
      
      Reviewed By: #konsole, hindenburg
      
      Subscribers: hindenburg, broulik, ngraham, konsole-devel
      
      Tags: #konsole
      
      Differential Revision: https://phabricator.kde.org/D15758
      e74cf6c3
  10. 30 Sep, 2018 1 commit
    • Mariusz Glebocki's avatar
      Add a tool for generating character width tables · 5f32cb3c
      Mariusz Glebocki authored
      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
      5f32cb3c
  11. 28 Jul, 2018 1 commit
  12. 17 Apr, 2018 1 commit
  13. 03 Jan, 2018 1 commit
  14. 02 Jul, 2017 1 commit
  15. 28 Apr, 2017 1 commit
  16. 16 Apr, 2017 1 commit
  17. 01 Apr, 2017 1 commit
  18. 28 May, 2016 1 commit