summaryrefslogtreecommitdiff
path: root/vcl/coretext
AgeCommit message (Collapse)Author
2013-06-04Avoid crash on iOS: We need to get a valid context hereTor Lillqvist
Change-Id: Ib3fc01213fc6bc370a6c8b774a063f6f275ba6f2
2013-06-04Make the iOS vcl CoreText code build againTor Lillqvist
Some refactoring was needed after the Coretext rework yesterday. It does crash at run-time, though. Also, remove the no longer used source files from our older CoreText attempt. Change-Id: I54d221ade846866d7a9457acd50219c74c68e8cf
2013-06-04Drop the trailing white space crackKhaled Hosny
Whatever this is, all it seems to do it to cause jitter when editing text. The only place where this has any use is when editing RTL text since Core Text seems to always place the trailing space on the right. Change-Id: I35726775fb2a11761d264238fe702e58bbafd7fd
2013-06-04Add Emacs and vim mode linesTor Lillqvist
Change-Id: I2ad35bfbaf40dd1a5b5c9f7f119268b8f30ca093
2013-06-04Drop "CJK extra leading" crackKhaled Hosny
It have been unused on Mac OS X since since 2008 (commit da4d070d9d2d563f6e1401496957b22b51c81ff9). Change-Id: I4b3eabe71a54021903009310a87319c9caecfd4c
2013-06-03Use Core Text font manager instead of deprecated ATSKhaled Hosny
Change-Id: I660a895a227da3d28a0b410c56f2395961a5bc4f
2013-06-03Drop ENABLE_CORETEXTKhaled Hosny
This file is Core Text only already. Change-Id: Ic4c1f44296eaae582091e515d3ca1b4aa227301e
2013-06-03Fix dbgutil buildTor Lillqvist
Change-Id: Ife8ca88c8f558955ee006be6294bd7b233e89916
2013-06-03Clarify headers.Michael Meeks
Change-Id: I125e4cacd94cd33d24cf1266967eb92906600cc4
2013-06-03Drop Core Text dynamic loading stuffKhaled Hosny
Our Mac OS X baseline includes Core Text. Change-Id: Icd2f0062d172db1d4393b2dd1eac4d9f55a88495
2013-06-03Get the new Core Text code to compileKhaled Hosny
Change-Id: I592158bd60afcbe756c6f0e11aa69a44768a0985
2013-06-03Cherry-pick Core Text port from AOOKhaled Hosny
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-22Revert "fdo#62846 incorrect glyph to Unicode mappings in PDFs"Tor Lillqvist
Breaks the build for Windows: vcl/win/source/gdi/winlayout.cxx(1897) : error C2065: 'nCharPos' : undeclared identifier This reverts commit 0b70e4ea4fcf0adccdfdf4886e5cc45d46479692.
2013-05-22fdo#62846 incorrect glyph to Unicode mappings in PDFsJonathan Schultz
Change-Id: Idebc7f69f95d8f72626373475d8611ea68f1483a
2013-05-18Drop unused mpGlyphPositions arrayKhaled Hosny
Change-Id: I858832a41ef140fa9916e05548edf2df6b0af451
2013-05-18Simplify Core Text drawingKhaled Hosny
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 Hosny
isVerticalRun is not used anywhere, remove for now. Change-Id: I29a9650e3031dc1faaacd13f4aa9fefe661edaa7
2013-05-18Fix Core Text GetCaretPositions()Khaled Hosny
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 Lillqvist
Change-Id: Id10519547445b5e67d3328a82909f85f9de83a80
2013-05-11[coretext] Attempt to fix jumping linesKhaled Hosny
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 Hosny
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 Hosny
Change-Id: I31b95844234135d14f117ae74124350eedf7d20a
2013-05-09[coretext] Fix line spacingKhaled Hosny
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 Lillqvist
Change-Id: Id8b9bec79e5673db738e16905eacd8e84cea89e1
2013-04-12Use my improved understanding of what a subset BitmapDevice isTor Lillqvist
Need to pass the whole pixel buffer to CGBitmapContextCreate(). Change-Id: Iadac7dc3e63c29e5d0cc328b2e2a1f10824248a6
2013-04-12A bit more logging in DrawText()Tor Lillqvist
Change-Id: I04c715e88ee79aa639c10f2a39d303eecdbd3962
2013-04-11Log the stretch factor if different from oneTor Lillqvist
Change-Id: I37472b779f0e455892f4fe2cfe93023c14335400
2013-04-09WaE: unused variable 'lineRunGlyphStartIx'Tor Lillqvist
Change-Id: I444673fc46699512be0830fba94f752a5ccf619c
2013-04-08More fixes to the CoreText codeTor Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
Change-Id: I18cb4e00b86e25f299b897a1a71c1d7d68d8309d
2013-04-08More hacking, still not working properlyTor Lillqvist
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 Lillqvist
Change-Id: I5ef28eaac8eacd24f209617d68dfa23e0388bb1a
2013-04-08Add SAL_INFO output operator for CoreTextStyleInfoTor Lillqvist
Change-Id: I83ffefff08fbda920d7394df336671861fcb18f7
2013-04-08Add SAL_INFO output operator for CTFontRefTor Lillqvist
Change-Id: If878ae08131ab425ea958f54fc0bd5a07fc76881
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
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 Lillqvist
Change-Id: Ifa07f9b5613b4a75c5b72178cb276b9c0b495a62
2013-04-07Create a justified line if asked toTor Lillqvist
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 Lillqvist
Change-Id: I184c8c69f4a9afdb0019193b09f61c65e47d36ae
2013-04-07Don't return in a (rare?) case without restoring the CGContext state stackTor Lillqvist
Change-Id: I89040b62c0961be160fcfaa793e48326fa7a584c
2013-04-07Use CGContextShowGlyphsWithAdvances()Tor Lillqvist
Change-Id: I9373647e5d710acb26c9818e6d06d4bfb862a7df
2013-04-07Take trailing whitesapce into considerationTor Lillqvist
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 Lillqvist
But like there, I don't know if it actually is needed or not. Change-Id: I25bf5d8cf160b56ee4deb47ab9774313eb9590c8
2013-04-07Bin some #if 0 codeTor Lillqvist
Change-Id: I6f185b4f55418e44956f9dd51e1e300f553ac355
2013-04-07mpChars2Glyphs is unusedTor Lillqvist
Change-Id: Ie98d242777cec92db6512f53fe102ecc65dc469c
2013-04-06Move the SAL_INFO operator<< for ImplLayoutArgs to sallayout.hxx for re-useTor Lillqvist
Change-Id: I6497550e8f55f9ba08b0c4f20de0ea04be45d617
2013-04-03Ensure we have a CGContext in a couple of more placesTor Lillqvist
Change-Id: I1d0963f51472328a1a5b212ab277c6e72fafd7b9
2013-04-03It's the font *style* we are looking at hereTor Lillqvist
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 Lillqvist
Change-Id: I938b512dc3a32af9f2529a92ea3e4291abf64ad2