100 Commits
Author SHA1 Message Date
خالد حسني 742dbb088b Revert^2 "tdf#163213: do not show OpenType features if the font has "morx" table"
This reverts commit 378dd9025e.

Reason for revert: The user report that resulted in the first revert was bogus and based on user misunderstanding

Change-Id: I511386fb66bb1026da46cef9939c7108f9516318
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183423
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2025-03-28 02:25:46 +01:00
Khaled Hosny 44f2bc1277 tdf#160884: Apply scale to position of embedded images in Type 3 fonts
Regression from:

commit bc3f6c3a47
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Tue Aug 22 10:47:33 2023 +0300

    tdf#155610: Workaround Acrobat bug with Type 3 fonts and unusual UPEM

Change-Id: I5e352292268d19fb8348a038d251f2d395a0be46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167830
Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org>
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Tested-by: Jenkins
2024-05-19 09:30:06 +02:00
Khaled Hosny 1c7886d5d8 tdf#159251: Revert "vcl: Allow pushing/popping OutputDevice’s RTLEnabled
...state"

This reverts commit 611694b707.

Change-Id: I044e6a1fb08f482c6b494e87f9c23e2303b97fd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163951
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2024-02-26 19:27:40 +01:00
Khaled Hosny 17d1479525 tdf#159251: Don’t use vcl::PushFlags::RTLENABLED
I’m going to remove it.

Change-Id: I23af5c67633069b7bb6b15c88bdea757815816ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163950
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2024-02-26 18:38:34 +01:00
Khaled Hosny a7e2f44d64 tdf#124591: upgrade NotoKufiArabic to v2.109
https://github.com/notofonts/arabic/releases/tag/NotoKufiArabic-v2.109

Change-Id: Ifc6d9b6ec3e41dac27406b7582734c2cfd173a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163878
Tested-by: خالد حسني <khaled@libreoffice.org>
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2024-02-25 13:21:02 +01:00
Khaled Hosny 6cad38dece tdf#159251: Blind fix
Hopefully fixes regression introduced in:

commit 611694b707
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Aug 17 17:39:29 2023 +0300

    vcl: Allow pushing/popping OutputDevice’s RTLEnabled state

Change-Id: I9236bd6951d83a512390934127031204d94d14bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163877
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2024-02-24 13:40:42 +01:00
Khaled Hosny fdbf404073 vcl: Fix comment
The comment is saying the opposite of what the code is doing.

Change-Id: I16cc44b56f90f622cedb87b9107d17b940665896
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160144
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-11-30 13:18:02 +01:00
Khaled Hosny fb0ecd6401 starmath: Add Arabic functions to elements panel
Change-Id: I9aa1bdd344dbca078aec683b5fcd93fd07d98521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157365
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28 14:34:43 +02:00
Khaled Hosny 0eebe81f9d starmath: Add Arabic functions
Change-Id: Ie7597cbde29c8b9cd53d591dc9a722e7df76048b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157361
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28 14:34:35 +02:00
Khaled Hosny ff28544c53 starmath: Arabic text should always be upright
Change-Id: Ibe9f3092432ae4ffd81903df8672daf90947000c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157349
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28 14:34:28 +02:00
Khaled Hosny c7f20a1dad tdf#142095: Render symbols in Math Symbols Catalogue using document settings
Use the document format to resolve the font and style of the symbol.
This makes the symbols use the current document font, as well as apply
settings like GreekCharStyle.

Change-Id: I668e582704b7e011e032f8b9e1dfb509e0d00d3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157348
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28 14:34:22 +02:00
Khaled Hosny d68cb3bedd starmath: Arabic symbols from Symbols Catalogue should not be italic
Arabic math symbols are not set in italic, so we need to unset the
italic style if set.

Change-Id: Id6db51a944236722a9724ad0d128ff6435a6bac0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157346
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-28 14:34:15 +02:00
Khaled Hosny 2902ab24ec tdf#124591: Rename *noto.mk to *noto_kufi_arabic.mk
Since it is the only one left in this package. Still using the old
tarball, though, since there does not exist any releases upstream (yet):
https://github.com/notofonts/arabic

Change-Id: I9a21fda5519bbf184af9b2e70b8cf65e3046a724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157283
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 22:00:56 +02:00
Khaled Hosny 739ee65529 tdf#124591: Remove Noto Mono
It no longer exists upstream, probably renamed to Noto Sans Mono, so if
it is going to be a new font we are better off dropping it entirely.

