Commit graph

66 commits

Author SHA1 Message Date
fredkiefer
8162d07536 * Source/NSStringDrawing.m: Initialize all the cache entries as
not used.
2020-05-09 21:22:41 +02:00
Sergii Stoian
01ccd98752 * NSStringDrawing: fixed incorrect string drawing (shortened, misplaced)
in ART backend. It seems that third parameter to `cache_lookup` function
(useScreenFonts) is valuable for ART but not for Cairo backend.
2019-12-09 01:18:53 +02:00
Fred Kiefer
a33b4c5073 * Source/GSLayoutManager.m (-usedRectForTextContainer:): Add extra
line rect when needed.
	* Source/NSTextView.m (sizeToFit): Don't add extra line rect, as
	it is now already included.
	* Source/NSStringDrawing.m (cache_lookup): Remove hack for empty string.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40346 72102866-910b-0410-8b05-ffd578937521
2017-02-17 19:44:25 +00:00
Fred Kiefer
f5ce3badde * Source/NSStringDrawing.m: Use shared drawing code.
* Source/NSStringDrawing.m (cache_lookup): Try to handle case of
	empty string.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40342 72102866-910b-0410-8b05-ffd578937521
2017-02-12 21:08:51 +00:00
Fred Kiefer
31cb9914d1 * Source/NSStringDrawing.m: Clean up string drawing cache code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40334 72102866-910b-0410-8b05-ffd578937521
2017-02-12 15:47:17 +00:00
Fred Kiefer
29157408d9 * Source/NSStringDrawing.m(is_size_match): Disable matches
where one has size information, but the other hasn't.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35935 72102866-910b-0410-8b05-ffd578937521
2013-01-06 21:49:59 +00:00
Fred Kiefer
89fed0244c * Headers/Additions/GNUstepGUI/GSLayoutManager_internal.h: Make
-_invalidateEverything visible.
        * Source/GSLayoutManager.m
        * (-invalidateGlyphsForCharacterRange:...): Call
        -_invalidateEverything when the whole character range is
invalidated.
        * Source/NSStringDrawing.m: Remove workarounds for full layout
        * invalidation.
        Move initialisation check into cache_lock().
        Extract size match code in function.
        Put #ifdef around all statistics code.
        Use same LARGE_SIZE value as Apple does.
        Make the methods taking options the main ones.
        * Source/GSHorizontalTypesetter.m (-fullJustifyLine::,
        -rightAlignLine::, -centerAlignLine::): Don't align when the
line
        width is bigger than 1e7.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35925 72102866-910b-0410-8b05-ffd578937521
2012-12-30 15:48:21 +00:00
Wolfgang Lux
6365fa5127 Reinstate Fred's change with the additional correction to the string
drawing code he proposed on the mailing list.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34241 72102866-910b-0410-8b05-ffd578937521
2011-12-02 21:36:58 +00:00
Fred Kiefer
906201acf6 Remove dead assignments found by static code analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32022 72102866-910b-0410-8b05-ffd578937521
2011-02-09 22:20:00 +00:00
Fred Kiefer
03cdf3355c Remove some stupid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30091 72102866-910b-0410-8b05-ffd578937521
2010-04-06 08:12:47 +00:00
Fred Kiefer
6cdc46802b Final part of #include -> #import replacement in official headers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30084 72102866-910b-0410-8b05-ffd578937521
2010-03-31 21:21:18 +00:00
Gregory John Casamento
e1afb724d2 * Source/GSHorizontalTypesetter.m: Use thread dictionary to hold
the instance of the typesetter for that thread.
	* Source/NSStringDrawing.m: Add locks to methods to prevent modification
	of static variables by separate threads from causing the application
	to get glyph generation errors.
	NOTE: These changes based on suggestions/ideas from Doug 
	Simons <doug@riverrock.org>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28219 72102866-910b-0410-8b05-ffd578937521
2009-04-15 01:27:42 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Fred Kiefer
4835a35c1c Add new MacOSX methods. Code mostly by Nikolaus Schaller.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25270 72102866-910b-0410-8b05-ffd578937521
2007-06-18 21:08:54 +00:00
Richard Frith-MacDonald
8e6eaaac0f Move main part of affine transform code to base for MacOS-X compatibility
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24133 72102866-910b-0410-8b05-ffd578937521
2006-11-19 11:32:51 +00:00
Matt Rice
ba8d729b8a * Source/NSTextView_actions.m:
* Source/NSOpenPanel.m:
        * Source/GSLayoutManager.m:
        * Source/NSLayoutManager.m:
        * Source/NSSavePanel.m:
        * Source/NSTextView.m:
        * Source/NSStringDrawing.m:
        * Headers/Additions/GNUstepGUI/GSLayoutManager_internal.h:
        * Headers/AppKit/NSTextView.h: Remove underscores from category names
        as they can confuse the debugger.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24032 72102866-910b-0410-8b05-ffd578937521
