See bug 166011 for more details about the style:script-type attribute. Once the style:script-type attribute is implemented, it can be used to hint whether particular characters (ODF 1.3 20.358 "weak [UNICODE] characters") should be interpreted as a user-specified script type, rather than the script type determined by our hard-coded algorithm. The approach used by certain other word processors is to set their equivalent attribute when users explicitly mark text as having a particular language. This also seems natural to me, but we should evaluate our options before implementation.
Can you outline the pros and cons of "apply a script"? Or why is this an extra ticket?
(In reply to Heiko Tietze from comment #1) > Can you outline the pros and cons of "apply a script"? Or why is this an > extra ticket? Currently, users cannot influence how LibreOffice determines the script type for certain ambiguous characters (e.g. punctuation). This bug proposes overloading Tools->Language->For Selection to also set a hint that ambiguous characters in the selection should be treated as the script type of the indicated language. Pros: - We want to expose this control somehow, and doing it this way avoids adding more to the user interface. - Doing it this way is the precedent set by other suites. Cons: - This changes the behavior of an existing feature. - Document appearance may differ depending on whether languages were set through the menu/statusbar or via styles
Some related discussion around the topic: Bug 103036 - rework document Language Setting into a dedicated dialog Bug 104318 - CTL, CJK & Western Language GUI controls confusing, need rework for a "Global" user community Bug 146928 - Rework font selection dialog for multiple language groups - don't hide CJK/CTL tab The latter has been implemented and we could add some kind of radio or tool button to force the text (DF, CS, and PS) to this style family. As an ignorant writer of the Western sscript I never know how this works. Assuming some mixed text like "Lorem ipsum أو شكل توضع" how do I know whether the caret is on the left tab in the character tab or the right? Would be solved with the mutually exclusive control. Alternatively we move the active tab to the left side stretching the dual-list paradigm a bit. But this could be done easily with standard controls. Is there a chance to get rid of the trinity, somehow, and speak only about languages rather than scripts? IOW, changing the "Language" dropdown from English to Arabic affects the script automatically - and needs to pick a proper font... and vice versa meaning to switch from Liberation Sans to Noto Sans CJK SC turns the language into Chinese and the script into CJK. Sounds wrong to me.
Whoever visits this bug - please read the comments on bug 166011 first, especially those of you who don't know what style:script-type is. ----------------- That being said - I don't quite understand this bug report. > when users manually set a language for a run This is not supported in LibreOffice. Such a capability is not required for resolving 166011 AFAICT. Perhaps you mean for this bug to depend on bug 148257 as well? Then, it would be helpful to also set the already-ODF-standardized style:script-type. > [style:script-type] can be used to hint whether ... characters... should > beinterpreted as a user-specified script type You mean, "dictate", not "hint", right?
(In reply to Heiko Tietze from comment #3) Even given my question to Jonathan, I wanted to remind you.... > Is there a chance to get rid of the trinity, somehow, and speak only about > languages rather than scripts? That is bug 162331 (and to a lesser extent bug 151215). But also remember, that it is fundamentally wrong to set the language of text using the formatting/font selection dialogs. This is a mis-design both in the ODF spec and in LO, as discussed in bug 151215.
(In reply to Eyal Rozenberg from comment #5) > But also remember, that it is fundamentally wrong to set the language of > text using the formatting/font selection dialogs. This is a mis-design both > in the ODF spec ..., as discussed in bug 151215. ODF has nothing to do here. While I agree with you (as you know) about the idea that language is not formatting, but a part of content - the way how it's stored internally is orthogonal; and furthermore, the specific wording that you chose: "it is fundamentally wrong to set the language of text using the formatting/font selection dialogs" - which I agree - makes it completely a UI problem, i.e., again, unrelated to file format spec (which, as you know, doesn't prescribe any dialogs at all).
Created attachment 200236 [details] Mockup (In reply to Heiko Tietze from comment #3) > Alternatively we move the active tab to the left side stretching the > dual-list paradigm a bit. But this could be done easily with standard > controls. Illustration for this idea. Switched the sides and the active tab is right-hand now.
(In reply to Eyal Rozenberg from comment #4) > You mean, "dictate", not "hint", right? No, I don't; the documented intention for style:script-type is to help resolve ambiguity in the existing heuristic for characters which do not conclusively belong to a particular script category. It should not override the heuristic entirely, and is not a substitute for features that do. However, it is useful for interop as it roughly corresponds to the OOXML w:hint attribute.