Change-Id: I8d727c2419a6081b37802324ff115611bce3c9dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157282
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 22:00:50 +02:00
Khaled Hosny 4d6533a5ba tdf#124591: Update Noto Naskh Arabic to v2.016
from:
  https://github.com/notofonts/arabic/releases/tag/NotoNaskhArabic-v2.016

Change-Id: Ic5d23046afddb8d7230ed3f71363cb178f572124
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157271
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 22:00:44 +02:00
Khaled Hosny 00db8423d1 tdf#124591: Update Noto Sans Lisu to v2.102
from:
  https://github.com/notofonts/lisu/releases/tag/NotoSansLisu-v2.102

Change-Id: I205cf05d6f33e1083e30193d7ed775d9775af2f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157280
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 22:00:38 +02:00
Khaled Hosny 114b94f7e0 tdf#124591: Update Noto Serif Lao to v2.003
from:
  https://github.com/notofonts/lao/releases/tag/NotoSerifLao-v2.003

Change-Id: I58b69f3219a7afa7a60a17167cc9d4c4f1d8397b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157279
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 22:00:32 +02:00
Khaled Hosny c4609a0721 tdf#124591: Update Noto Sans Lao to v2.003
from:
  https://github.com/notofonts/lao/releases/tag/NotoSansLao-v2.003

Change-Id: I5a857c4f335cf29473b9baeffffddcc6d810e0b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157278
Tested-by: خالد حسني <khaled@libreoffice.org>
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 22:00:24 +02:00
Khaled Hosny 0d49ac1ba3 tdf#124591: Update Noto Serif Georgian to v2.003
from:
   https://github.com/notofonts/georgian/releases/tag/NotoSerifGeorgian-v2.003

Change-Id: I230b8eed49f024e2361e27df963424d7113e52fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157277
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:54:19 +02:00
Khaled Hosny 529ddd57c6 tdf#124591: Update Noto Sans Georgian to v2.003
from:
  https://github.com/notofonts/georgian/releases/tag/NotoSansGeorgian-v2.003

Change-Id: I007a55194fe77d07c05c704a69c36e489ca5db46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157276
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:54:14 +02:00
Khaled Hosny 15f234bab5 tdf#124591: Update Noto Serif Armenian to v2.008
from:
   https://github.com/notofonts/armenian/releases/tag/NotoSerifArmenian-v2.008

Change-Id: If956e731eaa484b9d48c95cab707d77d39aaeeff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157275
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:54:06 +02:00
Khaled Hosny d69317ca8f tdf#124591: Update Noto Sans Armenian to v2.008
from:
   https://github.com/notofonts/armenian/releases/tag/NotoSansArmenian-v2.008

Change-Id: I92bd6f05e9022b6c1f25ac460e64b12209016297
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157274
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:54:00 +02:00
Khaled Hosny 7376eed0f0 tdf#124591: Update Noto Serif Hebrew to v2.003
from:
  https://github.com/notofonts/hebrew/releases/tag/NotoSerifHebrew-v2.003

Change-Id: Ibffe8d4b629ecd61c2644f4811fda68fa28d9a2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157273
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:53:54 +02:00
Khaled Hosny 448d5d7fbf tdf#124591: Update Noto Sans Hebrew to v2.003
from:
  https://github.com/notofonts/hebrew/releases/tag/NotoSansHebrew-v2.003

Change-Id: I710c49a9dc4f7f1c7460a777e3e224aaea332009
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157272
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:53:46 +02:00
Khaled Hosny 9998c242c6 tdf#124591: Update Noto Sans Arabic to v2.010
from:
  https://github.com/notofonts/arabic/releases/tag/NotoSansArabic-v2.010

Change-Id: Icb4a2932c84884180eed7f391ecd7285311299b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157270
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:53:36 +02:00
Khaled Hosny 96aba2de78 tdf#124591: Update Noto Serif to v2.012
from:
  https://github.com/notofonts/latin-greek-cyrillic/releases/tag/NotoSerif-v2.012

Change-Id: I769f162c3fb7256fd6aba4e666cb91fbc3b12131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157269
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:53:30 +02:00
Khaled Hosny 69943f33bf tdf#124591: Update Noto Sans to v2.012
from:
  https://github.com/notofonts/latin-greek-cyrillic/releases/tag/NotoSans-v2.012

