<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
On second thought, I might be better to address this issue in TextEditor directly and just add those text attributes to line-break characters if adjacent to the current text selection. We don't want to make text rendering slower than necessary. :-)<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 19.01.2022 18:32:28 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">A new version of Graphics was added to project The Inbox:<br>http://source.squeak.org/inbox/Graphics-mt.463.mcz<br><br>==================== Summary ====================<br><br>Name: Graphics-mt.463<br>Author: mt<br>Time: 19 January 2022, 6:32:07.639177 pm<br>UUID: 20a970f6-bcf4-1747-b194-0aef3ad7edbc<br>Ancestors: Graphics-mt.462<br><br>Proposal: Ignore text attributes for line-break characters.<br><br>This makes it easier, for example, select a single line of text and change its font to something smaller than the default font. Usually you would need to also change the font of that line-break character to make the entire line smaller... well, it is possible:<br><br>1. Hit [Home] key.<br>2. Hold [Shift] and hit [End] key.<br>3. Hold [Shift] and hit [ArrowRight] key.<br><br>This proposal would make the third step unnecessary.<br><br>=============== Diff against Graphics-mt.462 ===============<br><br>Item was changed:<br> ----- Method: CharacterScanner>>setFont (in category 'private') -----<br> setFont<br>+ | priorFont lastChar |<br>- | priorFont |<br> "Set the font and other emphasis."<br> priorFont := font.<br> text ifNotNil:[<br> emphasisCode := 0.<br> kern := 0.<br> indentationLevel := 0.<br> alignment := textStyle alignment.<br>+ ((lastChar := text at: lastIndex ifAbsent: [$0 "dummy"]) = CR or: [lastChar = Character lf])<br>+ ifFalse: [<br>+ font := nil.<br>+ (text attributesAt: lastIndex forStyle: textStyle)<br>+ do: [:att | att emphasizeScanner: self]]].<br>- font := nil.<br>- (text attributesAt: lastIndex forStyle: textStyle)<br>- do: [:att | att emphasizeScanner: self]].<br> font ifNil: [self setFont: textStyle defaultFontIndex].<br> self setActualFont: (font emphasized: emphasisCode).<br> priorFont <br> ifNotNil: [<br> font = priorFont <br> ifTrue:[<br> "font is the same, perhaps the color has changed?<br> We still want kerning between chars of the same<br> font, but of different color. So add any pending kern to destX"<br> destX := destX + (pendingKernX ifNil:[0])].<br> destX := destX + priorFont descentKern].<br> pendingKernX := 0. "clear any pending kern so there is no danger of it being added twice"<br> destX := destX - font descentKern.<br> "NOTE: next statement should be removed when clipping works"<br> leftMargin ifNotNil: [destX := destX max: leftMargin].<br> kern := kern - font baseKern.<br> <br> "Install various parameters from the font."<br> spaceWidth := font widthOf: Space.!<br><br><br></div></blockquote></div>