3838import org .apache .hop .core .Const ;
3939import org .apache .hop .core .logging .LogChannel ;
4040import org .apache .hop .ui .core .PropsUi ;
41- import org .apache .hop .ui .core .gui .GuiResource ;
4241import org .eclipse .swt .SWT ;
4342import org .eclipse .swt .awt .SWT_AWT ;
4443import org .eclipse .swt .custom .StyledText ;
4544import org .eclipse .swt .events .KeyAdapter ;
4645import org .eclipse .swt .events .KeyEvent ;
4746import org .eclipse .swt .events .TraverseEvent ;
4847import org .eclipse .swt .events .TraverseListener ;
49- import org .eclipse .swt .graphics .Font ;
50- import org .eclipse .swt .graphics .FontData ;
5148import org .eclipse .swt .graphics .Rectangle ;
5249import org .eclipse .swt .layout .FormAttachment ;
5350import org .eclipse .swt .layout .FormData ;
@@ -218,12 +215,8 @@ private void sendTabToShell() {
218215 */
219216 private DefaultSettingsProvider createHopSettingsProvider (
220217 final boolean isDarkMode , final Display display ) {
221- // Hop's fixed-width font (name, style, base size from preferences)
222- Font swtFixedFont = GuiResource .getInstance ().getFontFixed ();
223- FontData [] fixedFontData = swtFixedFont .getFontData ();
224- final String fontName = fixedFontData .length > 0 ? fixedFontData [0 ].getName () : "Monospaced" ;
225- final int baseFontHeight = fixedFontData .length > 0 ? fixedFontData [0 ].getHeight () : 12 ;
226- int swtStyle = fixedFontData .length > 0 ? fixedFontData [0 ].getStyle () : SWT .NORMAL ;
218+ final String fontName = java .awt .Font .MONOSPACED ;
219+ final int baseFontHeight = 13 ;
227220
228221 float fontScale = 1.0f ;
229222 String manualScale = System .getProperty ("JediTerm.fontScale" );
@@ -237,18 +230,11 @@ private DefaultSettingsProvider createHopSettingsProvider(
237230 }
238231 final float systemPropScale = fontScale ;
239232
240- int awtStyle = java .awt .Font .PLAIN ;
241- if ((swtStyle & SWT .BOLD ) != 0 ) awtStyle |= java .awt .Font .BOLD ;
242- if ((swtStyle & SWT .ITALIC ) != 0 ) awtStyle |= java .awt .Font .ITALIC ;
243- final int finalAwtStyle = awtStyle ;
233+ final int finalAwtStyle = java .awt .Font .PLAIN ;
244234
245235 return new DefaultSettingsProvider () {
246236 private int computeFontSize () {
247- // baseFontHeight already includes Hop's globalZoomFactor (applied in GuiResource).
248- // Both SWT and AWT interpret point sizes the same way and apply screen DPI
249- // internally, so no additional nativeZoomFactor or DPI correction is needed.
250- int percent = fontScalePercent .get ();
251- return Math .max (6 , Math .round (baseFontHeight * (percent / 100f ) * systemPropScale ));
237+ return Math .round (baseFontHeight * (fontScalePercent .get () / 100f ) * systemPropScale );
252238 }
253239
254240 @ Override
0 commit comments