Change-Id: Icdd604614a97071c0ff703eb9fe2468137826489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157268
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-26 21:53:24 +02:00
Khaled Hosny d9eed9b489 tdf#157067: Fix missing background color in style preview
Set the colors after setting the font not before as otherwise they seem
to get overridden.

Change-Id: I258cb762fd2328369bd8adae63e94ec87c666bb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157208
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-24 18:23:47 +02:00
Khaled Hosny d31cc3545b starmath: No need for the OUString copy here
Change-Id: I71e6fd6ff9f5420899ece59b97b81b5e837f919b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157142
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21 16:40:30 +02:00
Khaled Hosny 899522378b starmath: Rename SmSym::GetName() -> GetUiName()
To make it obvious this is the UI (localized) name.

Change-Id: Id0dbffeaa9c331ce90dee3e7fbc88f93fab1b654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157138
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21 13:19:28 +02:00
Khaled Hosny 7de4c6b95d tdf#62174: Fix saving of localized iGreek symbols
When saving symbols we use the non-localized name, but iGreek symbols
are a bit of a hack since they are added at runtime and don’t have
localizations of there own but use the Greek symbols names with an “i”
prefix.

Instead of looking directly for localized names, we now go through the
symbol manager that already knows about iGreek and use the export name
of the symbol. We have to also make sure the iGreek symbols has
non-localized export name.

Change-Id: Ia3e38579abba56ae12ade126f564f8c6f9c3229a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157137
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21 12:33:19 +02:00
Khaled Hosny 6ae1c47fa1 tdf#32418: Add Tools -> Special Character... to Math
Change-Id: I0f4e12f82a3b8e7be2459f4ccfa91f7d30d67f78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157095
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-20 12:21:43 +02:00
Khaled Hosny 8bf38cc394 starmath: Don’t set empty font name when reading font format from file
If a setting is missing, e.g. math font when reading old file, we would
set it to an empty font instead of using the default.

Regression from:

commit 626d17a8ec
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Aug 31 14:54:52 2023 +0300

    tdf#143213: Fix reading math font settings from file

Change-Id: Ib8b3cede3d4bea7e03a146b7e5f39ad2c7dfa363
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157094
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-20 10:12:00 +02:00
Khaled Hosny 9e92a17cb6 starmath: Improve glyph positioning
Using twips everywhere and not rounding to pixels seems to improve
positioning (at least on hipdi displays). Hopefully the issue that
required rounding is no longer relevant.

Change-Id: I0ee4a4453b2a3d8e06be56d586761f7960a2d4d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157044
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-19 14:22:32 +02:00
Khaled Hosny 37f91706e6 starmath: Get the font from current format for special symbols
We want to use the current format when using the symbol in a document,
and fallback for stabdard format when rendering the symbol in symbols
dialog.

Fixup for the following two commits:

commit f28b043b4e
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Mon Sep 18 19:00:02 2023 +0300

    starmath: Fix editing symbols in the Symbols Catalogue

commit 32d2e001bb
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Tue Sep 12 18:35:46 2023 +0300

    tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols

Change-Id: Id3730749a49015120ecf9719027f932fd90c605a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157043
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-19 14:22:11 +02:00
Khaled Hosny 5416c91833 tdf#111705: Add Arabic math symbols to the symbols catalogue
Change-Id: Ieabf4d3173a7ce985a9164db8b2de4c8b6d0da36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157029
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 23:05:23 +02:00
Khaled Hosny f28b043b4e starmath: Fix editing symbols in the Symbols Catalogue
Fallout from:

commit 32d2e001bb
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Tue Sep 12 18:35:46 2023 +0300

    tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols

Change-Id: I1f440dccc920b24010160dbeee58795ffd8f85ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157025
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 19:09:34 +02:00
Khaled Hosny 2cedcebc15 tdf#111705: Add the new maj and hadd operators to the elements panel
Change-Id: Ib62592d86a1bf2e5d94348fca731473dba92be74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156996
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 08:09:00 +02:00
Khaled Hosny e472b5b557 starmath: Show editing window by default again
We are not ready to get rid of it (e.g. undo does not work when it is
hidden). This flips the default introduced in:

commit e9cc014be4
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Tue Sep 12 16:41:37 2023 +0300

    starmath: Hide editing window by default and add a menu item to show

