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
AXIS displays coordinate font incorrectly when font package xorg-fonts-type1 is installed #659
Comments
I am a little puzzled by the fact that changing the DRO font helps, as I thought that the graphical preview screen rendered that DRO using a pseudo-font called "Hershey". How badly do you need xorg-fonts-type-1 ? |
As far as I understand, the font for the DRO tab is set in Changing this function - or removing xorg-fonts-type-1 - worked for me -- but I unfortunately don't know about the "Hershey" font. I don't need xorgs-fonts-type-1 badly, so for me it would be totally fine to close the issue. I had opened this ticket on the one hand as I was not sure whether the bug should be attributed to AXIS, and on the other hand to document my workaround to fix the issue. |
I can reproduce the issue and fix on Ubuntu 20.04, but cant find any package that is causing this. |
this is the problem: https://gitlab.gnome.org/GNOME/pango/issues/386 |
Same prob as @michaelweiner described here. |
@EisbaerLars the workaround from the first post works. I will update 2.8 with this fix. |
@rene-dev Little confused what to do now - to change the font from "courier" to, e.g., "FreeMono" like described above I have to change the axis.py file in the 2.8 source code and build it new? |
if you want a fix now, yes. If you dont want to build form source, you have to wait for a new release. |
Thanks - found the axis file in usr/bin/ |
yes, that also works as a workaround |
Thx - just edited the file and will test tomorrow |
Changing the font in the usr/bin/axis file worked - numbers in the preview screen inside 2.8.1 are back ;-) |
Which os do you use? |
Mint 20.4 with a 4.9.0-13-rt kernel |
This has just popped up again on the forum. |
Why should it b difficult? Just use the font named above: FreeMono |
Can you assure us with 100% confidence that FreeMono is present on all the officially supported platforms (which, incidentally, doesn't include Arch) |
No I can't, but if FreeMono is not available just try another font - the fix takes 10s to apply |
We have a buildbot that compiles and runs tests on every software change on every supported platform. (This adds up to 20+ combinations of OS and realtime system: http://buildbot.linuxcnc.org/buildbot/buildslaves |
Agreed |
Its not an arch issue, mint 20 and ubuntu 20 have the same issue. |
Is it simple to check that a font exists on the system? Perhaps a very simple addition to the runtests suite to check for the existence of, initially, FreeMono. Though ideally it would check for all fonts explicitly used. |
a quick way of checking: |
fc-list | grep -i freemono.ttf Appears to fail on the stock LinuxCNC Debian image. |
Further testing shows that even if I use a font name that doesn't exist ("NotAFont") then Axis works just fine on Debian. This is an Arch bug, in my opinion. |
No, like I said Im also having this problem on ubuntu 20.04 see above quote for the reason why this is happening. |
OK. But it still looks like FreeMono might not be the right choice. |
https://packages.ubuntu.com/search?keywords=pango https://packages.debian.org/search?keywords=pango This is an issue on ubuntu 20.04, 20.10, and all debian releases after buster. We just need to find a font that works, and is available. We can also depend on a specific font package. This only showed up on arch, because arch ships new versions a lot quicker. |
"monospace" should be a reasonable alias pointing to some installed monospace font.
|
"monospace" works on Debian 10. And actually picks a nicer font than Courier. |
If there are no objections, I will change all occurrences to monospace. I think this should go in master only. |
I have the same problem with the font in gmoccapy (Axis shows numbers correctly). Do you have any suggestion how to resolve the issue? |
@archidea00 if you still have the problem in gmoccapy, please open a new issue with more details. many things have changed since. |
changed to monospace in master. |
Hi dear developers! I have the same problem after a local build of 2.9.0-pre0. FYI, this same version of LinuxCNC was working perfectly when installed from a distribution CD, but since I need to build a personal HAL component, I have downloaded and rebuild from the source code, and since that, the display is broken as shown above. I browsed for hours searching solution but without success. |
AXIS coordinate font broken
The coordiate font is not properly displayed under the circumstances described below.
I am not 100% sure if this is a LinuxCNC bug, or a bug in the font I have installed, or in the libraries that are used. However, AXIS is the only place where I have encountered this behavior, that is why I am reporting it here.
Here are the steps I follow to reproduce the issue:
pacman -S xorg-fonts-type1
linuxcnc
, then select any ini file that uses AXISThis is what I expected to happen:
I would like to see the coordinates in a proper font.
This is what happened instead:
I see characters that usually appear when a font does not support certain Unicode characters.
Surprisingly, the font in the DRO tab is always displayed properly.
It worked properly before this:
When the Arch package xorg-fonts-type1 is not installed, the display works correct again, also with a Courier-like font.
Another workaround I found to work was to change the font from "courier" to, e.g., "FreeMono", in the source code of https://github.com/LinuxCNC/linuxcnc/blob/2.7/src/emc/usr_intf/axis/scripts/axis.py, in the function
get_coordinate_font()
:Information about my hardware and software:
My system:
LinuxCNC: from AUR (https://aur.archlinux.org/packages/linuxcnc-sim/), version 2.7.14-2
Font package that causes the issue:
xorg-fonts-type1-7.7-3
(https://www.archlinux.org/packages/extra/any/xorg-fonts-type1/)The text was updated successfully, but these errors were encountered: