Age | Commit message (Collapse) | Author | Files | Lines |
|
It is unclear if LogicalFontInstance::GetGlyphBoundRect can be called
for both normal and rotated variants of the same glyph in the same font.
If yes, then the normal and vertical variants must be cached separately,
or possibly vertical variant can be not cached, but always calculated.
This problem already existed before, so this change doesn't introduce
a new issue.
Change-Id: I9b50ef340c9e38db7bef890165519aadc96d3ffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165581
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
... instead of tools::Rectangle.
Several problems were there:
1. First, a horizontal bounding rectangle was calculated, with due
rounding; and then the result was rotated, and after that, rounded
again. That made the resulting rotated rectangle coordinates very
imprecise.
2. Also, ceil/floor was applied without normalization; and in case
of rotated font, that meant, that sometimes the range could be not
expanded to cover partially covered pixels, but instead collapsed.
3. The rotation to angles other than 90 degree multiples was done
incorrectly, resulting in cut off parts of characters.
4. For 90 degrees, the imprecise result of sin/cos converted 0.0
into values like 3e-16, which then could be ceil'ed up to 1.
Using B2DRectangle and its transform allows to simplify and fix
the calculations easily, and avoids premature rounding. Render of
rotated text of small size is more stable with this change.
Change-Id: Idffd74b9937feb2418ab76a8d325fdaf4ff841b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165553
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Id25d5e3dbf84dea1f9aca5a6ec921d30cbe84bf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165524
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
|
|
Change-Id: I963bccd565750b41f16e3585f9a358678aa28500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165576
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Was this way since initial commit
Change-Id: I4159d8969853a9f1e226326bcd5180aedeed50dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165575
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I2a5b870516d8b597ebf476c7c1da7549a27571ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165503
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
and
cid#1546346 COPY_INSTEAD_OF_MOVE
cid#1546342 COPY_INSTEAD_OF_MOVE
cid#1546320 COPY_INSTEAD_OF_MOVE
cid#1546305 COPY_INSTEAD_OF_MOVE
cid#1546241 COPY_INSTEAD_OF_MOVE
cid#1546162 COPY_INSTEAD_OF_MOVE
cid#1546118 COPY_INSTEAD_OF_MOVE
cid#1546048 COPY_INSTEAD_OF_MOVE
cid#1545989 COPY_INSTEAD_OF_MOVE
cid#1545936 COPY_INSTEAD_OF_MOVE
Change-Id: I63bc43378b36f7c49e66231152138ad7038971e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161507
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
and try something a bit more generic
Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
and
cid#1546498 COPY_INSTEAD_OF_MOVE
cid#1546384 COPY_INSTEAD_OF_MOVE
cid#1546376 COPY_INSTEAD_OF_MOVE
cid#1546374 COPY_INSTEAD_OF_MOVE
cid#1546373 COPY_INSTEAD_OF_MOVE
cid#1546368 COPY_INSTEAD_OF_MOVE
cid#1546365 COPY_INSTEAD_OF_MOVE
cid#1546356 COPY_INSTEAD_OF_MOVE
cid#1546340 COPY_INSTEAD_OF_MOVE
cid#1546266 COPY_INSTEAD_OF_MOVE
cid#1546236 COPY_INSTEAD_OF_MOVE
cid#1546188 COPY_INSTEAD_OF_MOVE
cid#1546178 COPY_INSTEAD_OF_MOVE
cid#1546166 COPY_INSTEAD_OF_MOVE
cid#1546156 COPY_INSTEAD_OF_MOVE
cid#1546144 COPY_INSTEAD_OF_MOVE
cid#1546143 COPY_INSTEAD_OF_MOVE
cid#1546100 COPY_INSTEAD_OF_MOVE
cid#1546078 COPY_INSTEAD_OF_MOVE
cid#1546041 COPY_INSTEAD_OF_MOVE
cid#1546036 COPY_INSTEAD_OF_MOVE
cid#1546033 COPY_INSTEAD_OF_MOVE
Change-Id: Ib3586d93198992e206baf5c2de5a663d5574aa3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Iaeacacbbb0eec907d884219aa2bcfe7a86f00a2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158291
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: I5e3cc14ed75309d0569a4bad710e7adea007329f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156807
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
which warns against using the 'operator bool' conversion of
std::optional<bool> which can lead to interesting bugs
The bugs that this plugin have been submitted independantly,
so this change is just using has_value() in relevant places.
Change-Id: I259b837feeecddcb8cd1d7e5db1e85bf505907cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155978
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ide306f0656230460f976daef0ed213f734136030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155167
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
This improves our calculated positions for the inserted Kashida glyphs,
which has the side effect of fixing this issue, and generally improves
Kashida positions so that there is less rounding errors and visible gaps
between them.
Change-Id: If60126e77e59c2c1246298e2993609547d38c79c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154550
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change how glyph coordinates are represented inside VCL to use floating
point instead of integers. Should make no functional difference because
we are still rounding them.
Change-Id: I5480ee3dec3afab50194954095fd6829ebaa4a22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154499
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
For consistent cross-platform results that also matches our glyph
advances since platform functions might be using hints which we don’t
use.
Change-Id: I4aebd3e7c5f460dff584f5eba74f7a11bab0f9b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154388
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change-Id: I5485817b5a6c2e9538ed6fb00893663d09e7fa26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153869
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change-Id: I0f8753a5ef1865f4ea0431125e74d0f52aa1c396
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153868
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
This reverts commit a38e1537cd06367783a43cc8d3b0e8d674b6e142.
Change-Id: Ic72f1acb7e38209e9b87a8fe80a39acb1eeacfe4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152547
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
The use of comma breaks editing in Expert Configuration dialog, so users
effectively can’t use this.
After editing
<it>Celticmd,1571,-567,1571,-547,2126,559</it>
becomes
<it>Celticmd</it><it>1571</it><it>-567</it><it>1571</it><it>-547</it><it>2126</it><it>559</it>
Using colon instead of comma seems to fix this.
Change-Id: I4bba26fe9d94a33e62a0d34c3324daae0845c30b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152597
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
entry for that font->OpenSymbol conversion. It might make sense to drop
the conditionals and just use the result of ConvertChar::GetRecodeData
if there are any, but keep close to what has worked historically.
Change-Id: Idf9ee0f8068f1ff8e7f179ba5087763e44ade268
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150241
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Every now and then I see a crash in fontcache code.
Add some DBG_SOLARMUTEX calls there, which spots a few issues.
(*) In writer, SwDLL needs to be under the SolarMutex during
init, and we can just move a method call to fix that.
(*) in chart2, life is more complicated. Various of the static
defaults we build want to call OutputDevice::getFontInstance.
We can't just stick a SolarMutex somewhere in the call chain,
because those maps are built on-demand, and then we end up
with ABBA deadlocks between the SolarMutex and the mutex
in the cppu::PropertySetHelper.
So I picked a spot that is init'ed early on in chart2,
and force the init of all the troublesome tables there.
Change-Id: I832978bea35fd5fa681d144b8beff1af13ef3341
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149648
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
* Fixes CVE-2023-25193.
* if Harfbuzz >= 7.0.0, uses hb_font_draw_glyph()
instead of hb_font_get_glyph_shape().
* Update URL in README.
Change-Id: Id234c2b459c40ddac340731b44889b104e03a1e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148743
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
They all have bad metrics and we are better off synthesising metrics for
them instead. Also simplify the exception list to only use family name.
Change-Id: I9e13bc05bdf56a31e9805fcd348439d191ed3a3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149072
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I98eff6f138b57e249d8ce951c1b3747c773330ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146718
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
This is the minimal version to provide the functionality we currently
check for. Some important LO functionality currently depend on idfdef'd
HarfBuzz code, and some distributions build against old system HarfBuzz
leading to user bug reports that are tricky to track down, e.g:
tdf#153048 and tdf#153470.
Change-Id: I7d58ec46f8fd340d2592887c0088876d71351771
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146674
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Font data is big endian while SvStream defaults to little endian.
Regression from:
commit fb417ee082afdd2e80a1f48aa420bb8d5cb97686
Author: Khaled Hosny <khaled@aliftype.com>
Date: Fri Sep 30 12:35:10 2022 +0200
vcl: Apply variations to font metrics
Change-Id: I474ec2a76057baca93f350e23c3779985abdf9da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146611
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I3e4303629aa5502dc35bf562b5f4e5aed183234a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143950
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I0d5191d2d4ed8ba76d2549701da5e00ca92a9ea7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143949
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
The font has bogus value in the regular style. Add configuration
support for ignoring metrics of such fonts, similar to what we do with
line metrics.
Change-Id: Ia7cfb44400601e89b8425c9a1144f630f67569f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143648
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Hide the logic inside fontsubset and don’t leak it to the caller.
Change-Id: Ibc845e0051eaeb64e8de42f80d4d404fd6a3880e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143686
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Use the same ascender and descender calculation for fonts with CFF
table as fonts without CFF table.
This also provides a better fix for tdf#138325 and tdf#151039.
Change-Id: I416a123199e94401fa557fce95013eb8b0590e33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143683
Tested-by: خالد حسني <khaled@aliftype.com>
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
We want to mach features like “ss01” but not, say, “ssty”.
Change-Id: Idc4fdf78c577afe66cf76d7f722dc2009863654e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143614
Tested-by: خالد حسني <khaled@aliftype.com>
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: Ifd772da1f4b81aa08440025a5c960fb226281194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143613
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I844b4fc39784ac093a3339b8912efd236ae152ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143605
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
On small zoom levels we were ending up with underline sizes of zero, so
use ceil() instead of round() to prevent this. Also make sure double
lines don’t end up collapsing into each other by changing how the second
offset is calculated so that they is always a minimum distance between
the two.
Change-Id: I526685cebce3dddc9df6110e7ffad2729af2be93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143333
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: Ic84fcee9034865de42f1018d2358c19c5bd9b463
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143276
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Draw the outlines as PDF Type 3 glyphs until we can use HarfBuzz
subsetter to instantiate the fonts before embedding.
Change-Id: I811eaa8f7e5875db2eeb3755d69616242e263ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142028
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Don’t unconditionally access palette 0.
Change-Id: I3de3f005371fcb9360ee0cf245a1d0a7434ffbd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143042
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
its baked in that Symbol means RTL_TEXTENCODING_SYMBOL, so accept
that status quo and make it explicit
Change-Id: I78d90965e3d6b4543cd74a7847e13246485380d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143010
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Icd08628848cce74407552f57660d75b1ac9816bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143009
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I717319dd3843aa7d73d0722967e80f7d07e98143
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I8da977c3464e82e8a159143f9d1c73446ceee159
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142960
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
which has a specific meaning of a Windows Symbol encoding
Change-Id: I6e5d079303fccfabc8204fc0dbae0870efb839a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142947
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Let HarfBuzz transform the glyph positions as well, so that e.g.
combining marks get shifted relative to their slanted base glyphs.
Change-Id: Ib399ab462b36effdc21c4bbeba79d65214792f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142979
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: Ie8bab5d7653a22d0f56b4c859fb2260d96e655c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142998
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Move creating DWFontFace to WinFontInstance so that it get proper font
synthesis settings.
Regression from:
commit a80239ede3236c84d7a05d0fbc0f299811fee6c0
Author: Khaled Hosny <khaled@aliftype.com>
Date: Sat Nov 19 03:03:15 2022 +0200
vcl: move creating DWFontFace to WinFontFace
Change-Id: Ifba947d8908a37972d723028258500b10ec24cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142982
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Otherwise when a font does not, say, support variations or color
palettes, we keep querying the font each time they are requested.
Change-Id: I3a41bc73dd814b25af3a8b5b009632ecf7ef27ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142963
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: Ib2bbba8a21b6c82ca83c067a99dcd9bb41537e66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142939
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|