Change-Id: If84b25d186c8d133a9fa5cfc0c3d91162c66b389
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157004
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 02:32:39 +02:00
Khaled Hosny 9023cbc96c tdf#111705: Add support of Persian limits operator (U+1EEF1)
Change-Id: I9936a206b2ce6c8d195967d1e14596c5903c1ef5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156995
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 02:32:15 +02:00
Khaled Hosny d4edecb26c tdf#111705: Add support of Arabic summation operator (U+1EEF0)
Needed to fix a punch of code to work with UTF-16 not just UCS-2 (in
other words, handle surrogate pairs).

Change-Id: Idd7aa823349a032f20f37abbb588856afbc548d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156994
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18 02:32:05 +02:00
Khaled Hosny a157622330 starmath: Improve root rendering for fonts other than OpenSymbol
The radical glyph in OpenSymbol is aligned to the font ascender, which
is not essentially true for other fonts, so we now use the bounding
rectangle of the glyph to get accurate positioning.

Change-Id: I83c21cd21de25f23f96f819e168f43aa9ab22351
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156926
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-15 12:44:05 +02:00
Khaled Hosny 32d2e001bb tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols
Leave the format empty and use the variables font instead.

Change-Id: I3e3cdf40dc285dee7375054e85b4a2bed352eb66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156855
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-13 12:54:40 +02:00
Khaled Hosny e9cc014be4 starmath: Hide editing window by default and add a menu item to show
We are enabling inline editing bu default, so this window is of no
interest by default.

Change-Id: I66fe988790fe4f174f6cb4f691af69888b0b05b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156852
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-13 12:54:14 +02:00
Khaled Hosny aa396ee162 starmath: Keep focus on math widget when inline editing is enabled
Since originally all editing happened in the edit window, it was made to
grab focus instead of the math widget, but we don’t want that anymore
when inline editing is enable as we want to edit everything in the math
widget.

This also removes ancient test that is now failing. We will eventually
drop the edit window altogether.

Change-Id: Ia1628a454bbbdd923ff582564eca1ab4ec830f38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156579
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-12 14:14:52 +02:00
Khaled Hosny d52feb11c7 starmath: Fix selection of surrogate pairs in inline editing
Don’t split nodes in the middle of surrogate pairs.

Change-Id: I3ce8cf19d4c331e2ead73ed375745e8866b3d7a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156827
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-11 21:24:57 +02:00
Khaled Hosny 3c24177104 tdf#88744: Use real clipboard when inline editing is enabled
Instead of using a fake clipboard that works only inside the same
formula.

Change-Id: Ia1e97028e1aafa15912bc9b4397d66afb0d23ec7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156671
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-08 04:24:48 +02:00
Khaled Hosny beaea2e992 starmath: Properly update the state to copy/cut/paste buttons
Invalidate the slots explicitly instead of implicitly by updating the
edit window.

Followup to:

commit 065609f86f
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Mon Sep 4 13:22:04 2023 +0300

    starmath: Make cut/copy/paste buttons work with inline editing

Change-Id: If0648c249d6145475202e1a48364d7fe142a5e35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156674
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-07 23:54:46 +02:00
Khaled Hosny 8c982bf86f tdf#130741: Insert brackets around horizontal binary nodes more generously
When converting node tree creating with visual editor back to text for
the command editor, try to always insert brackets around binary
expressions. It might look redundant at times but it is safer, and the
code is not supposed to be edited by hand anymore so doesn’t have to
look pretty.

Change-Id: Ifff574494c9e8f8b948e432f6832d88c334aba00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156640
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-07 16:18:28 +02:00
Khaled Hosny d93f3243d5 tdf#157112: fix off-by-one error in /LastChar of PDF Type 3 fonts
It should be the index of the last glyph in the subset, so nGlyphs - 1.

Change-Id: I62853a27b602d7b3e6b6265555542dd417438fcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156630
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-07 09:01:43 +02:00
Khaled Hosny ee187f6ed7 starmath: Always insert using SmCursor when inline editing is enabled
Choosing which code path based on which widget has focus is not a very
good idea, and leads to unreliable UI tests as each code path inserts
the text slightly differently (one code path inserts plain text then
parses the whole equation again, while the other parses the new text
then inserts the parsed node directly).

Change-Id: Ib2ca942c537e466f6ff100be7f95adaead99f1d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156578
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-05 20:28:34 +02:00
Khaled Hosny 065609f86f starmath: Make cut/copy/paste buttons work with inline editing
Check for visual cursor selection when in inline editing mode, and update edit
window when updating visual cursor.

