summaryrefslogtreecommitdiff
path: root/vcl/quartz/ctlayout.cxx
AgeCommit message (Collapse)AuthorFilesLines
2016-11-26Kill old Core Text layout engineKhaled Hosny1-787/+0
Change-Id: If80d65899255d8be72f374fbec232d103a08a006 Reviewed-on: https://gerrit.libreoffice.org/31232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-18Support font fallback on macOS for CommonSalLayoutKhaled Hosny1-5/+1
Change-Id: Ifd26b7f14ed77a3aa2a38e5961cac5f9bbb6d796
2016-10-18Check SAL_USE_COMMON_LAYOUT envar in one placeKhaled Hosny1-1/+1
Makes it easier to flip the switch in the future (or even do something more fancy other than checking envvar). Change-Id: Ie42ca012c167b2108f0fca1ce9ff7beee95f1be7
2016-10-18GSoC: Integrate new CommonSalLayout in quartz/ codeAkash Jain1-2/+6
Change-Id: I07a9c956f09be5d43ee58ff0784ba0f81f52cd9a
2016-09-14loplugin:overrideStephan Bergmann1-1/+1
Change-Id: Ica137897f02c5caa4c4891f75531ada3957025d9
2016-08-14loplugin:overrideparamStephan Bergmann1-1/+1
Change-Id: I78513a531f93f6578290107b1d71977820dac965
2016-08-08loplugin:overrideparamStephan Bergmann1-3/+3
Change-Id: I34fc490407f2bdac036dced5360b438ffb1cb4e2
2016-06-17convert DBG_ASSERT in vclNoel Grandin1-1/+1
Change-Id: I732fb1a789f90ca7a7f393cc41a6afe84fecf3d3 Reviewed-on: https://gerrit.libreoffice.org/26200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-22vcl: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl1-17/+18
Change-Id: Ia5e5349e879d46d6a57b7b83b31346766c11c58b Reviewed-on: https://gerrit.libreoffice.org/21662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-10vcl: promote ImplFontAttributes to FontAttributesChris Sherlock1-1/+1
ImplFontAttributes is no longer merely a pImpl (or "compilation firewall", take your pick) but is a fully fledged class in its own right that is used by a number of classes, including FontSelectPattern, LogicalFontInstance and PhysicalFontFace. Thus I'm "promoting" the use of this class in the codebase. Change-Id: I26866080a64796978d1c25efbcd16e3e6f94aaa5 Reviewed-on: https://gerrit.libreoffice.org/21305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-10vcl: (OS X only) Change CoreTextFontData to CoreTextFontFaceChris Sherlock1-1/+1
The base class is called PhysicalFontFace (I believe it was called something like ImplFontData or somesuch before it was changed), and it is really primarily used to provide a factory function to create the logical font instance that LibreOffice can use (i.e. we distinguish between "physical" and "logical" fonts - as physical font is the actual font installed on the system, and the logical font is the one we ask for and have mapped to the physical font face). I also want to provide naming consistency in the class heirachy to enhance code readability, so that's another reason I've changed this class name. Change-Id: Ib7f23da1e3a1db59f4d04f5bb096f490e2958a4b Reviewed-on: https://gerrit.libreoffice.org/21299 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-31vcl: merge ImplDevFontAttributes with ImplFontAttributesChris Sherlock1-1/+1
ImplFontAttributes handles device independent data, whilst ImplDevFontAttributes handles device dependent data. However, there is no real reason for the divide in classes, and in fact I'm not at all a fan of using a pImpl directly - sort of defeats the purpose of having one! Change-Id: I2db22727e3479b14e3bc37dfad9136703bbdeb13 Reviewed-on: https://gerrit.libreoffice.org/21018 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-11-17Don't assume sal_Unicode is unsigned shortStephan Bergmann1-2/+2
Change-Id: I7a741130689721c69fd2879be6bda27fc6ec3646
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann1-15/+15
Change-Id: I90a955eb3e485723bb81e7164edcf60f7b0e94c7
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-16/+16
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-07afl-eventtesting: creating OUString from super long sal_Unicode* is slowCaolán McNamara1-3/+6
the mpStr and mnLength arguments are always created from an OUString and the OUString aRun(rArgs.mpStr); creates a duplicate of the original string. Its way faster to pass the original OUString around instead. Change-Id: I3de0cc31654eb215362548b6aee435f9c0c3c9db Reviewed-on: https://gerrit.libreoffice.org/19221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-12cosmetic: clean-up vcl/quartzNorbert Thiebaud1-4/+14
Change-Id: I6f15e7ce90598eb4f8e7bb59c7c65d1aa333b972 Reviewed-on: https://gerrit.libreoffice.org/17661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-07-04tdf#88941 Revert "vcl quartz: Add support back for DXArray tweaking"Norbert Thiebaud1-210/+60
This reverts commit 4a0cb642f18b674f37db8e9bd30942740df08e4c. MacOSx only (more exactly CoreText only) The handling of DXArray was buggy and need to be re-worked so this revert to the previous case where DXArray are esssentially ignored at the char level and only kept at the fragment size level and used to redistribute space in a fragment This create some issue too but on more esoteric case than the one noticed in tdf#88941 Change-Id: Icb33d0600267c3136f3a6b15de8ecd739898ce04 Reviewed-on: https://gerrit.libreoffice.org/16747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-05-24tdf#87373: Bad text spacing on OS XThorsten Wagner1-18/+42
Adjustments to character positions less than one pixel are ignored. These adjustments are probably introduced by lossy conversions between integer based and float based coordinates. DXArray elements are adjusted to integers avoiding cummulated rounding differences. Change-Id: I65d476301247251a7d329b14adb70be367538c97 Reviewed-on: https://gerrit.libreoffice.org/15633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2015-05-20convert SAL_LAYOUT flags to scoped enumNoel Grandin1-10/+10
Change-Id: I0aeea1f32136e43e90a1afb0ea84dbaff2b77587
2015-05-04Revert "Fix tdf#87373: Kerning broken on OS X"Khaled Hosny1-29/+20
This reverts commit bec8fc58a827c220b3f28462ae127cc1c571d1bf. It does not really solve the bad spacing issue and it broke handling of trailing whitespace in right-to-left text.
2015-04-27Fix tdf#87373: Kerning broken on OS XThorsten Wagner1-20/+29
Adjustments to character positions less than one pixel are ignored. These adjustments are probably introduced by lossy conversions between integer based and float based coordinates. Change-Id: Ie4506658aba7bb3e2b211817568676b099afef03 Reviewed-on: https://gerrit.libreoffice.org/15539 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin1-7/+7
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-03-29loplugin:cstylecastStephan Bergmann1-7/+7
Change-Id: I999ec56219a7d9a9dc8c1e9310cc74dccd0ac099
2015-02-24TyposJulien Nabet1-1/+1
Change-Id: I5f2577dd1f047331a58d33e05684b673e6dbd11e
2014-12-04vcl (Mac): loplugin:cstylecastStephan Bergmann1-2/+2
Change-Id: Ic46623380f026a8dfcc74c895db35a06bcea1ead
2014-12-03fdo#85806: Hebrew and Arabic is not working on MACgalbarnissan1-7/+7
Change-Id: Id4476a041eb539d0b9c1227070289d34a939c6f6 Reviewed-on: https://gerrit.libreoffice.org/13288 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini1-1/+1
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-30address LTR issue with coretext renderingNorbert Thiebaud1-34/+18
There was a snaffu with the handling of DXArray concerning the special case of the 'first' character and how that translate when the glyph order is not the same than the character order Change-Id: Ie9273ff22fa2d22ca0df2b583768ffb2b2a59930
2014-10-16MAC_OS_X_VERSION_MAX_ALLOWED is always >= 1080 nowTor Lillqvist1-18/+2
Change-Id: Ieae67cbf917cdf4bca2b0d6c1697eddc6137dbe2
2014-09-12Revert "vcl: use DeviceCoordinate for GetCaretPositions in sallayout"Norbert Thiebaud1-5/+5
This reverts commit 1b42acdaeae134f94580d6e1eba89da16741d596.
2014-09-12vcl: use DeviceCoordinate for GetCaretPositions in sallayoutNorbert Thiebaud1-5/+5
Change-Id: I5a959e1c3806da713e106c1b0fc8690a6578987b
2014-09-03fdo#82818 vcl macosx. fix asian vertical ctlayoutNorbert Thiebaud1-109/+153
Just revert ot regular CTRunDraw in that case and adjust 'ullet' displaying. Change-Id: I9ef80f5985b8c7610fcc8e9e8acd5b27542f8730
2014-09-03extra witdh for GetTextBreak is of DeviceCoordinateNorbert Thiebaud1-2/+2
Change-Id: Ic25eae1e9b8ae14022ee8d0373be0978ebc21267
2014-09-03SalLayout GetTextWidth return DeviceCoordinateNorbert Thiebaud1-12/+4
Change-Id: I5b995e54992213e95845e60169238270863e9a7e
2014-08-14GetTextBreak takes a DeviceCoordinate as widthNorbert Thiebaud1-4/+10
Change-Id: Ie03732a0966eedf6c0226beed83356ae4886a016
2014-07-20vcl mac SDK issue with API manipulating RectNorbert Thiebaud1-1/+1
Change-Id: Icad89fe16e428a5e4d87ab4b19131bdd804528b7
2014-07-20vcl quartz: restore old outline front drawingNorbert Thiebaud1-1/+2
Change-Id: Idc2026ff65dfaf36ea4be21ae9557cf5534e8c6b
2014-07-20vcl quartz: Add support back for DXArray tweakingNorbert Thiebaud1-125/+246
The CoreText implementation dropped the support of DXArray more exactly ignored the values provided in it. And try to approximate the result by assuming that all it does is full justification... which is not quite right This ut the feature back, buy handing the glyph drawing directly, rather than defering to CoreText CTLineDraw to control the position of each Glyph Change-Id: Ibe0cfe789d3be441c012d8ac1104d939204a591c
2014-07-20vcl quartz use the font size to approximate the position of the bulletNorbert Thiebaud1-1/+4
Change-Id: I00bf83c82814cd3d215bda361a14eb01836e2d0a
2014-07-20vcl quartz: draw 'bullet' manually for better controlNorbert Thiebaud1-42/+36
Change-Id: If0f6bd93adc5d39fd421bb482833619f85f7a461
2014-07-20vcl use DeviceCoordinate got GetNextGlyphsNorbert Thiebaud1-2/+2
Change-Id: I0b03973b2d09a0ce51a6ee7dcca5a310a544c3a9
2014-07-20vcl consitent use of long for corrdinateNorbert Thiebaud1-4/+4
most of length in vcl are calculated in 'long' but array of X position tend to be in sal_Int32. As a prep work to be able to support 'double' as the base type of Device Coordinate, harmonize the use of 'long' for non-float coordinate. Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
2014-07-20Use DeviceCorrdinate for DXArray in FillDXArray and ImplLayoutArgsNorbert Thiebaud1-3/+3
Change-Id: Ifba7104a13cf737200c81d1a1bd5ece9a29da60e
2014-07-15fdo#79673 quartz: draw 'bullet' for 'space' directly in one passNorbert Thiebaud1-0/+54
the current implementation of CoreText simply dropped the proper implementation of DrawTextArray, by ignoring DXArray this very visibly borked the show-non-displayable character feature of writer.. the bullet representing the 'spaces' was quite misplaced. This solve specifically this problem. More work is needed to bring proper support of DXArray back to CoreText Conflicts: vcl/inc/sallayout.hxx vcl/source/outdev/text.cxx Change-Id: Idb2cc90d5ffaa8b83f79241cee2d512112d1c3be
2014-07-07Add a few more SAL_INFOsTor Lillqvist1-0/+7
Change-Id: Id379c88c8a8c16f5276568e2bdb5f3730855255f
2014-06-03Related: #i125020# fix the calculation of the text-update rectangle...Herbert Dürr1-7/+9
in CoreText by doing the calculation before CTLineDraw() updates the text position. Requesting the update early is possible because that update region is not used until AquaSalInstance::Yield(). (cherry picked from commit ee042661b996fd00d5504caf4f4be60f77bf880f) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db
2014-06-03Resolves: #i124935# fix expanded/condensed text breaking...Herbert Dürr1-8/+27
in the CoreText engine the concept of an extra-width per code-unit was obsolete at least since apps supported unicode with its different normalization forms, diacritical marks, surrogate-pairs, non-printing characters such as ZWJ/ZWNJ/RLM, etc. so of course modern engines like CoreText don't aid this typographical crime. The fix here extends the CTLayout::GetTextBreak() method to handle the obsolete semantic of per code-unit extra-widths by successively approximating the number of involved code-units. (cherry picked from commit a9b9ceff86f35be1eeff5f251d24e338db760a1e) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: I52a7f7488a9e8a303ed7271df2a24a3c85098ce3
2014-05-29Resolves: #i124922# allow late setting of the font color...Herbert Dürr1-1/+8
for CoreText-layouted text (cherry picked from commit 42f9768f771457c53a9f1e6a3581b2df9856401f) Conflicts: vcl/aqua/source/gdi/ctfonts.cxx vcl/aqua/source/gdi/ctfonts.hxx vcl/aqua/source/gdi/ctlayout.cxx vcl/source/gdi/outdev3.cxx Change-Id: Ie2685ab80ca87ea72e25f18d02f883fb36c24a36
2014-05-23Add SAL_INFO tracing for CoreText callsTor Lillqvist1-0/+14
Change-Id: Ie60e0b64a2d9d8a045cb3c59fc781d6f9b2808a0