Age | Commit message (Collapse) | Author |
|
This change implements layout for font-relative paragraph first-line
indentation in Writer.
Change-Id: Ie8f386bcc13a43ab92d5c15654c24bfdfc62bd69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176216
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
|
|
Change-Id: Id152f7321bb81ecb17b31775277d1466ccd91ab4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176108
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: I5b6ee5bda0c5ff69d297f7f8e87d4c3f3d21791c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167470
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
... 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: Ifaa37246e79678aa0c548b9ca8a9faf8036b9195
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164804
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr
paths into a new TranslateId::getId. And demonstrate constexpr'ability by
making the aCategories var in OApplicationIconControl::Fill
(dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more
such cases that could now be made constexpr.)
Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I800806bc45f8eb9d99a49697fe6142cf93c0f322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157153
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I8fbe02547d5045cfdb5021720b10ddd10106209a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155750
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ide306f0656230460f976daef0ed213f734136030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155167
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Some PDF viewers might use glyph names to guess corresponding character,
and it also makes debugging the PDF output a little bit easier.
Change-Id: Ibe7f28d10814a9deb467129c85fed914fb7b3f9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140465
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
This change extracts the PNG data from the sbix/CBDT tables and embeds
them as PDF Type 3 glyphs. In case the font supports both color layers
and color bitmaps, the color layer take priority.
This also reverts the part of the following commit that allowed bitmap
fonts when creating font subsets because this is not needed now as the
such fonts will now not reach the subsetting code.
commit dcf7792da2aa2a1ef774a124f7b21f68fff0fd15
Author: Khaled Hosny <khaledhosny@eglug.org>
Date: Tue Aug 27 15:19:15 2019 +0200
Make Noto Color Emoji font work on Linux
Change-Id: I350ec97956f37ae574956b22712869fd6d1a6990
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140457
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I66f96a305bb095716023ae1e565950971826bce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140242
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...to avoid CppunitTest_vcl_fontfeature
CPPUNIT_TEST_NAME=FontFeatureTest::testGetFontFeaturesOpenType failing with
> vcl/source/font/PhysicalFontFace.cxx:376:48: runtime error: load of value 259, which is not a valid value for type 'NameID'
> #0 in vcl::font::PhysicalFontFace::GetName(vcl::font::NameID, LanguageTag const&) const at vcl/source/font/PhysicalFontFace.cxx:376:48
> #1 in vcl::font::FeatureCollector::collectForTable(unsigned int) at vcl/source/font/FeatureCollector.cxx:124:44
> #2 in vcl::font::FeatureCollector::collect() at vcl/source/font/FeatureCollector.cxx:198:9
> #3 in OutputDevice::GetFontFeatures(std::vector<vcl::font::Feature, std::allocator<vcl::font::Feature>>&) const at vcl/source/outdev/font.cxx:169:23
> #4 in FontFeatureTest::testGetFontFeaturesOpenType() at vcl/qa/cppunit/FontFeatureTest.cxx:143:5
after 06a23b7b4d23a31a4808c68f00e1be42d8218737 "vcl: Add
PhysicalFontFace::GetName()".
Per <https://harfbuzz.github.io/harfbuzz-hb-ot-name.html#hb-ot-name-id-t>,
hb_ot_name_id_t is a typedef for unsigned int, and per its referenced
<https://learn.microsoft.com/en-us/typography/opentype/spec/name> OpenType Name
IDs are apparently uint16 values covering the whole value range (e.g., "Name IDs
256 to 32767, inclusive, are reserved for font-specific names"). We could thus
presumably use something like std::uint16_t as the underlying type for NameID,
but lets play it safe (and avoid potential data loss when casting from
hb_ot_name_id_t to NameID) and simply use hb_ot_name_id_t as the underlying
type.
Change-Id: I50768c5ae6174500d959ba63fdbc15fe416f8777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140301
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I91cc7bd0b9c9ce8d59a31d17a354fb3f2be29499
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140219
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
It seems we need the values to be in unscaled font units not PS units.
Modify LogicalFontInstance::GetGlyphWidth() to return unscaled values
when requested and the TT-to-PS conversion conditionally in PDFWriter.
Change-Id: I94e7cdc0ecf842a0cf87fddaa4467966f698ae3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140126
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I9239085aabe450499193e74ac91d6a16437545c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140124
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: Ic221582a04982f0b1565089fa0beff1b34a749d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140123
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
The callers pass a path to a temporary file for the function to write
to, then they immediately read from it. This change cuts the unnecessary
use of temporary files and passes the subset font data around instead.
The CFF subsetting code really wants files and needs more invasive
change, so it still uses a temporary files but this is hidden from its
caller.
Change-Id: I2a2117e967b76fb903ff0d32c435925049bc6e56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140122
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
Change-Id: I9f22a63b912bbb2f12d9ff2d637cab0bb7c9707e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139789
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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>
|
|
Change-Id: Iddeccfc8ffd5e63f7df09219ac4507502011fb28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139626
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
And use it in a few places, particularly where we get glyph ID from
FontCharMap. We want to get the glyph indices from HarfBuzz like we do
for shaping, to avoid any potential discrepancy (e.g. a new “cmap”
subtable that our ParseCMAP() would not automatically support).
Change-Id: Ie80993b35f0586d8567b6bda0ea56ba453316e81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139578
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
It makes more sense for an emphasis mark to be an object that can be
queried, than it is for it to be a function with lots of output
parameters.
I have added a unit test, note that for now something doesn't seem right
with polypolygon equality checks (test fails, but the disc is generated
the same way) so not testing the shape creation.
Change-Id: I7597603419b69639b8d9764afdb68e266da7a56b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122601
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
To be used it in PDF export where we need the unshaped glyph width to
calculate PDF glyph adjustments.
Getting the advances from HarfBuzz instead of reading them font the font
makes sure we are always getting the correct values (e.g. when
using variable fonts, though we still don’t correctly embed them in
PDF).
Change-Id: I91365a1580d3848c2f93044adcb366fd01173155
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139462
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
This reverts commit fa1835db77b38047d8c3cea7041d38762c329867.
Reason for revert: merged too early
Change-Id: I7dba2e8fcc06db59b2cbc211a0f4e7d1f209aa05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139428
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
To get glyph width in font units (i.e. scaled at font units per EM), and
use it in PDF export.
First step towards dropping SalGraphics::GetGlyphWidths().
Change-Id: Ic0ef165e8aed6f94caf68bf01ef7ecc0620ce7c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139448
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>
|
|
They are small files, lets format before adding more code.
Change-Id: I5e8e7e4031f045cf6e124dd533e37ab67f34e985
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139394
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>
|
|
HarfBuzz handles this for us, and it more future-proof this way.
Change-Id: Ia8a65f0363a05c74a718a1a9f7d6df6c84373f46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138853
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
|
|
A bit heavy handed, but the only way to detect the number of alternates
a feature has is to get the maximum number of alternates for all lookups
in all glyphs of this feature, which is what this code does.
Additionally, for cvXX features, parameter names from the font are used
when available.
Change-Id: Ib7f7ea5e5288b47b03dac8703668ca6c4007f517
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138749
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
If the font provides feature labels for ssXX/cvXX features, fetch and
use them.
Switches also to using the UI language not locale for finding labels as
the UI language is what controls the UI localization.
Change-Id: Ic7eeae9df25692e7f2924b2db65905666999c904
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138748
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
We are not using the script or language information for anything, so we
can use HarfBuzz API to query the GSUB/GPOS tables directly.
Change-Id: Ie68c51a1662494ba33ec192edb78afa0d8added4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138745
Tested-by: خالد حسني <khaled@aliftype.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|