Change-Id: Id1a259b67db47eea0b36b55d08ef5dc5f8aa8246
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156513
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 19:29:45 +02:00
Khaled Hosny f80c2c7075 tdf#134193: Fix inline editing with RTL direction
Change-Id: I65d3ed0d7c56839ce3674318144269719b043ba5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156261
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 18:18:37 +02:00
Khaled Hosny fe3098b4c4 tdf#134193: Fix RTL selection and cursor handling
Change-Id: Ib9d7dd56d884aaca9b88a8b9403aeef30a9917d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156167
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 18:18:16 +02:00
Khaled Hosny b6c30b3d35 tdf#134193: Allow setting math direction
Add LTR/RTL buttons to the toolbar and make them change the
IsRightToLeft property.

Change-Id: I8ae793a9899c50b6dfaf3563a7c22c1f1eab8c8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155739
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 18:17:45 +02:00
Khaled Hosny fb43c497f2 tdf#134193: Support rendering math in RTL mode
Respect IsRightToLeft property and render accordingly.

This also fixes math rendering in RTL UI, which was incorrectly rendered RTL.

Change-Id: Id8520930f09a21daa1c70e40a765ac25572ea994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155738
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 18:17:15 +02:00
Khaled Hosny 5c5c71266f tdf#134193: Add the ability to set RTL math direction
This adds a new IsRightToLeft document property, reads/writes it, and
sets dir="rtl" on the top level MathML <math> element if set to true.

Rendering will be handled in next commits.

Change-Id: Ia3078b8a269fef7c3f037a2f1b7799744df2680b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155737
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 18:15:50 +02:00
Khaled Hosny 03c43d303b Math: enable in-place editing on desktop
Move the code outside the else block as it doesn’t get hit for me on
desktop otherwise, and use SmViewShell::IsInlineEditEnabled() instead of
comphelper::LibreOfficeKit::isActive() (which is included in the former).

Followup to:

commit 737a270c61
Date:   Mon Jan 17 17:15:46 2022 +0300

    lok: enable in-place editing of math equations

Change-Id: Ie604f152344b83479eaf6024b6d58e374abb39b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156331
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04 11:58:15 +02:00
Khaled Hosny cc7d6211bc starmath: Disable formula cursor toolbar button when inline editing is enabled
It is ignore when inline editing is enable, so better disable it to make
it clear.

Change-Id: Ie79a1c16109109e213658d44a6ffc0bff2291c7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156487
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-03 23:26:07 +02:00
Khaled Hosny 2d47c824cd starmath: Graduate inline (visual) editing from experimental features
It has been experimental for as long as LibreOffice existed, lets make
it non-experimental but add an option to disable it. If it turns to be a
disaster, we can flip the option and disable it by default.

Change-Id: I63672c054d1ead269863079e7f9c118a44b3ba19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156486
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-03 23:25:59 +02:00
Khaled Hosny 0fd5465b80 starmath: Re-save smathsettings.ui with newer glade
Change-Id: I2a2802eafa0d77e1a35131dbe7bd9ca003aa3c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156485
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-03 23:25:49 +02:00
Khaled Hosny 626d17a8ec tdf#143213: Fix reading math font settings from file
The order of reading the settings is significant, e.g. if font italic
was read first then font name, font name would set a new font
overriding the italic setting.

We now collect all font settings and apply them at once.

Change-Id: Idb32d7d416607011bc325eff0b73c03b2d12e7d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156352
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-31 20:41:00 +02:00
Khaled Hosny 900ce2fa32 tdf#101174: Add the ability to change math font in Math
The math font (default is OpenSymbol) can now be changed from the fonts
dialog like other fonts (variables, numbers, etc).

Change-Id: I57f416173abf7bef8bb66b5e5e393dd928e30652
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156053
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-25 08:56:21 +02:00
Khaled Hosny 5ca5acdd6e tdf#140881: Ignore WOFF/WOFF2 fonts with FontConfig
FC_FONT_WRAPPER requires unreleased FontConfig, but lets have this in so
it works when FontConfig have it.