2006-11-06 10:19:20 +00:00
Adam Fedor
303dd1baf9 Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21259 72102866-910b-0410-8b05-ffd578937521
2005-05-26 02:52:46 +00:00
Fred Kiefer
0df92e1637 Some unrelated bug fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18672 72102866-910b-0410-8b05-ffd578937521
2004-02-25 23:27:46 +00:00
Alexander Malmberg
3c2b36c17f Reimplement using cache system for layout information.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18478 72102866-910b-0410-8b05-ffd578937521
2004-01-25 15:19:53 +00:00
Alexander Malmberg
7d44f67c49 Adjust 'really large' sizes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17186 72102866-910b-0410-8b05-ffd578937521
2003-07-11 01:38:39 +00:00
Alexander Malmberg
c8ac5f25e4 Automatically turn off screen fonts if required according to the current context's ctm.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17067 72102866-910b-0410-8b05-ffd578937521
2003-06-29 15:39:54 +00:00
Alexander Malmberg
7316997787 (-drawAtPoint:): Place the text correctly when the view isn't flipped.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17008 72102866-910b-0410-8b05-ffd578937521
2003-06-23 17:05:05 +00:00
Adam Fedor
6be9174933 Include <> -> ""
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
Adam Fedor
23049dde9e Merge from 0.8.5 branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16250 72102866-910b-0410-8b05-ffd578937521
2003-03-24 18:15:56 +00:00
Nicola Pero
33a0a5ea29 Fixed compiler warning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15774 72102866-910b-0410-8b05-ffd578937521
2003-01-30 04:28:39 +00:00
Fred Kiefer
7a9a8d54a6 Corrected includes to speed up compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14972 72102866-910b-0410-8b05-ffd578937521
2002-11-11 00:15:29 +00:00
Richard Frith-Macdonald
76d90272f8 Documentation tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14762 72102866-910b-0410-8b05-ffd578937521
2002-10-13 10:33:26 +00:00
Fred Kiefer
e4bc6d4d9d drawRun() now correctly flags that it wants some temporary memory
allocated. The old behaviour resulted in a memory leak.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14451 72102866-910b-0410-8b05-ffd578937521
2002-09-15 21:25:00 +00:00
Adam Fedor
6539cba2c9 Printing, cString fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14407 72102866-910b-0410-8b05-ffd578937521
2002-09-06 19:31:00 +00:00
Adam Fedor
f51c1bbf10 Merge from 0.8.0
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14232 72102866-910b-0410-8b05-ffd578937521
2002-08-03 03:32:19 +00:00
Richard Frith-Macdonald
083eb26bd3 Standardise API for character conversion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13630 72102866-910b-0410-8b05-ffd578937521
2002-05-11 07:17:33 +00:00
Adam Fedor
c629ab8ec2 Stroke the underline
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13601 72102866-910b-0410-8b05-ffd578937521
2002-05-07 03:37:48 +00:00
Adam Fedor
54f371d559 Use new unicode functions for conversion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13226 72102866-910b-0410-8b05-ffd578937521
2002-03-25 04:06:03 +00:00
Adam Fedor
d47e202fbe Markup for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
Fred Kiefer
c2e7cf2f1c Corrected drawing code for text attachments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10092 72102866-910b-0410-8b05-ffd578937521
2001-06-06 18:06:52 +00:00
Fred Kiefer
8d1b7ad36a Added drawing code for text attachments (Still untested, as there
is a problem with unicode characters in NSAttributedString)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10071 72102866-910b-0410-8b05-ffd578937521
2001-06-04 16:24:48 +00:00
Fred Kiefer
d2948895d0 Integrated patches from Frederic <frederic.chauvin@noos.fr> to
seed up drawing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9970 72102866-910b-0410-8b05-ffd578937521
2001-05-18 21:00:52 +00:00
Fred Kiefer
1aa5864538 Corrected bug in setupChunk() that showed formats for the wrong
range of characters.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9941 72102866-910b-0410-8b05-ffd578937521
2001-05-13 21:10:22 +00:00
Adam Fedor
4525b97466 Minor updates, documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9767 72102866-910b-0410-8b05-ffd578937521
2001-05-03 19:39:28 +00:00
Richard Frith-MacDonald
19e0fc3d15 Added some fixes for Apple runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7940 72102866-910b-0410-8b05-ffd578937521
2000-10-31 12:47:09 +00:00
Fred Kiefer
9a7641c764 Started reorganising the code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7802 72102866-910b-0410-8b05-ffd578937521
2000-10-12 23:03:30 +00:00
Fred Kiefer
1d5eb47a99 Convert glyphs to font encoding in drawRun().
Removed unused code.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7699 72102866-910b-0410-8b05-ffd578937521
2000-10-02 17:49:43 +00:00
Nicola Pero
28830d2c30 Added workaround to clip string in rect
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7438 72102866-910b-0410-8b05-ffd578937521
2000-09-07 16:37:41 +00:00
Fred Kiefer
a3333bd2e3 Changed system fonts of size 12 to 0. This will use Nicolas font
cache and keep font sizes consistent when changed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7347 72102866-910b-0410-8b05-ffd578937521
2000-09-02 17:16:26 +00:00
Fred Kiefer
884ca03135 Corrected baseline for font with different point size. Added primitiv
support for super/subscript as baseline change of 3 points. The
baseline correction is only done for the current chunk not for the
whole line.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6580 72102866-910b-0410-8b05-ffd578937521
2000-05-07 22:24:29 +00:00
Richard Frith-MacDonald
12941a20dc Fix error in deetermining range of paragraph style - was only working for
text containing a single style.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6269 72102866-910b-0410-8b05-ffd578937521
2000-03-11 07:34:02 +00:00
Pascal J. Bourguignon
8aef6e88e3 Moved constant invocation of the method -[NSParagraphStyle
attribute:atIndex:effectiveRange:]   outside  of  loops   and  removed
firstLine variable in -drawAtPoint: and in -size.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6261 72102866-910b-0410-8b05-ffd578937521
2000-03-10 18:19:16 +00:00
Richard Frith-MacDonald
f73693c4d1 Various tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6211 72102866-910b-0410-8b05-ffd578937521
2000-03-08 08:43:15 +00:00
Adam Fedor
3382630788 Upate of xdps from xgps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4512 72102866-910b-0410-8b05-ffd578937521
1999-07-03 22:20:08 +00:00