summaryrefslogtreecommitdiff
path: root/vcl/coretext
AgeCommit message (Collapse)AuthorFilesLines
2013-06-04Drop ENABLE_CORETEXTKhaled Hosny1-37/+0
This file is Core Text only already. Change-Id: Ic4c1f44296eaae582091e515d3ca1b4aa227301e
2013-06-04Use Core Text font manager instead of deprecated ATSKhaled Hosny1-33/+17
Change-Id: I660a895a227da3d28a0b410c56f2395961a5bc4f
2013-06-03Clarify headers.Michael Meeks3-52/+42
Change-Id: I125e4cacd94cd33d24cf1266967eb92906600cc4
2013-06-03Drop Core Text dynamic loading stuffKhaled Hosny3-141/+13
Our Mac OS X baseline includes Core Text. Change-Id: Icd2f0062d172db1d4393b2dd1eac4d9f55a88495
2013-06-03Get the new Core Text code to compileKhaled Hosny4-96/+43
Change-Id: I592158bd60afcbe756c6f0e11aa69a44768a0985
2013-06-03Cherry-pick Core Text port from AOOKhaled Hosny4-0/+2156
Manually picked from: http://svn.apache.org/viewvc?view=revision&sortby=log&revision=1480384 Author: hdu Date: Wed May 8 18:14:34 2013 UTC (3 weeks, 2 days ago) Changed paths: 55 Log Message: #i122195# add VCL support for 64bit OSX>=10.7 Change-Id: Ia799d7fdeb257e9bfd311338dcfdf97caf9d191f
2013-05-18Drop unused mpGlyphPositions arrayKhaled Hosny1-9/+1
Change-Id: I858832a41ef140fa9916e05548edf2df6b0af451
2013-05-18Simplify Core Text drawingKhaled Hosny1-32/+27
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
2013-05-18Remove unused variableKhaled Hosny1-7/+0
isVerticalRun is not used anywhere, remove for now. Change-Id: I29a9650e3031dc1faaacd13f4aa9fefe661edaa7
2013-05-18Fix Core Text GetCaretPositions()Khaled Hosny1-13/+18
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
2013-05-12WaE: private field 'mpGraphics' is not usedTor Lillqvist1-5/+3
Change-Id: Id10519547445b5e67d3328a82909f85f9de83a80
2013-05-11[coretext] Attempt to fix jumping linesKhaled Hosny1-32/+30
No more jumping and spaces between text runs are not eaten, but text selection is still broken, as well as editing. Change-Id: Ic9d2a6df0add20b63d6edf0ddf84b7d6f8de0983
2013-05-10[coretext] Fix drawing fallback fontsKhaled Hosny1-9/+38
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>
2013-05-09MinorKhaled Hosny1-2/+2
Change-Id: I31b95844234135d14f117ae74124350eedf7d20a
2013-05-09[coretext] Fix line spacingKhaled Hosny1-3/+1
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
2013-04-12Turn off subpixel positioning for nowTor Lillqvist1-0/+1
Change-Id: Id8b9bec79e5673db738e16905eacd8e84cea89e1
2013-04-12Use my improved understanding of what a subset BitmapDevice isTor Lillqvist1-7/+19
Need to pass the whole pixel buffer to CGBitmapContextCreate(). Change-Id: Iadac7dc3e63c29e5d0cc328b2e2a1f10824248a6
2013-04-12A bit more logging in DrawText()Tor Lillqvist1-3/+9
Change-Id: I04c715e88ee79aa639c10f2a39d303eecdbd3962
2013-04-11Log the stretch factor if different from oneTor Lillqvist1-0/+2
Change-Id: I37472b779f0e455892f4fe2cfe93023c14335400
2013-04-09WaE: unused variable 'lineRunGlyphStartIx'Tor Lillqvist1-0/+1
Change-Id: I444673fc46699512be0830fba94f752a5ccf619c
2013-04-08More fixes to the CoreText codeTor Lillqvist1-8/+12
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
2013-04-08Use SAL_FINAL hereTor Lillqvist1-1/+1
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
2013-04-08Use SAL_OVERRIDE and drop an unused member functionTor Lillqvist1-30/+23
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
2013-04-08Refactoring, no change in end resultTor Lillqvist1-63/+85
Change-Id: I18cb4e00b86e25f299b897a1a71c1d7d68d8309d
2013-04-08More hacking, still not working properlyTor Lillqvist1-64/+91
There are still problems related to the handling of trailing spaces in CTLines for instance. Change-Id: If02fa5d711c2cde2d8aaf8f061f5d9f077d421f4
2013-04-08Bin some pointless SAL_INFOsTor Lillqvist1-9/+1
Change-Id: I5ef28eaac8eacd24f209617d68dfa23e0388bb1a
2013-04-08Add SAL_INFO output operator for CoreTextStyleInfoTor Lillqvist1-0/+12
Change-Id: I83ffefff08fbda920d7394df336671861fcb18f7
2013-04-08Add SAL_INFO output operator for CTFontRefTor Lillqvist1-0/+16
Change-Id: If878ae08131ab425ea958f54fc0bd5a07fc76881
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák2-3/+3
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
2013-04-07Drop workarounds for Mac OS X SDKs 10.4 and 10.5Tor Lillqvist1-12/+1
Change-Id: Ifa07f9b5613b4a75c5b72178cb276b9c0b495a62
2013-04-07Create a justified line if asked toTor Lillqvist1-0/+11
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
2013-04-07We have just one element in these tablesTor Lillqvist1-2/+2
Change-Id: I184c8c69f4a9afdb0019193b09f61c65e47d36ae
2013-04-07Don't return in a (rare?) case without restoring the CGContext state stackTor Lillqvist1-1/+1
Change-Id: I89040b62c0961be160fcfaa793e48326fa7a584c
2013-04-07Use CGContextShowGlyphsWithAdvances()Tor Lillqvist1-5/+7
Change-Id: I9373647e5d710acb26c9818e6d06d4bfb862a7df
2013-04-07Take trailing whitesapce into considerationTor Lillqvist1-2/+9
CTLineGetImageBounds() does not include space taken by trailing whitespace in the line. Change-Id: I403906daed952bac58fa11634beb6c7faa39b9b3
2013-04-07Try calling RefreshRect() in DrawText() like in the ATSUI codeTor Lillqvist1-0/+24
But like there, I don't know if it actually is needed or not. Change-Id: I25bf5d8cf160b56ee4deb47ab9774313eb9590c8
2013-04-07Bin some #if 0 codeTor Lillqvist1-9/+1
Change-Id: I6f185b4f55418e44956f9dd51e1e300f553ac355
2013-04-07mpChars2Glyphs is unusedTor Lillqvist1-9/+0
Change-Id: Ie98d242777cec92db6512f53fe102ecc65dc469c
2013-04-06Move the SAL_INFO operator<< for ImplLayoutArgs to sallayout.hxx for re-useTor Lillqvist1-61/+0
Change-Id: I6497550e8f55f9ba08b0c4f20de0ea04be45d617
2013-04-03Ensure we have a CGContext in a couple of more placesTor Lillqvist1-3/+11
Change-Id: I1d0963f51472328a1a5b212ab277c6e72fafd7b9
2013-04-03It's the font *style* we are looking at hereTor Lillqvist1-16/+12
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
2013-04-03Add missing breakTor Lillqvist1-0/+1
Change-Id: I938b512dc3a32af9f2529a92ea3e4291abf64ad2
2013-04-03Fix heap corruptionTor Lillqvist1-1/+0
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
2013-03-26Remove unnecessary code that was based on a wrong guessTor Lillqvist1-17/+0
Change-Id: Ia3e12d68c0eef56ba32b2c6062448874a52a8df3
2013-03-26Handle different basebmp scanline formats and flip vertically when neededTor Lillqvist1-4/+30
Change-Id: Ic0fd7d60ddc66bcd5577988b3a4e5b2185d3ec1f
2013-03-26Try kCGImageAlphaNoneSkipLastTor Lillqvist1-1/+1
Change-Id: I127f450ae7c52f25033a6dbc34029545ea5ed07b
2013-03-26Move SAL_WARN_IFTor Lillqvist1-2/+2
Change-Id: If543e44a1f4aa08a38bf273a3e50a7cd7d57e84d
2013-03-26Initial hack attempt to get something renderedTor Lillqvist1-0/+6
Change-Id: I13a407331184f08fd39095b7486d0a370d91ed93
2013-03-21Re-work the vcl aspects of the iOS portTor Lillqvist3-5/+49
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
2013-03-19trailing whitespacesThomas Arnhold1-1/+1
Change-Id: I3d0e2015e4c9f0ea6118fd92892022607fe4bde6