Change-Id: I8f48ac1f68a3af6e1853e9eb1925d382b57136c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156049
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-24 22:22:17 +02:00
Khaled Hosny 611694b707 vcl: Allow pushing/popping OutputDevice’s RTLEnabled state
Change-Id: Icafdc307c5c9df768f00c3ac0d128936607bf3e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155794
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-24 13:17:49 +02:00
Khaled Hosny a21ae72ab2 starmath: Use OutputDevice::Push()/Pop() instead of doing it manually
Change-Id: I628385cd64f3d65a1a567590bce754693b4d0684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155795
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-24 13:17:39 +02:00
Khaled Hosny bc3f6c3a47 tdf#155610: Workaround Acrobat bug with Type 3 fonts and unusual UPEM
Adobe Acrobat seems to have a bug with Type 3 fonts with unusual UPEM,
the common 1000 and 2048 UPEM work fine, but Sitka has 2250 UPEM and
Acrobat handles the advance widths in this case incorrectly and
everything gets cramped up with gaps when we re-start glyph positioning.

Workaround this by always using 0.001 scale in FontMatrix (equivalent to
1000 UPEM) and scale everything if the font’s UPEM is different.

Change-Id: I80d25a16456f04bb00304b22b967688fa8260a83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155935
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-22 11:45:31 +02:00
Khaled Hosny 77dab2ac3a vcl: Fix dumping meta file layout flags to XML
These are bit flags, so we were always writing #0000, so now it does
bitwise check for the flags and while at it write the names of the flags
not the numeric values.

Change-Id: I13cae38c0e549b2da1f834a264e3a3255bfa5c5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155793
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-22 10:52:58 +02:00
Khaled Hosny 3e20c3e73c tdf#156853: Fix PDF export of bitmap color fonts
Move the alpha inversion down to createBitmapEmit() so that it gets
applied to any bitmap embedded in the PDF, especially since embedded
color bitmap glyphs don't go through the higher level code path.

Regression from:

commit 81994cb2b8
Date:   Fri Apr 16 20:33:10 2021 +0200

    Convert internal vcl bitmap formats transparency->alpha (II)

Change-Id: I68601a7a0d9ac01f5e8054f074f8e18fcbdea1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155930
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-22 09:55:27 +02:00
Khaled Hosny 25b2e4a4e2 tdf#32415: Always accept English symbol names in math
If symbol name does not match localized names, try to find a match using
English (export) names.

Change-Id: Id668ee68b07c8431c2780b78e26e07d3aef043aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155553
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-10 15:43:47 +02:00
Khaled Hosny ca78e610e1 tdf#80467: Fix math rendering in elements dock with RTL UI
Make sure to disable RTL on the OutputDevice, otherwise the math will be
rendered right-to-left without even mirroring the parenthesis.

Change-Id: Iea43dbc0d7efe914120d5cc1605522254344b4fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155538
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-10 12:23:37 +02:00
Khaled Hosny 3b7eb22241 vcl: Organize CoreText font code a bit
The code was all over the place with classes split between files or
grouped in some files and I couldn’t make a head or tail of it. Move
each class to a dedicated source/header file.

Change-Id: I35daa05b4684c13339c637819dc30fa47a60cf65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155503
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-09 12:42:57 +02:00
Khaled Hosny 1e13ee5273 Revert "UI Workaround for tdf#146653: change localized Source Han {Sans,Serif}
CN..."

This reverts commit 22c7ce6c8e.

Not needed any more as we now get the style from FontConfig, since:

commit 0b5e88bc88
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Aug 3 13:44:43 2023 +0000

    tdf#114192: Speed up populating font list when FontConfig is used

Change-Id: If6a51ffe681896a7ffda1a06da02585e8141c81e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155458
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-08 18:19:21 +02:00
Khaled Hosny fed82c416a tdf#139164: Revert "tdf#54908 Make selection active if there's a selection
(Writer)"

This reverts commit 87d5c863109f7991e3f2f3a1eb970c00d5a27bd5.

Making Writer print selection only by default is not something people
expect, and it is not the default in any other application. Judging by
the number of duplicates, it seems to have caught a lot of people by
surprise, which is not a good UX.

Change-Id: Ia7c8928c474d3390d7f7fee6e0c2e504a41d51b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155422
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-07 13:38:27 +02:00
Khaled Hosny 0b5e88bc88 tdf#114192: Speed up populating font list when FontConfig is used
Instead of calling psp::PrintFontManager::analyzeFontFile() get the font
names and metadata, use the values taken from FontConfig which nowadays
provides everything we need. This speeds up startup time significantly,
especially when there is a large number of fonts installed.

