Age | Commit message (Collapse) | Author |
|
Change-Id: I858832a41ef140fa9916e05548edf2df6b0af451
|
|
No need to keep a fonts array around; we don’t modify the glyph array in
anyway so we can just query the CTLine directly.
Change-Id: I24fd49b8fcc8391de7fe132db60bc81bc9941a81
|
|
isVerticalRun is not used anywhere, remove for now.
Change-Id: I29a9650e3031dc1faaacd13f4aa9fefe661edaa7
|
|
The secondary caret is a special caret that is inserted when the text
changes its direction e.g. between an RTL and LTR segments, not
whatever who wrote this code thought it is.
This should now be more or less the same as ATSUI version (for better or
worse), though it probably makes no difference anyway since
GetCaretPositions(), despite its name, is *not* used for determining
caret positions but only for drawing mnemonic underlines, and we don’t
draw any menus by ourselves on Mac.
While at it, adopt variable naming used in the rest of the code (not the
spacing, though. Why any sane person would want no space before opening
parenthesis and space after it!).
Change-Id: I3e8d1db33c899d0c69f65b57f0a52d10cbed1025
|
|
Change-Id: Id10519547445b5e67d3328a82909f85f9de83a80
|
|
No more jumping and spaces between text runs are not eaten, but text
selection is still broken, as well as editing.
Change-Id: Ic9d2a6df0add20b63d6edf0ddf84b7d6f8de0983
|
|
Core Text will apply its font fallback mechanism when typesetting a
CTLine, and we can't assume that the returned run all use the original
font. This fixes the random glyphs drawn when we hit font fallback.
Change-Id: Id4d7098cb7bd3464cba6abab22be3ac3942c8889
Reviewed-on: https://gerrit.libreoffice.org/3846
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
|
|
Change-Id: I31b95844234135d14f117ae74124350eedf7d20a
|
|
It should have been nExtDescent + pMetric->mnDescent, but then the whole
thing does not make any sense; why add the descent to the leading and
then calculate the leading by subtracting the descent! (well, the ATSUI
code was doing this but it makes no sense either).
Just use CTFontGetLeading() directly.
Change-Id: Ia54648f6c02c11359865f4aa6476adf40b27f906
|
|
Change-Id: Id8b9bec79e5673db738e16905eacd8e84cea89e1
|
|
Need to pass the whole pixel buffer to CGBitmapContextCreate().
Change-Id: Iadac7dc3e63c29e5d0cc328b2e2a1f10824248a6
|
|
Change-Id: I04c715e88ee79aa639c10f2a39d303eecdbd3962
|
|
Change-Id: I37472b779f0e455892f4fe2cfe93023c14335400
|
|
Change-Id: I444673fc46699512be0830fba94f752a5ccf619c
|
|
Disregard trailing whitespace from the target width when justifying.
Justifying can change the number of glyps (especially with complex
scripts).
Now it works much better than before. Still a small amount of
character dance.
Change-Id: I7ca87e6c767ada257cc072d1dfbbe3f7d4354e42
|
|
Sure, not that useful in this case (where it is quite obvious anyway
that the class is not derived from), but just to verify that the
SAL_FINAL thing works.
Change-Id: Icef6eb64e278354694145bf98f02b9ffe5db7da7
|
|
Drop GetGlyphOutlines() which is not used, does not override any base
class function, and was even declared virtual even if there are no
derived classes.
Drop the dummy InitFont(), the equally dummy one in the base class is
good enough.
Also, put the overridden base class functions in the same order as in
the base class. Improves code readability and understandability.
Change-Id: Ia041ebaafae6c30cff18e00ee56f221e2f49b3e7
|
|
Change-Id: I18cb4e00b86e25f299b897a1a71c1d7d68d8309d
|
|
There are still problems related to the handling of trailing spaces in
CTLines for instance.
Change-Id: If02fa5d711c2cde2d8aaf8f061f5d9f077d421f4
|
|
Change-Id: I5ef28eaac8eacd24f209617d68dfa23e0388bb1a
|
|
Change-Id: I83ffefff08fbda920d7394df336671861fcb18f7
|
|
Change-Id: If878ae08131ab425ea958f54fc0bd5a07fc76881
|
|
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
|
|
Change-Id: Ifa07f9b5613b4a75c5b72178cb276b9c0b495a62
|
|
The end result is still not satisfactory but it is getting closer.
Oh how nice it would have been to have some clean useful documentation for how
the text layout machinery works. The number of entry points in the low-level
"backends" (like CoreTextLayout) is quite small, so I doubt it would have
required lots of text to document the "protocol" used between the upper layers
and the layout machinery. Now one just have to use educated guessing aided by
lots of debugging printout. But this is true for most of the codebase, of
course.
Change-Id: I791f190819a187418865279f6a5b4aa598e01d3c
|
|
Change-Id: I184c8c69f4a9afdb0019193b09f61c65e47d36ae
|
|
Change-Id: I89040b62c0961be160fcfaa793e48326fa7a584c
|
|
Change-Id: I9373647e5d710acb26c9818e6d06d4bfb862a7df
|
|
CTLineGetImageBounds() does not include space taken by trailing whitespace in
the line.
Change-Id: I403906daed952bac58fa11634beb6c7faa39b9b3
|
|
But like there, I don't know if it actually is needed or not.
Change-Id: I25bf5d8cf160b56ee4deb47ab9774313eb9590c8
|
|
Change-Id: I6f185b4f55418e44956f9dd51e1e300f553ac355
|
|
Change-Id: Ie98d242777cec92db6512f53fe102ecc65dc469c
|
|
Change-Id: I6497550e8f55f9ba08b0c4f20de0ea04be45d617
|
|
Change-Id: I1d0963f51472328a1a5b212ab277c6e72fafd7b9
|
|
So no point in checking font *family* names like "arial" or
"times". Actually, I doubt this whole block of heuristics is
necessary.
Change-Id: I6965c27a7c4bed53db0e7ddaa40b1d09ccc4ad43
|
|
Change-Id: I938b512dc3a32af9f2529a92ea3e4291abf64ad2
|
|
As its name says, CFDictionaryGetValue() follows "The Get Rule",
i.e. you don't have ownership of the object returned, so it shouldn't
be released.
Change-Id: Ie605ac21754ed479911d8f4ceb00744a6df600aa
|
|
Change-Id: Ia3e12d68c0eef56ba32b2c6062448874a52a8df3
|
|
Change-Id: Ic0fd7d60ddc66bcd5577988b3a4e5b2185d3ec1f
|
|
Change-Id: I127f450ae7c52f25033a6dbc34029545ea5ed07b
|
|
Change-Id: If543e44a1f4aa08a38bf273a3e50a7cd7d57e84d
|
|
Change-Id: I13a407331184f08fd39095b7486d0a370d91ed93
|
|
Don't try to use similar code as for OS X to manage windows, events
etc. I.e. don't use UIKit in vcl to do that. Instead, just do as in
the Android port, use the "headless" vcl backend. Do keep using
CoreText, though, not FreeType & fontconfig.
Start changing the iOS "Viewer" app to correspond to the Android
"desktop" app (so it should be renamed).
Work in progress since a long time, several crucial details still
missing, but committing for now.
Change-Id: Iac5fbf8def415e4d0d21e5200450a373420ad7ee
|
|
Change-Id: I3d0e2015e4c9f0ea6118fd92892022607fe4bde6
|
|
Change-Id: I1d97ba1cc643fb1c940b94e84e348812efae115b
|
|
Change-Id: I65e68de95ff30b74fe7052dc4a7429d49536b564
|
|
It no longer gets stuck in a loop so easily.
The key thing I realized was that there is a fundamental difference to
how the ATSUI and CoreText APIs handle text buffers and the start
offsets into them:
ATSUCreateTextLayoutWithTextPtr() takes a pointer to the whole buffer,
plus start offset and length. These are stored as part of the layout
object. Other ATSUI calls that use the layout object interpret index
parameters as relative to the buffer start, not relative to the start
offset of the layout object.
CTTypesetterCreateWithAttributedString() on the other hand takes an
attributed string that has been created from a CFString that already
is based on a potential substring of a buffer. I.e. the CTTypesetter
has no knowledge of the original buffer. All index parameters are
relative to that substring of the buffer, as are return values.
Change-Id: I7026f323d90a72e1ae1784a69f521e347baffaea
|
|
The CoreTextLayout class is clearly based on the ATSLayout class, so
in order to make it easier to compare code of the two, rename fields
back as they are in the latter. Also add the corresponding comments
where applicable.
Once the CoreText code fully works and has superseded the ATSUI code,
sure, we can change field naming convention if we want.
Change-Id: I0d47ad0206fa895339506471bb638bd04f426490
|
|
Nominally renamed the AquaSalGraphics class to QuartzSalGraphics, as
it isn't now then "Aqua" (Mac OS X) specific any more.
Actually, for Mac OS X, because lots of code in vcl/aqua expects it to
be called AquaSalGraphics (just like the alternative class used when
using the obsolete ATSUI API on Mac OS X), use a #define to make it
still be called AquaSalGraphics to the compiler's eyes. For iOS it can
be called QuartzSalGraphics.
|