sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
807 stars 39 forks source link

Using `"pasword": true` (in minimap) causes rendering issues in other parts of the app #3255

Open jrappen opened 4 years ago

jrappen commented 4 years ago

⚠️ This issue is caused by "password": true. Skip the first section of this page.


Description

Sublime Text has rendering issues when CJK characters are followed by (a standard) space character.

Steps to reproduce

Assume the following three examples:

where Sublime Text renders these as:

image

Expected behavior

Render correctly.

Actual behavior

It seems like in the second example, the space character length is negative. Not sure, though.

Environment

Sublime Text:
  build: 4069
  channel: dev
    portable: false
  platform: osx x64

System:
  hardware: MBP 15" 2018, i9 2.9GHz, 32GB, 1TB, Radeon Pro 560X
  software: macOS Catalina 10.15.4 (19E266)
    open_gl:
      gl_api_version: 4.1 INTEL-14.5.22
      glsl_version: 4.10
      vendor: Intel Inc.
      renderer: Intel(R) UHD Graphics 630
jrappen commented 4 years ago

As @TheSecEng said, this doesn't show up when running in safe-mode.


My Preferences as a reference:

{
    "always_show_minimap_viewport": true,
    "animation_enabled": false,
    "auto_complete_commit_on_tab": true,
    "auto_complete_cycle": true,
    "auto_complete_enable_plugins": true,
    "auto_complete_preserve_order": "none",
    "auto_complete_with_fields": true,
    "auto_hide_menu": true,
    "auto_hide_status_bar": true,
    "auto_hide_tabs": true,
    "bold_folder_labels": true,
    "caret_extra_width": 2,
    "caret_style": "solid",
    "close_windows_when_empty": false,
    "color_scheme": "Breakers.sublime-color-scheme",
    "copy_with_empty_selection": false,
    "default_line_ending": "unix",
    "drag_text": false,
    "draw_minimap_border": true,
    "draw_shadows": false,
    "draw_white_space":
    [
        "leading",
        "trailing",
        "isolated"
    ],
    "ensure_newline_at_eof_on_save": true,
    "font_face": "PragmataPro Mono Liga",
    "font_size": 13,
    "hide_pointer_while_typing": true,
    "highlight_gutter": true,
    "highlight_line": true,
    "highlight_line_number": true,
    "highlight_modified_tabs": true,
    "hot_exit": false,
    "ignored_packages":
    [
        "Vintage"
    ],
    "index_exclude_patterns":
    [
        "*.log",
        "node_modules/"
    ],
    "line_padding_bottom": 3,
    "line_padding_top": 3,
    "mini_auto_complete": true,
    "open_files_in_new_window": false,
    "overlay_scroll_bars": "enabled",
    "remember_full_screen": true,
    "reveal_tabs_with_timeout": true,
    "rulers":
    [
        80,
        100,
        120
    ],
    "scroll_past_end": true,
    "scroll_speed": 5.0,
    "show_encoding": true,
    "show_full_path": true,
    "show_line_endings": true,
    "show_project_first": true,
    "show_rel_path": true,
    "spell_check": false,
    "tab_size": 4,
    "theme": "Adaptive.sublime-theme",
    "translate_tabs_to_spaces": true,
    "tree_animation_enabled": false,
    "trim_automatic_white_space": false,
    "trim_only_modified_white_space": false,
    "trim_trailing_white_space_on_save": true,
    "update_check": false,
    "use_tab_stops": true,
    "word_wrap": true,
}
BenjaminSchaaf commented 4 years ago

@jrappen Have you tried a different font? Could you confirm that the same font in another application produces a different result?

jrappen commented 4 years ago

@BenjaminSchaaf

Testing the following input:

* ```text
  日本Japan / no space
  ```
* ```text
  日本 Japan / normal space
  ```
* ```text
  日本 Japan / japanese space full-width character
  ```

This is Sublime Text 4069 with the default font on macOS:

image

This is TextEdit with PragmataPro Mono Liga:

image

This is VSCodium 1.43.2 with PragmataPro Mono Liga:

image

This is Textastic 4.0.3 with PragmataPro Mono Liga:

image
jrappen commented 4 years ago

@BenjaminSchaaf as a comparison here is Sublime Text 4069 portable on Windows with PragmataPro Mono Liga:

image

jrappen commented 4 years ago

@BenjaminSchaaf I tested again with ST4072.


Default font_options:

image

versus "font_options": ["no_round"]:

image

shows minor differences for the "normal space character" after CJK characters.


Sublime Text:
  build: 4072
  channel: dev
    portable: false
  platform: osx x64

System:
  hardware: MBP 15" 2018, i9 2.9GHz, 32GB, 1TB, Radeon Pro 560X
  software: macOS Catalina 10.15.4 (19E266)
    open_gl:
      gl_api_version: 4.1 INTEL-14.5.22
      glsl_version: 4.10
      vendor: Intel Inc.
      renderer: Intel(R) UHD Graphics 630
wbond commented 3 years ago

Can't reproduce on build 4112 on macOS 10.15.7.

jrappen commented 3 years ago

@wbond Thanks for testing, appreciate it.

As said above, using safe mode (previously) worked and (currently) works fine. I tried to reproduce by using safe mode and adding all packages I had installed while applying all preferences from my setup, which also works fine.

This is not a font issue, as this test confirms.

Not sure what is causing my issue, I'll have to test further to find steps to reproduce.

jrappen commented 2 years ago

@BenjaminSchaaf I believe to have found the culprit:

//  Packages/User/Minimap.sublime-settings

{
    "password": true
}

Can you confirm?


Removing that & deleting sessions fixed it for me in the main view. The status bar still has issues for me, though.

BenjaminSchaaf commented 2 years ago

Not sure why this was closed, I haven't had time to investigate yet.

jrappen commented 2 years ago

this works as intended according to a post by Benjamin on Discord

BenjaminSchaaf commented 2 years ago

Apologies I think I misread your message. Setting "password": true should affect the text rendering in anything with that setting, but not things that don't have that setting applied. I'm guessing that ST assumes the minimap has the same font rendering settings as the main view and thus things are broken here.