--- a/Text.st Thu Jan 30 09:40:49 2020 +0100
+++ b/Text.st Thu Jan 30 12:50:19 2020 +0100
@@ -1782,17 +1782,17 @@
^ string bitsPerCharacter.
!
-emphasisAtPoint:aPoint on:aGCOrView
- "return the emphasis at a given point, or nil if there is none"
+emphasisAtX:pointX on:aGCOrView
+ "return the emphasis at a given x-coordinate, or nil if there is none.
+ Does not care for multiline strings (i.e. only works for single line strings)"
- |pointX savedFont boldFont italicFont bold italic wasItalic pos font len gcDevice posX boldItalicFont|
+ |savedFont boldFont italicFont bold italic wasItalic pos font len gcDevice posX boldItalicFont|
gcDevice := aGCOrView graphicsDevice.
savedFont := aGCOrView basicFont onDevice:gcDevice.
pos := 1.
posX := 0.
- pointX := aPoint x.
len := 0.
italic := false.
runs runsDo:[:runLen :emphasis |