Hi Fred,
> Ignore that list. The only defined font sizes in the defaults are
> @„NSFontSize“, @„NSLabelFontSize“ and @„NSSmallFontSize“. You have to use
> these strings if you want to set this programmatically
I have done
- (void)applicationDidFinishLaunching
{
#ifndef __APPLE__
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber
numberWithFloat:20.0] forKey:@"NSFontSize"];
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber
numberWithFloat:20.0] forKey:@"NSLabelFontSize"];
#endif
....
}
but this does not seem to have changed anything. The font used by TableViews,
ComboBoxes, TextFields and Buttons is still the same!?
> but most likely it is easier to set them via the defaults file once.
You mean
defaults write ScaleMaster NSFontSize 20
defaults write ScaleMaster NSLabelFontSize 20
?
Thanks a lot,
Andreas
>
> Hope this helps,
> Fred
>
>> Am 22.09.2021 um 15:40 schrieb Andreas Höschler <[email protected]>:
>>
>> Hi all,
>>
>> I am building a GNUstep app on Ubuntu 20.04 and would like the font used by
>> NSButtons, NSTableView, NSComboBox etc. to be larger as normal for
>> industrial usage of the app (better readability from further away from the
>> screen).
>>
>> I found this list
>>> NSBoldFontSize
>>
>>>
>> NSControlContentFontSize
>>
>>>
>> NSFontSize
>>
>>>
>> NSLabelFontSize
>>
>>>
>> NSMenuFontSize
>>
>>>
>> NSMiniFontSize
>>
>>>
>> NSMessageFontSize
>>
>>>
>> NSPaletteFontSize
>>
>>>
>> NSSmallFontSize
>>
>>>
>> NSTitleBarFontSize
>>
>>>
>> NSToolTipsFontSize
>>
>>>
>> NSUserFixedPitchFontSize
>>
>>>
>> NSUserFontSize
>> and greped through the GNUstep sources for NSControlContentFontSize but only
>> found
>>
>> grep -r "NSControlContentFontSize" /usr/src/GNUstep/
>>
>> /usr/src/GNUstep/libs-gui/Source/NSFont.m: <item>NSControlContentFontSize
>> (none)</item>
>> /usr/src/GNUstep/libs-gui/Source/NSToolbarItem.m: // [NSFont
>> smallSystemFontSize] or better should be NSControlContentFontSize
>>
>> Is this default used at all? How would I programmatically change the font
>> size for all the controls in the user interface. I intuitively tried
>>
>> [[NSUserDefaults standardUserDefaults] setObject:[NSNumber
>> numberWithFloat:20.0] forKey:NSControlContentFontSize];
>> [[NSUserDefaults standardUserDefaults] setObject:[NSNumber
>> numberWithFloat:20.0] forKey:NSLabelFontSize];
>>
>> but this of course does not build since NSControlContentFontSize is
>> undefined.
>>
>> I am obviously missing the point!? :-(
>>
>> Any idea?
>>
>> Thanks a lot,
>>
>> Andreas
>>
>>
>>
>
Mit freundlichen Grüßen,
Andreas Höschler
Managing Director
Smartsoft GmbH
Birkenweg 11a
D-21483 Gülzow
Phone 040 22820930-0
Fax 040 22820930-9
Web http://www.smartsoft.de <http://www.smartsoft.de/>
Email: [email protected] <mailto:[email protected]>
Steuernummer: 44/759/00826
Amtsgericht Hamburg, HRB 117172
Geschäftsführer: Andreas Höschler