This also uses the correct style name, we were mixing name id 1 (family)
with name id 17 (typographic subfamily) while we should have been using
name id 2 (subfamily). The name ids 1, 2 and 16, 17 should be used
together not mixed and matched, and we need the former because it is
compatible with the R/I/B/BI model we (and the other office suite) use.

So instead of "Foo Black, Black", we now get "Foo Black, Regular".

On a system with 6616 fonts installed. Before:

$ export OOO_EXIT_POST_STARTUP=1
$ time ./instdir/program/soffice.bin --headless

real    0m4.744s
user    0m1.672s
sys     0m2.547s

after:
$ export OOO_EXIT_POST_STARTUP=1
$ time ./instdir/program/soffice.bin --headless

real    0m1.377s
user    0m0.563s
sys     0m0.297s

Change-Id: Ib7e358f16530c2daabc7ef677ef6a148fdf08e6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155313
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-03 19:56:08 +02:00
Khaled Hosny 803747fa9c Raise minimum FontConfig version to 2.12.0
I want to use FC_SYMBOL and this the first stable version to have it,
and our baseline has 2.13.x already.

Change-Id: I606b99190020085cdf20a52788a021543c365fca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155312
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-03 19:55:43 +02:00
Khaled Hosny 790ccec0bd vcl: Simplify analyzeSfntFamilyName
We only need a family name not a set of name, and drop a work around for
a broken font that is probably long obsolete.

Change-Id: I219ec58e65826250d08b3e88462fdcc1e2e2b7f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155195
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-02 11:58:10 +02:00
Khaled Hosny 444e246535 vcl: Drop the PrintFont -> FastPrintFontInfo -> FontAttributes indirection
We want FontAttributes at the end, so lets have them up front instead of
the intermediary structures.

Change-Id: Iafdf17f4a7615f0c3d972e6080cebea0183840b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155191
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-02 11:58:01 +02:00
Khaled Hosny 0c019cb7c1 vcl: Drop unused FontAttributes::GetMapNames()/AddMapName()
Change-Id: I50e06ad24e95cab39009a8affb876ebc920c1c11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155168
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-02 11:57:47 +02:00
Khaled Hosny aa53ccd834 vcl: Drop unused PhysicalFontFamily::GetAliasNames()
Change-Id: Ide306f0656230460f976daef0ed213f734136030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155167
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-02 11:57:34 +02:00
Khaled Hosny b3911f617d vcl: Fold two static method into their only call site
Change-Id: Ifa943bd658892d4fcf8e47a6abfa245fbcaa78a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155161
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-02 11:57:26 +02:00
Khaled Hosny 21f13b9029 Fix reversed expected and actual unit test results
Change-Id: Ie7eaec7ce9ad6f85b02edc831f1d138f45c18220
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155152
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-01 18:43:58 +02:00
Khaled Hosny 5526c523bc Fix surrogate pairs handling when tweaking script info
Followup to:

commit 3af30bafbe
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Jul 27 19:03:28 2023 +0300

    sw: Handle surrogate pairs when tweaking script info

and:

commit d6efe8c302
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Jul 27 20:39:22 2023 +0300

    tdf#112594: Group NNBSP with the Mongolian characters after it

Change-Id: Ie273c457e4f3ed31a3372bc8eb0eb0055c1b97b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155053
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-31 12:32:17 +02:00
Khaled Hosny 3e563f6ed4 Drop freshly unused PrintFontManager
Change-Id: If4cec80eaf1301907d144ecb8518a4de5acdeefb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155070
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:45:18 +02:00
Khaled Hosny 3a01df55db Drop freshly unused font subsetting code
These output font formats were for PostScript that is now gone.

Change-Id: Ib29f921fe25432aaa558ba842ee77fe1e8023d47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155069
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Tested-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:45:12 +02:00
Khaled Hosny 984e2e7834 tdf#156230: Drop freshly unused PSLevel setting
Change-Id: I9331b5532f8066f7d13815487c7af0e7fd37e54f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155068
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:45:06 +02:00
Khaled Hosny c106e5d959 tdf#156230: Drop freshly unused PrinterJob and PrinterGfx
Change-Id: I5149fb447e76044e7f4bfdd9a79ee3b454859375
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155065
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:58 +02:00
Khaled Hosny 4998de76ed tdf#156230: Drop freshly unused GenPspGfxBackend
Change-Id: Idfc4364b99ed605462aae58391e98960be6021b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155064
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:50 +02:00
Khaled Hosny e7249131dc tdf#156230: Use SvpGraphicsBackend in GenPspGraphics
We no longer draw to PostScript, so old backend is unneeded.

