Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing font in Linux causes IDE menus to all dissapear #4300

Open
kravlin opened this issue Dec 14, 2015 · 11 comments
Open

Missing font in Linux causes IDE menus to all dissapear #4300

kravlin opened this issue Dec 14, 2015 · 11 comments
Labels
Component: IDE user interface The Arduino IDE's user interface OS: Linux Specific to the Linux version of the Arduino IDE Type: Bug

Comments

@kravlin
Copy link

kravlin commented Dec 14, 2015

I've been experiencing the same issue as here

After some testing and asking around, the issue was fixed by installing microsoft's propietary font packages. I'm not sure exaclty which font package fixed the issue at this point. I did have several Monospaced fonts already installed, so I don't think that's the issue font.

No errors were shown in the console, regardless of the -debug flag.

I actually don't have enough information or knowledge of the IDE to debug it or I'd provide more exact information, I just figure someone should know.

@ffissore
Copy link
Contributor

Do you have the issue even when using the IDE provided by arduino? https://www.arduino.cc/en/Main/Software

@ffissore ffissore added Waiting for feedback More information must be provided before we can proceed OS: Linux ARM Specific to the Linux ARM version of the Arduino IDE OS: Linux Specific to the Linux version of the Arduino IDE and removed OS: Linux ARM Specific to the Linux ARM version of the Arduino IDE labels Dec 14, 2015
@kravlin
Copy link
Author

kravlin commented Dec 14, 2015

Yep. I downloaded directly from the arduino website.

What i'm expecting is that there's not a font included in some family or something that isn't included in arch by default, but I didn't get any errors about missing fonts to go off, so I'm not sure which one.

I should also mention I'm not the person who posted there. He's posted on /r/archlinux /r/arduino and the arduino forums. It also occurs with 1.6.5r2 and 1.6.6

@ffissore
Copy link
Contributor

We don't use specific fonts. We use "monospace" and "serif", which are provided by the OS. So I don't know what we could do to fix this. However, I've just become aware that font antialiasing was also not working properly on Arch and I fixed that in 6c5e584

@ffissore ffissore added Component: IDE user interface The Arduino IDE's user interface and removed Waiting for feedback More information must be provided before we can proceed labels Dec 14, 2015
@kravlin
Copy link
Author

kravlin commented Dec 16, 2015

It's very possible that arch doesn't ship with serif. as i'm looking through my fonts on my local system and only seeing one serif font, which is installed as part of the liberation fonts package.

So it's actually very possible that arch isn't shipping with serif or they're not installed in the right place, which is the issue. I'll do more digging with a new install of arch over the next couple days.

@kjav
Copy link

kjav commented May 21, 2016

I had this problem too, which I fixed by installing the ttf-ms-fonts package from the AUR. It seems like the text in the menus of the IDE use one of the following fonts:

  • andale mono
  • arial
  • arial black
  • comic sans MA (probably not this one)
  • courier new
  • georgia
  • impact
  • times new roman
  • trebucet MS
  • verdana
  • webdings (probably not this one either)
    Source

@kjav
Copy link

kjav commented May 21, 2016

Perhaps the default JMenuBar font is an ms-font? Would setting the menubar's font here to editor.font solve the issue?

@chrstphrchvz
Copy link

I'm not sure JMenuBar requires an MS font, since I have used this on systems without one. The font that it appears to try using can depend on what the desktop environment (if any) has set, e.g. for MATE, it is whatever is specified for "Application font" in Appearance settings, i.e. stored as org.mate.interface font-name; similarly for GNOME in org.gnome.desktop.interface. What desktop environment/window manager/theme does the issue occur on, and what fonts do they specify?

I tested the Swing GTK LaF menu bar alone by compiling and running the MenuLookDemo example with the command java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel components.MenuLookDemo. This might be a simpler method for reproducing the issue. So I think this is maybe an upstream issue at least for either Swing GTK look and feel (which is what Arduino is defaulting to), or specific desktop/windowing software. I haven't worked out how to programmatically find the exact font Java is told to use, but some of the needed statements might be found somewhere in com.sun.java.swing.plaf.gtk.GTKLookAndFeel.

@chrstphrchvz
Copy link

Another workaround might be to edit the arduino Linux shell script to start Arduino with a different look and feel, although I don't know if this breaks anything. For example, to use the Metal LaF:

# Collect options to java in an array, to properly handle whitespace in options
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR" "-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel")

@symbioquine
Copy link

I have a similar issue that just started showing up under Arch Linux recently (without changing versions of Arduino IDE) - it seems to affect both 1.8.10 and a version of nightly I downloaded some time back...

image

For me, the work-around seems to be just deleting the whole java folder within the arduino-1.8.10 distribution and letting it use my OS' java install. Obviously YMMV :-P

@symbioquine
Copy link

Possibly related: #11150

@wrightrocket
Copy link

  1. Install the fonts from https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
  2. Delete the following lines in the arduino script:

export PATH="${APPDIR}/java/bin:${PATH}"

if [ -x "$APPDIR/java/bin/java" ]; then
JAVA=$APPDIR/java/bin/java
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface OS: Linux Specific to the Linux version of the Arduino IDE Type: Bug
Projects
None yet
Development

No branches or pull requests

7 participants