Age | Commit message (Collapse) | Author |
|
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>
|
|
since:
commit 4998de76ed1da4039e30718941d50d6f1dfe4f82
Date: Sun Jul 30 07:40:48 2023 +0000
tdf#156230: Drop freshly unused GenPspGfxBackend
Change-Id: I7fc2a068f807777ed392c5d58772d130bf7f51c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155076
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
since:
commit 4998de76ed1da4039e30718941d50d6f1dfe4f82
Date: Sun Jul 30 07:40:48 2023 +0000
tdf#156230: Drop freshly unused GenPspGfxBackend
Change-Id: I1adc30a60aec0c5aab9289e9c0505d1dbad10631
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155074
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
(Second attempt at landing this)
Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.
Add a couple of new Color constants to make the intention
of the vcl code clearer.
Notes
(*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask
to more accurately reflect the requirements of the
CGImageCreateWithMask function seems to fix some
tests.
(*) The vcl code does not properly support gradients
with transparency. So the previous code was wrong, and this
change is going to result in slightly different wrongness.
Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It has been always typedef'd to basegfx::B2DPoint since:
commit 5e218b5c51f7d9cd10bd9db832879efca41b9c75
Date: Wed Jan 12 21:19:32 2022 +0000
always use B2DPoint for DevicePoint
Change-Id: I9f5202d5a71c77dd79f1759923917c26bf68a9af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154632
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change-Id: I8698d0f74889ac8a7de64a97e8cf0e8878ef7fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154517
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Take TextRenderModeForResolutionIndependentLayout() from the SalLayout
argument instead of passing it separately.
Change-Id: I155ea645e401618ad884fdc36c4c1aeab69980ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154516
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>
|
|
OutputDevice::ImplDrawRotateText() draws black text but
that will generate gray pixels due to antialiasing so
count dark gray the same as black, light gray the same
as white, and the rest as medium gray.
The results are not smooth since LibreOffice appears to
redraw these semi-transparent masks repeatedly without
clearing the background so the semi-transparent pixels
will grow darker with repeatedly redraws due to
cumulative blending. But it is now better than before.
Change-Id: If64ff5ab52a6e441b587aa3c3c12b08137ecf34e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154079
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.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>
|
|
Remove the Y position offset that became redundant and now double shifts
the glyphs after:
commit dd0d0b44fd1c6c0292d7b2eb3f5cf2baa21e4481
Author: Mark Hung <marklh9@gmail.com>
Date: Sun May 2 15:12:46 2021 +0800
vcl: adjust LayoutText() for vertical writing.
Change-Id: Iac7abfa69acfe75860d05800f446c25ed622bb95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152366
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Recent code reorganization and macOS changes caused the iOS build to fail. This change fixes the build errors and updates the iOS code to use the same headless data structures as other headless builds.
Change-Id: I9c5329eb6376120d6789447f991c93eb9839d595
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146265
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
|
|
Change-Id: I4185a240a2ca6df1c92e86ff9950f86234d4ace8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146142
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
|
|
Commit 9eb732a32023e74c44ac8c3b5af9f5424273bb6c fixed crashing when
printing SkiaSalBitmaps to a non-Skia SalGraphics. However, the fix
almost always makes two copies of the SkiaSalBitmap's bitmap data: the
first copy is made in SkiaSalBitmap::AcquireBuffer() and then
QuartzSalBitmap makes a copy of the first copy.
By making QuartzSalBitmap's methods that return a CGImageRef pure
virtual, a non-Skia SalGraphics can now create a CGImageRef directly
from a SkiaSalBitmap's Skia bitmap data without copying to any
intermediate buffers.
Change-Id: If6ab7f175889cb4839d8a2461b7be7671e575c08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
all of the implementations of this method return true.
Change-Id: I6dc02499af1809110edd482a48d9f6d5d42ead19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifd46201254b8a5db1d21d99d469d331688e8731c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143952
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
|
Commit de3f13e2175564316eb5a62dee65e9ff8f31b460 disabled Skia for printing.
However, since all SalBitmaps created are either all QuartzSalBitmaps or all
SkiaSalBitmaps, a crash occurs whenever a SkiaSalBitmap is passed to a
printer's SalGraphics instance which is now always non-Skia.
Change-Id: I7c1b0e1a9993e21db18ba5695a106cb10cc4088a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143939
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Skia does not work with a native print graphics contexts. I am not sure why but from what I can see, the Skia implementation drawing to a bitmap buffer. However, in an NSPrintOperation, the print view's backing buffer is CGPDFContext so even if this bug could be solved by blitting the Skia bitmap buffer, the printed PDF would not have selectable text so always disable Skia for print graphics contexts.
Change-Id: I214ba83b6e368af3ef51ea770b093612d04047a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143798
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
...now causing
> In file included from vcl/osx/a11ytextattributeswrapper.mm:23:
> vcl/inc/quartz/salgdi.h:283:22: error: suspicious dynamic cross cast from 'AquaGraphicsBackendBase *' to 'SalGraphicsImpl *' [loplugin:crosscast]
> mpImpl = dynamic_cast<SalGraphicsImpl*>(this);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I0c9a4af0690c195c693f986e02284a48fe753a07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143505
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Setting italic to that of the found font seems to prevent artificial
italic in PDF export. We want to keep the original select pattern
attributes so that we know we asked for italic font but got a non-italic
one.
Change-Id: I0cf400e86d802028dffdabbb98e35e3ee584626e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143339
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>
|
|
so kCTFontSymbolicClass doesn't fulfil that meaning, if we want
something more generic to indicate that a font is only useful
for "icons, dingbats, technical symbols, and so on." then we need
a different thing. Its baked in everywhere else that a "SymbolFont"
uses RTL_TEXTENCODING_SYMBOL.
Change-Id: Ie99b5068077dd385dec26f62e2e991e8381128d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142961
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie8bab5d7653a22d0f56b4c859fb2260d96e655c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142998
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Cairo, Skia, Core Text, and PDF all were using slightly different skew
for artificial italic.
On Windows, we don’t even apply the skew ourselves and let DirectWrite
apply it.
The value chosen here should be the same as the one applied by
DirectWrite for consistency (measured manually, and confirmed against:
https://source.winehq.org/git/wine.git/blob/5d1820c40bd93e6810f072a39745ee739ba99b81:/dlls/dwrite/freetype.c#l467)
Change-Id: I3ab017b4cd7a3b4dba097cd302333a88e4c16350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142980
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: Idcef772802636efab7e7b92415a6d31fec0ba979
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142348
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
apparently a leftover from 643fec7cf7a81bf8c89a8efd47c0310b38f9076c "vcl: add
PhysicalFontFace::GetVariations()"
Change-Id: I78141d5de4c3f63096552eb25b70da3e5de36df9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142284
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use it to set the variations on hb_font_t, and we will use it for other
things in later commits.
Change-Id: Iae1861f74b38af4921ac97c1facecf0d4815c201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142024
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
If the !nTag case, we created a CTFontRef but never released it.
Change-Id: Iaf06d62f03b7cbcb2b2eda87db598ef983c55994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142022
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I3201add2e10d9cf01fc48b8d934822fc7b1941d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142012
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
We create CFMutableDictionaryRef, store two items in it and only even
access one of them. Simplify the whole thing and skip the middleman.
Change-Id: Iefc6b2c2664b0ea92e231195390ce8cd0d8d9778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142011
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Everywhere else we call them fonts.
Change-Id: I70ef5957e9fb4fd03588cf23a255480ad021e083
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142010
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Using unique_ptr here fixes a leak, which in turn was hiding
the fact that we don't manage the lifecycle of CTFontDescriptor
in CoreTextFontFace properly
Change-Id: I2ade5fae9a40ad0ebb10538488018941f3f285c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140916
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
> /Users/stephan/lo/core/vcl/quartz/ctfonts.cxx:255:33: error: loop index type 'unsigned int' is narrower than length type 'CFIndex' (aka 'long') [loplugin:loopvartoosmall]
> for (auto i = 0u; i < nTags; i++)
> ~~^~~~~~~
(and whatever the motivation in d7083fe6dd383ac4144fbe53e300bc3d34f26ef6
"tdf#72456: Support font embedding on macOS" to use an unsigned 0u here)
Change-Id: I6a96dd2b2146c27d68a8a53daf3c2fe1f744738d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141201
Reviewed-by: خالد حسني <khaled@aliftype.com>
Tested-by: Jenkins
|
|
The “system” font list is used for both actual system fonts and fonts we
add with AddTempDevFont(), so the caching makes loading embedded fonts
broken the first time the file is opened, requiring a next open without
closing the application.
The callers, I think, are careful not to call GetDevFontList() unless
they really want to refresh the font list, so the caching is probably
superfluous if not wrong.
Change-Id: Ie14cc473a64425fd5270bc65ffd61dea2d873cfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140840
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
With the previous commit, when we want the full font data we pass 0 for
table tag. This does not work with CoreText’s CTFontCopyTable(), we we
emulate it by using hb_face_builder to construct a full font from
individual font tables.
Change-Id: I0edb10982434872221466e9ec9ef9cd39087967a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140831
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I6f7c4508f7cef022eaf65a998cb242078d3771c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140826
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
It was used for subsetting, but we switched subsetting to a more generic
code path a while ago.
Change-Id: I6066b7697268e9444587d73810f9465488aa4740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140825
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Having it in SalGraphics is not necessary as the code now depends on
PhysicalFontFace for accessing raw font data, and this consolidates all
the near identical copies of this code into one.
Change-Id: I8a411f102fd2188a456bdeb8a0d794078d74e47b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139762
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
This is mainly to be able to get the font table data from the
PhysicalFontFace so that an actual font file or full font data are not
required (since they are not always available, e.g. with CoreText fonts).
This is slightly based on QtTrueTypeFont that this code replaces.
Change-Id: I6926706dfc6765076100ac0314a30f9ff970ddb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139760
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Avoids parsing “cmap” table again to get it.
Change-Id: I19eb882efd8c8aaaeb2fa770405ef2d69d985104
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139622
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
pWidths is always nullptr.
Change-Id: I1c666f146865786269e9513cbb6c8ffdc7df96e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139461
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: Iec8974d6fc67d9d599c5e92aa325225963da0021
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139459
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Every time I need this file, I had to lookup the file name and location.
Rename it following the pattern of other font classes and move the
header next to their headers.
Change-Id: Ia1e3ee4be9375c1110e169c593e1f8e7aad39c76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139446
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
All subclasses are doing the same thing in slightly different ways, so
move it to the base class that we can now access font tables there.
Change-Id: I1f8827dbc345aa852e1f7aaaa4cb4615593289c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139395
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
All subclasses are doing the same thing in slightly different ways, so
move it to the base class that we can now access font tables there.
Also drop unused PhysicalFontFace::HasChar().
Change-Id: I77022b4dc3688de2788c18966f39f407a6abb730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139340
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
The two map to each other, and we want to access hb_face_t to provide
some functionality scattered currently in platform-specific
implementations.
Change-Id: Ib3842752ec240b8254db828dba95a6a0ad65f16a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139275
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Without this we will be using the interpolated outlines (done by core
text) but apply OpenType features from the default instance.
Change-Id: I7a39b5483ba0f35b440841ffa07f587ad966bbf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139248
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|