Summary: | Text editor's Font-Style droplist and Bold button are broken | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Tyson Tan <tysontanx> |
Component: | Layers/Vector | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | danielpetrov, dimula73, eliasvaha, halla, mail, rebecca, tristanbaymusic |
Priority: | NOR | Keywords: | investigated, triaged |
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Appimage | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/af510b47afc7368a2d2a34cc8d2730070f09f27e | Version Fixed In: | |
Sentry Crash Report: |
Description
Tyson Tan
2018-03-26 01:45:09 UTC
I can reproduce this behavior with Krita 4.2.0-alpha (commit a794d32). Operating System: KDE neon Developer Edition KDE-Plasma-Version: 5.13.90 Qt-Version: 5.11.1 KDE-Frameworks-Version: 5.51.0 Looks like we should wait until we start implementing our own renderer before we can fix this bug :( @Dmitry Thanks for letting me know! :) *** Bug 415176 has been marked as a duplicate of this bug. *** First of all, the "Bold" button in Text Editor is now broken in the 4.3.0 branch. Second, we had workaround to use SOME of the native font variants in Krita's Text Edior, but it only worked in 4.2.x. It's also broken in the 4.3.0 branch. ======================= For example, the font "Noto Sans CJK" from Manjaro Linux has 7 .ttc files, each for one STYLE. /usr/share/fonts/noto-cjk/NotoSansCJK-Black.ttc /usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc /usr/share/fonts/noto-cjk/NotoSansCJK-DemiLight.ttc /usr/share/fonts/noto-cjk/NotoSansCJK-Light.ttc /usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc /usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc /usr/share/fonts/noto-cjk/NotoSansCJK-Thin.ttc But each of those .ttc files has 4 actual fonts: Noto Sans CJK SC (Simplified Chinese) Noto Sans CJK TC (Traditional Chinese) Noto Sans CJK KR (Korean) Noto Sans CJK JP (Japanese) So, with the whole font package correctly installed, I have the 4 fonts in the FONT droplist: Noto Sans CJK SC Noto Sans CJK TC Noto Sans CJK KR Noto Sans CJK JP And 7 STYLES in the STYLE droplist: Black Bold DemiLight Light Medium Regular Thin (I know, it's quite complicated and confusing, what kind of black magic is going on here and why they do this...) ======================= As reported before, the STYLE droplist doesn't work. But I can still use some of the styles by typing the style name after the font name in Font droplist: "Noto Sans CJK SC Black" But for some reason, the Bold style doesn't work even when I used: "Noto Sans CJK SC Bold" ======================= The workaround above worked in 4.2.x including the latest 4.2.9 beta. But somewhere between Jan and Feb 2020, it was broken in the 4.3.0 branch. But if a .kra file has the workaround done in 4.2.x, it'll still work until you changed the fonts. Makes me feel it's really a UI problem... With both the Bold button and all Styles unavailable, it hinders our text works greatly. Really not looking forward to switch between Krita and GIMP again :P Today I found out what broke the droplist workaround, as well as discovering a new workaround to make use of font styles. ### What broke the droplist workaround: For some reason, now in 4.3.0prealpha, whenever I tried to input some letters inside the Text Editor's font name droplist, the moment I put the second letter, all new letters (the first and second letter I just input) get HIGHLIGHTED. So now if I input a third letter, the previous two letters are deleted. ### Workaround 1: Press Left Arrow key to cancel the highlight state and move the input cursor to the end. Do this once every two letters are input. To input "Bold": 1) Input "B" and "o" 2) Press Left arrow 3) Input "l" 4) Press Left arrow 5) Input "d" 6) Press Left arrow If the added letters match a style name, it will be activated. ### Workaround 2: Tool options panel of the Text tool has a font droplist as well, and that droplist for some reason lists EVERY font style. In this way we can determine a font with its native style before we create the actual text. ### The missing Bold style: Curiously though, this droplist in Tool options doesn't list any font's Bold style! I wonder whether the Bold ones were linked to/confused with the Bold button in Text Editor's toolbar, which in turn broke both ways as a result? *** Bug 419081 has been marked as a duplicate of this bug. *** Bold is already broken in 4.2.8, see 419081. (I can confirm that as well). May I ask if we can, for the moment, just disable the "auto-completion" and "automatically selecting a font as you type" thing for the input box? It's very broken at the moment, inputting a font name is basically impossible and it really makes life so difficult around the text tool. Accessing font-style is also a nightmare because of it. A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1065 Git commit 371894feca52dec75ac2c33aebccbfe7ba75b6a7 by Halla Rempt, on behalf of Black Cat. Committed on 24/09/2021 at 08:33. Pushed by rempt into branch 'master'. Fix applying font styles to text in vector text tool * Apply font style as combination of font weight and italization * Show correct font style and font properties (bold, italic, etc) on cursor change or font style update * Fix text changing format and loosing whitespaces while switching from Rich Text to Svg Source tab M +6 -9 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp M +12 -11 libs/widgetutils/kis_font_family_combo_box.cpp M +18 -4 plugins/tools/svgtexttool/SvgTextEditor.cpp https://invent.kde.org/graphics/krita/commit/371894feca52dec75ac2c33aebccbfe7ba75b6a7 Git commit af510b47afc7368a2d2a34cc8d2730070f09f27e by Halla Rempt, on behalf of Black Cat. Committed on 24/09/2021 at 08:43. Pushed by rempt into branch 'krita/5.0'. Fix applying font styles to text in vector text tool * Apply font style as combination of font weight and italization * Show correct font style and font properties (bold, italic, etc) on cursor change or font style update * Fix text changing format and loosing whitespaces while switching from Rich Text to Svg Source tab (cherry picked from commit 371894feca52dec75ac2c33aebccbfe7ba75b6a7) M +6 -9 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp M +12 -11 libs/widgetutils/kis_font_family_combo_box.cpp M +18 -4 plugins/tools/svgtexttool/SvgTextEditor.cpp https://invent.kde.org/graphics/krita/commit/af510b47afc7368a2d2a34cc8d2730070f09f27e Thank you Artem and Halla! :D One thing though: after this fix, the Style droplist can CHANGE the style, but it does not SHOW the current style -- it is stuck as "regular". Unlike the Size droplist which shows the current size of the cursor position. Do I open a new bug, or do I reopen this bug? |