Age | Commit message (Collapse) | Author |
|
CTFontCreatePathForGlyph() will return NULL for blank glyphs causing
CoreTextStyle::GetGlyphOutline() to return false which propagated as
error all the way to OutputDevice::GetTextOutlines() causing it to
needlessly enter into fallback code. Other implementations just return
true and an empty polygon here.
Change-Id: Ib20ebff00f7cb3aae22f1c6b4c3a0e9d7a429987
Reviewed-on: https://gerrit.libreoffice.org/31902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
No more cleverness.
Change-Id: I760c602802961b37728c6987c4ade14fb02ca034
Reviewed-on: https://gerrit.libreoffice.org/31819
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Change-Id: I747d969c3c1dc42b1a3b5d12d06fed3af9a64675
Reviewed-on: https://gerrit.libreoffice.org/31818
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Change-Id: I00485dd4d42004e4eaa163a9e6ad0a43cf98a30a
Reviewed-on: https://gerrit.libreoffice.org/31816
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Change-Id: Ic0dd8c0311161271817eb9a3f454d00a319e43a8
Reviewed-on: https://gerrit.libreoffice.org/31814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
We have this nice structure that contains (almost) all the information
we need, so pass it around instead of passing separate fragments of said
information.
The ultimate is to kill the horrible sal_GlyphId hack if encoding
various bits of information in the higher bits of a 32-bit integer.
Change-Id: Ie496bb4c2932157527a388e2a94e46bf0a325a70
Reviewed-on: https://gerrit.libreoffice.org/31781
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
and remove the XPolyFlags enum, which has the same values and was being
converted to PolyFlags anyhow
Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41
Reviewed-on: https://gerrit.libreoffice.org/31627
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Icd317671a6b1b5356f0ccc7c59d50952fe20269b
Reviewed-on: https://gerrit.libreoffice.org/31667
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idfc964930c242d752a78cd109d75d809bce4de11
Reviewed-on: https://gerrit.libreoffice.org/31470
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
The only remaining user is EmbeddedFontsHelper, and it just needs the
raw font data.
Change-Id: Ia15c59158b5c9e44d0936463553303a3c8b6e0f5
Reviewed-on: https://gerrit.libreoffice.org/31374
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Change-Id: Id706fa242277a0ea7ba44f52eab4a56e404bd2fa
Reviewed-on: https://gerrit.libreoffice.org/31372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
These flags mean nothing these days, there are either always true or
always false, since we no longer support bitmap or Type 1 fonts.
Change-Id: Ie14ca480225a6346d868a44e58e7666c3a06931d
Reviewed-on: https://gerrit.libreoffice.org/31346
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Change-Id: If80d65899255d8be72f374fbec232d103a08a006
Reviewed-on: https://gerrit.libreoffice.org/31232
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Kill DrawServerFontLayout, and rename DrawSalLayout to DrawTextLayout,
in parity with GetTextLayout.
Change-Id: I3f61efd8c6ecde64f28301dca6a7c91eb0873702
Reviewed-on: https://gerrit.libreoffice.org/31224
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
We current use platform APIs to calculate line spacing, however
different platforms behave differently:
* FreeType and Core Text will prefer hhea table over OS/2, and OS/2 Typo
metrics over Win ones.
* GDI’s TEXTMETRIC only uses OS/2 Win metrics, while NEWTEXTMETRIC seems
to use Typo one, but we use only the old TEXTMETRIC.
So we get inconsistent line spacing and we have no control which of
three competing sets of line spacing metrics we end up using.
The current conventional wisdom is that:
* hhea metrics should be used, since hhea is a mandatory font table and
should always be present.
* But if OS/2 is present, it should be used since it is mandatory in
Windows.
OS/2 has Typo and Win metrics, but the later was meant to control
text clipping not line spacing and can be ridiculously large.
Unfortunately many Windows application incorrectly use the Win metrics
(thanks to GDI’s TEXTMETRIC) and old fonts might be designed with this
in mind, so OpenType introduced a flag for fonts to indicate that they
really want to use Typo metrics. So for best backward compatibility:
* Use Win metrics if available.
* Unless USE_TYPO_METRICS flag is set, in which case use Typo metrics.
This patch does this by reading the hhea and OS/2 tables directly and
implementing the algorithm above.
Quick comparison with Microsoft Office 2016 shows similar line spacing
as the new line spacing here, so I guess we are improving compatibility
as well.
Change-Id: I4541e67e3e14508e3529e73083056a09de02e637
Reviewed-on: https://gerrit.libreoffice.org/31053
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
Apply font rotation when calculating glyph bounding rectangle.
Change-Id: I9c533ec3b33a5858d46b60d1700a50d3b6f915a4
|
|
Rotate only the rotated glyphs instead of rotating everything, then
unrotating the upright glyphs. No need for a rotated font either,
rotating the graphics is fine.
Change-Id: I1fce2c9c6a29abb1353a5fc8485a9c0d34edfbf1
|
|
Change-Id: I55db5ba855b8d72e9be0298a68b094c7b01d9f54
|
|
Change-Id: Ief0942e7e3dfb7a550bcd1de99e4630831438c86
|
|
Change-Id: Ia54f11b799fefcddcbf3b9f49e806bfc0895773f
|
|
Otherwise we might not get any Kashida justification at all.
Change-Id: I6521d5a267392314d5d0da84b93fcd80c7b7cc57
|
|
The Y sign should be reversed to match VCL, apparently it was either
unused on macOS before CommonSalLayout or it was wrong all along.
This was the source of CppunitTest_svgio failure on macOS with
CommonSalLayout.
Change-Id: I3108aab7b6780c912e86e5591ca0f41ea437137b
|
|
Don’t list fonts we can’t handle, bad things would happen…
Change-Id: Ic88486e34da69090deb3e8c394cb75a8e4e5cbd0
|
|
Slightly cleaner code and now handles glyph rotation for vertical text.
Change-Id: I98cc8fd7df5e73068294e4d7dd6b38a71dcbdcc7
|
|
Change-Id: Ifd26b7f14ed77a3aa2a38e5961cac5f9bbb6d796
|
|
Makes it easier to flip the switch in the future (or even do something
more fancy other than checking envvar).
Change-Id: Ie42ca012c167b2108f0fca1ce9ff7beee95f1be7
|
|
We now create it only once per physical font, saves us few percents from
the all over time spent on layout.
Change-Id: I8de582cb20a168c93d72921e539c2477fa97fb54
|
|
Cache hb_face so it is not created again and again.
Switch from GDI to DirectWrite on Windows to obtain SFNT table data.
Change-Id: I9c532cd72e1f6b57313f3b7d42a6b9b0633eb0ef
|
|
Change-Id: I07a9c956f09be5d43ee58ff0784ba0f81f52cd9a
|
|
Modify the definiton of the DrawServerFontLayout method.
Add new DrawSalLayout method which will be used for drawing text
independent of the platform.
Change-Id: Ie3eefb172b1781c685def1ef549db2538f672a62
|
|
Change-Id: Ic11e573da2f5fd6ef931f53ab674f8894815c3b4
|
|
Conditional statements are using SvRef::Is() method.
Changed static_cast<T*>(svRef<T>) occurances to svRef.get().
Added operator == and != to SvRef.
SbxObject::Execute is using SbxVariableRef internally.
SbxObject::FindQualified is using SbxVariableRef internally.
Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395
Reviewed-on: https://gerrit.libreoffice.org/29621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is a blind fix attempt to fix "Freeze when first action after launch with OSX Sierra with iMac 5K"
I started from bt:
frame #9: 0x00007fffbe094cf6 CoreGraphics`CGContextDrawPath + 183
frame #10: 0x0000000102b16cda libvcllo.dylib`AquaSalGraphics::drawPolyLine(unsigned int, SalPoint const*) + 330
frame #11: 0x0000000102929039 libvcllo.dylib`OutputDevice::drawPolyLine(tools::Polygon const&, LineInfo const&) + 361
frame #12: 0x0000000102928d30 libvcllo.dylib`OutputDevice::DrawPolyLine(basegfx::B2DPolygon const&, double, basegfx::B2DLineJoin, com::sun::star::drawing::LineCap, double) + 768
(see https://bug-attachments.documentfoundation.org/attachment.cgi?id=127502)
then:
http://stackoverflow.com/questions/32871234/how-to-make-kcgpathstroke-work-in-swift-2
which advises to replace:
CGContextDrawPath(ctx, kCGPathStroke)
by
CGContextDrawPath(ctx, .Stroke)
and finally this:
http://stackoverflow.com/questions/37838578/how-to-stroke-a-cgpath
which advises to directly use this:
CGContextStrokePath(context)
Change-Id: I99f9800c39f18d16488f7ef4114a71722f9b8123
Reviewed-on: https://gerrit.libreoffice.org/29194
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ica137897f02c5caa4c4891f75531ada3957025d9
|
|
Change-Id: I7a1e4448dfff0ea6909149533d228829d980796c
|
|
Change-Id: I4c913dc62efe3f3747e78670f4efb0216d95c4ad
Reviewed-on: https://gerrit.libreoffice.org/28585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
I think it's best to not use cairo on iOS, even if we do use it on
Android. We probably want to use native APIs for the functionality
that cairo would provide. Just like we do on OS X.
No idea whether the resulting TiledLibreOffice will still work like it
used to in May last year, when I last tried.
Change-Id: Ie15cad6918d7a66e2aff7faabfcade7f3246b060
|
|
Change-Id: I78513a531f93f6578290107b1d71977820dac965
|
|
Change-Id: I34fc490407f2bdac036dced5360b438ffb1cb4e2
|
|
Change-Id: Iac827fd102404ae615dfd1685886010e949ff653
|
|
Change-Id: I732fb1a789f90ca7a7f393cc41a6afe84fecf3d3
Reviewed-on: https://gerrit.libreoffice.org/26200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I4ac1bb25d3d63f150b42d9e1708efc344bbdb6a7
Reviewed-on: https://gerrit.libreoffice.org/26113
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I901e5de3e4e25f0cae5c71d6e83fd94459fe7b7e
Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/21951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: jan iversen <jani@documentfoundation.org>
|
|
This was already using get() everywhere.
Change-Id: I6d1eee4fe9b0494a1c49ac44917d9fc7c22b43a4
Reviewed-on: https://gerrit.libreoffice.org/25470
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
The getTTCoverage either leaves the bitset empty or inits it with 128 bits,
so it's not particularly dynamic.
Change-Id: Iac0aa6a023acc54da86d681e75ca550faf91ef26
Reviewed-on: https://gerrit.libreoffice.org/25456
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I751ab762b6e6f961e9e73a8a2ca92a3f5a5eb1c8
Reviewed-on: https://gerrit.libreoffice.org/25189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I0f2b86f0a34e257d00856ce4f1dbbb1869ec967a
Reviewed-on: https://gerrit.libreoffice.org/25208
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
and remove clear() on std::vector types in ctors
Change-Id: I8e239676d46e30049d4d5886a5b8de99cadd3f45
Reviewed-on: https://gerrit.libreoffice.org/24983
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I25d7c76462699e0f206e622841744fef9527108b
|
|
Change-Id: Iaaef4d90d7fe817a32cd51652d41c2e49c8909a4
Reviewed-on: https://gerrit.libreoffice.org/24832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|