cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Arthur
Level II

JSL Function for resizing all font sizes

Hi, is there any JSL function for increasing/decreasing font size shortcut(CTRL + SHIFT + Plus/Minus)? Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: JSL Function for resizing all font sizes

On windows this will work. Not sure about Mac.

Main Menu( "Increase Font Sizes" );
Main Menu( "Decrease Font Sizes" );

It is hiding under Window->Font Sizes and is the same as ctrl-shift-plus/minus.

Craige

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: JSL Function for resizing all font sizes

The font sizes are controlled via JMP preferences.  One should be able to do what you want   Here is one version of such a function

Names Default To Here( 1 );

setPrefs = Function( {increase},
	{defaultlocal},
	prefs = Char( Get Preferences( fonts ) );
	s1 = Num( Word( 3, Substr( prefs, Contains( prefs, "Text Font(" ) ), "()," ) ) + increase;
	s2 = Num( Word( 3, Substr( prefs, Contains( prefs, "Heading Font(" ) ), "()," ) ) + increase;
	s3 = Num( Word( 3, Substr( prefs, Contains( prefs, "Title Font(" ) ), "()," ) ) + increase;
	s4 = Num( Word( 3, Substr( prefs, Contains( prefs, "Small Font(" ) ), "()," ) ) + increase;
	s5 = Num( Word( 3, Substr( prefs, Contains( prefs, "Monospaced Font(" ) ), "()," ) )
	+increase;
	s6 = Num( Word( 3, Substr( prefs, Contains( prefs, "Formula Font(" ) ), "()," ) ) + increase;
	s7 = Num( Word( 3, Substr( prefs, Contains( prefs, "Annotation Font(" ) ), "()," ) )
	+increase;
	s8 = Num( Word( 3, Substr( prefs, Contains( prefs, "Axis Font(" ) ), "()," ) ) + increase;
	s9 = Num( Word( 3, Substr( prefs, Contains( prefs, "Marker Font(" ) ), "()," ) ) + increase;
	s10 = Num( Word( 3, Substr( prefs, Contains( prefs, "Axis Title Font(" ) ), "()," ) )
	+increase;
	s11 = Num( Word( 3, Substr( prefs, Contains( prefs, "Graph Label(" ) ), "()," ) ) + increase;
	s12 = Num( Word( 3, Substr( prefs, Contains( prefs, "Legend(" ) ), "()," ) ) + increase;
	s13 = Num( Word( 3, Substr( prefs, Contains( prefs, "Graph Title(" ) ), "()," ) ) + increase;
	s14 = Num( Word( 3, Substr( prefs, Contains( prefs, "Caption(" ) ), "()," ) ) + increase;
	s15 = Num( Word( 3, Substr( prefs, Contains( prefs, "Data Table Font(" ) ), "()," ) )
	+increase;
	s16 = Num( Word( 3, Substr( prefs, Contains( prefs, "Control Font(" ) ), "()," ) )
	+increase;
	s17 = Num( Word( 3, Substr( prefs, Contains( prefs, "Control Small Font(" ) ), "()," ) )
	+increase;

	Eval(
		Substitute(
				Expr(
					Preferences(
						Text Font( "Segoe UI", __s1 ),
						Heading Font( "Segoe UI", __s2, "Bold" ),
						Title Font( "Segoe UI", __s3, "Bold" ),
						Small Font( "Segoe UI", __s4 ),
						Monospaced Font( "Consolas", __s5 ),
						Formula Font( "Segoe UI", __s6 ),
						Annotation Font( "Segoe UI", __s7 ),
						Axis Font( "Segoe UI", __s8 ),
						Marker Font( "Segoe UI", __s9 ),
						Axis Title Font( "Segoe UI", __s10 ),
						Graph Label( "Segoe UI", __s11 ),
						Legend( "Segoe UI", __s12 ),
						Graph Title( "Segoe UI", __s13, "Bold" ),
						Caption( "Segoe UI", __s14 ),
						Data Table Font( "Segoe UI", __s15 ),
						Control Font( "Segoe UI", __s16 ),
						Control Small Font( "Segoe UI", __s17 )
					)
				),
			Expr( __s1 ), s1,
			Expr( __s2 ), s2,
			Expr( __s3 ), s3,
			Expr( __s4 ), s4,
			Expr( __s5 ), s5,
			Expr( __s6 ), s6,
			Expr( __s7 ), s7,
			Expr( __s8 ), s8,
			Expr( __s9 ), s9,
			Expr( __s10 ), s10,
			Expr( __s11 ), s11,
			Expr( __s12 ), s12,
			Expr( __s13 ), s13,
			Expr( __s14 ), s14,
			Expr( __s15 ), s15,
			Expr( __s16 ), s16,
			Expr( __s17 ), s17
		)
	);
);

setPrefs( 1 );
Jim
Craige_Hales
Super User

Re: JSL Function for resizing all font sizes

On windows this will work. Not sure about Mac.

Main Menu( "Increase Font Sizes" );
Main Menu( "Decrease Font Sizes" );

It is hiding under Window->Font Sizes and is the same as ctrl-shift-plus/minus.

Craige
Arthur
Level II

Re: JSL Function for resizing all font sizes

Thank you! This is exactly what I wanted.

Arthur
Level II

Re: JSL Function for resizing all font sizes

Thank you! This is another way.