* Headers/Additions/GNUstepGUI/GSLayoutManager.h,

* Source/GSLayoutManager.m: Add new methods
-defaultLineHeightForFont: and -defaultBaselineOffsetForFont:.
This commit is contained in:
Fred Kiefer 2022-11-05 21:01:53 +01:00
parent 30d0dc66ee
commit e4ecfb0801
3 changed files with 23 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2022-11-05 Fred Kiefer <FredKiefer@gmx.de>
* Headers/Additions/GNUstepGUI/GSLayoutManager.h,
* Source/GSLayoutManager.m: Add new methods
-defaultLineHeightForFont: and -defaultBaselineOffsetForFont:.
2022-10-11 Riccardo Mottola <rm@gnu.org>
* Source/NSTextView.m

View file

@ -139,6 +139,13 @@ how it's supposed to work. It's functional and correct, but it isn't fast. */
- (BOOL) showsControlCharacters;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
- (CGFloat) defaultLineHeightForFont: (NSFont*)theFont;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
- (CGFloat) defaultBaselineOffsetForFont: (NSFont*)theFont;
#endif
/** Font handling **/
- (BOOL) usesScreenFonts;

View file

@ -3089,6 +3089,16 @@ See [NSTextView -setTextContainer:] for more information about these calls.
return showsControlCharacters;
}
- (CGFloat) defaultLineHeightForFont: (NSFont*)theFont
{
return [theFont defaultLineHeightForFont];
}
- (CGFloat) defaultBaselineOffsetForFont: (NSFont*)theFont
{
return 0.0;
}
/*
Note that NSLayoutManager completely overrides this (to perform more
intelligent invalidation of layout using the constraints on layout it