mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
* Source/GSHorizontalTypesetter.m (_addExtraLineFragment): Make
sure curParagraphStyle and line_height always have useful values.
This commit is contained in:
parent
cad8383e62
commit
66ca536acc
2 changed files with 19 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-05-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSHorizontalTypesetter.m (_addExtraLineFragment): Make
|
||||
sure curParagraphStyle and line_height always have useful values.
|
||||
|
||||
2020-05-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (-initWithContentRect:...defer:): Call
|
||||
|
|
|
@ -537,10 +537,22 @@ For bigger values the width gets ignored.
|
|||
NSDictionary *typingAttributes = [curLayoutManager typingAttributes];
|
||||
curParagraphStyle = [typingAttributes
|
||||
objectForKey: NSParagraphStyleAttributeName];
|
||||
if (curParagraphStyle == nil)
|
||||
{
|
||||
curParagraphStyle = [NSParagraphStyle defaultParagraphStyle];
|
||||
}
|
||||
curFont = [typingAttributes objectForKey: NSFontAttributeName];
|
||||
}
|
||||
|
||||
line_height = [curFont defaultLineHeightForFont];
|
||||
|
||||
if (curFont)
|
||||
{
|
||||
line_height = [curFont defaultLineHeightForFont];
|
||||
}
|
||||
else
|
||||
{
|
||||
line_height = 15.0;
|
||||
}
|
||||
|
||||
r = [self _getProposedRectFor: YES
|
||||
withLineHeight: line_height];
|
||||
r = [curTextContainer lineFragmentRectForProposedRect: r
|
||||
|
|
Loading…
Reference in a new issue