request for input: default for NaviCube font

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: request for input: default for NaviCube font

Post by FBXL5 »

chrisb wrote: Sun Jan 29, 2023 5:22 pm
FBXL5 wrote: Sun Jan 29, 2023 3:53 pm hardly used left and right, but rather driver's side and passenger's side. And so I never stumbled over the "error" on the navi cube.
Ever been to Great Britain :lol: ?
Yes, and I heard a rumour that even though the people over there are seated and drive on the "wrong" side they still use X,Y and Z coordinates, even after Brexit. :lol:
And the coordinates don't give a xxxx about which one of them is pointing right or left.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: request for input: default for NaviCube font

Post by uwestoehr »

Rexbas wrote: Fri Jan 27, 2023 4:29 pm What happens with the default font for older versions of Windows (..., 7, 8, 8.1) if you use "Bahnschrift" as default?
The code is currently that then DejaVu is used. Since I don't have access to Win 7 or 8, I need input from these users if DejaVu is an alternative. I read in forums it is, therefore I used it for now and can change it anytime.
Rexbas wrote: Fri Jan 27, 2023 4:29 pm "Bahnschrift" is available for me on Windows 11. Although I would use size 80-90 so "BOTTOM"
The 95 are automatically calculated using the existing font size code. The reason is to not change the way the font and fontsize is selected on Linux and MacOS. So on all machines where is a "Helvetica" font the cube's appearance should not change.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: request for input: default for NaviCube font

Post by uwestoehr »

mario52 wrote: Sun Jan 29, 2023 12:41 pm there is always a solution cube menu addon, please you can reverse or use conventional view of FreeCAD
That's a cool solution in my opinion because it matches these criteria:
- OS independent
- future-proof
- language independent
- resolution-independent (if the icon has a high enough resolution)

The point is for me if a transparent cube suits most user or better the example with the car where we have images at the cube.

In general with a full word we cannot find a solution suitable for everybody just because of the different word lengths in different languages.

Here are 2 other alternatives I see that would also fulfill the above criteria
- use dots. The cube becomes a dice.
- use two letters. So the cube would be labeled in English as Fr, Le, Ri, Re, Bo, To
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: request for input: default for NaviCube font

Post by mario52 »

Hi
FBXL5 wrote: Sun Jan 29, 2023 3:53 pm I like that loco cube. :)
my too and the mini 1300 innocenti cooper also
uwestoehr wrote: Sun Jan 29, 2023 10:44 pm That's a cool solution in my opinion
why not field for texts and icons in preferences ?

the user use the imposted FreeCAD mode
or
the user do not want text (the field stay empty) ... display only icon given by the user (or by FreeCAD)
or
the user do not want icon (the field stay empty) ... display only text given by the user (or by FreeCAD)

just my idea 12 QLineEdit in preferences

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: request for input: default for NaviCube font

Post by onekk »

uwestoehr wrote: Sun Jan 29, 2023 10:24 pm ...
The code is currently that then DejaVu is used. Since I don't have access to Win 7 or 8, I need input from these users if DejaVu is an alternative. I read in forums it is, therefore I used it for now and can change it anytime.
...

Probably even on Windows, some OpenSource Fonts could be used as example if there is an OpenOffice or a Firefox installation, as probably these OpenSource Projects use some OpenSource fonts.

Some of general questions, on Windows:
- Are they widespread enough to be a viable option?
- If they are not installed, there is way for FC installer to check and eventually install the font?
- FreeCAD could install into his tree some characters, a Sans Serif, a Serif and a monospace font to use as default or "last resource" if nothing suitable is found?

With all the caveats, maybe this could help:

https://wiki.archlinux.org/title/Metric ... ible_fonts

Regards

Carlo D.
Last edited by onekk on Mon Jan 30, 2023 5:09 pm, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: request for input: default for NaviCube font

Post by GeneFC »

onekk wrote: Mon Jan 30, 2023 10:27 am - If they are not installed, there is way for FC installer to check and eventually install the font?
As was said previously, this is exactly what TechDraw does with osifont.

I contend that the only safe way to insist on a specific font is that FreeCAD provides the font. Otherwise there will be problems on some systems that do not already have that font, even if they "should" have the font.

Gene
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: request for input: default for NaviCube font

Post by onekk »

GeneFC wrote: Mon Jan 30, 2023 1:59 pm ...
As was said previously, this is exactly what TechDraw does with osifont.
...

Sorry for the noise, but someone has told that to install a font on windows you need administrative privileges.

Even on Linux the "should have a font" is very "distribution dependant", without taking in account "FSF sponsored distribution" that are very picky about what is free and what is not, so probably supplying some defaults font with FreeCAD (or eventually state clearly that some fonts should be installed on the system) I think is the correct way to go, as fonts could be very big in terms of disk space. EDIT: at least for Arch Linux ttf-dejavu around 1.5 MB and ttf-liberation around 2.6MB seems not be so big.

Ideally a mechanism that suggest to install missing fonts, or an AddOn package in some "corner cases" should do the job, if space could be a problem.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: request for input: default for NaviCube font

Post by Roy_043 »

You can also use addApplicationFont in Python. Once added a font can be used for a Draft_Text for example.

Code: Select all

import FreeCAD
import PySide.QtGui as QtGui

# Add a font:
fontFile = FreeCAD.getHomePath() + "data/Mod/TechDraw/Resources/fonts/osifont-lgpl3fe.ttf"
fontId = QtGui.QFontDatabase.addApplicationFont(fileName)

# Remove a font:
QtGui.QFontDatabase.removeApplicationFont(fontId)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: request for input: default for NaviCube font

Post by Roy_043 »

GeneFC wrote: Mon Jan 30, 2023 1:59 pm I contend that the only safe way to insist on a specific font is that FreeCAD provides the font.
Even then there can be name conflicts. Different fonts can use the same name. We have seen that in a discussion about the osifont where a user had installed a different osifont on their OS.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: request for input: default for NaviCube font

Post by wandererfan »

onekk wrote: Mon Jan 30, 2023 5:07 pm Sorry for the noise, but someone has told that to install a font on windows you need administrative privileges.
You need admin rights to install the font to the Windows font directory, but Qt is happy using fonts that are not in Windows/Fonts,
Post Reply