Change-Id: I069ce735b303721be7de6abf69aa26c1b25a9107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155063
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:44 +02:00
Khaled Hosny 45c3bf8bf3 tdf#156230: Use CairoTextRender in GenPspGraphics
We no longer draw to PostScript, so old layout implementation is
unneeded.

Change-Id: Ifd007f8dd7794e348abb863c1c36d5c79ac7e0e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155062
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:37 +02:00
Khaled Hosny 4a0c8c7222 tdf#156230: Drop freshly dead PspSalPrinter code
Change-Id: I272c8f3a4d70ef9d5d03eecc8c91ee8423c52ccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154976
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:29 +02:00
Khaled Hosny 55a0a70e8f tdf#156230: Drop PDFDevice handling
Change-Id: I53759eb6025a4fc7e1319d0d1e7b3072edde93c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154975
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:22 +02:00
Khaled Hosny 3d8b7fd32b tdf#156230: Deprecate and stop using PDFAsStandardPrintJobFormat
PDF is the only supported printing format (on Unix) going forward.

Change-Id: I1bd442bac370b89a77e2035d4c17bfc43a869ab1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154974
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 20:44:15 +02:00
Khaled Hosny d4653fa961 tdf#107612: Include NNBSP and Mongolian characters in the same fallback run
When a Mongolian character is preceded by a Narrow No Break Space
(NNBSP), it is used to trigger special letter forms, but when we do font
fallback NNBSP is always taken from the main font (HarfBuzz synthesises
it when missing from the font, so we almost never use font fallback for
it).

We now check if the start of the fallback run is a Mongolian character
and the previous is NNBSP and extend the fallback run to include it.

Change-Id: I7607dba37ee51ff62bc9e86c3dbc555cd77e8d5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155060
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-30 09:50:11 +02:00
Khaled Hosny d6efe8c302 tdf#112594: Group NNBSP with the Mongolian characters after it
Narrow No Break Space has special uses in Mongolian, so we want to make
sure it is in the same portion as the Mongolian text, even when it comes
after text from another script group.

We limit this to Mongolian to minimize potential side effects.

Change-Id: Idb4c64cec8581e56acfe9bbb8adf4ddc213aaf19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155000
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-27 23:49:28 +02:00
Khaled Hosny 3af30bafbe sw: Handle surrogate pairs when tweaking script info
Change-Id: I18e8358657303571d5d90e5162dbb68cbe067980
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154995
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-27 23:49:16 +02:00
Khaled Hosny 82e263550b Add short ContextLabel for special character commands
Restore the “Insert” in full labels, and add short ContextLabel without
it.

Followup to:

commit a9180786cf
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Tue Jul 25 12:11:48 2023 +0300

    tdf#107447: Align special character names with Unicode names

Change-Id: Iea8c45cbe8acb4497b515ecbf7fe0d46803d18bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154939
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-07-26 16:21:18 +02:00
Khaled Hosny 24d0a62bd7 tdf#156368: Fix setting watermark font for CJK/CTL text
We were setting only Western font when getting the shape, so if there is
no Western characters in the text the default font would be used. There
is no separate setting for CJK/CTL fonts, so we sets the same font for
all the three.

Change-Id: If2ba2a206f95e0efe9139b9d092b1d6dbf05967c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154894
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-26 04:19:12 +02:00
Khaled Hosny a9180786cf tdf#107447: Align special character names with Unicode names
Unicode names are recognizable more prevalent, no need to invent our own
names.

* Non-breaking Space → No-break Space (aligns also with Narrow No-break Space)
* No-width Optional Break → Zero Width Space
* Remove redundant “Insert”

Change-Id: I005c3fefd24045eb4b5c2054d82638b3f2d5f59f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154886
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-25 18:24:10 +02:00
Khaled Hosny 42f0422d19 tdf#156437: Fix missing name inside embedded Type 1 font in PDF
Regression from:

commit 7415ce2b97
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Mon Dec 5 20:52:13 2022 +0200

    tdf#113048: Fix PDF ascender and descender of some fonts

We were setting the font in PDF /Font dictionary, but not inside the
font itself.

Change-Id: I1936f615f62fd7afa8f31d66d35dbded879328c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154880
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-25 04:16:11 +02:00