1 (edited by Sharan24 2025-03-10 16:30:37)

Topic: Taille caractères

Bonjour,

J'ai réalisé des schémas assez volumineux avec 17 folios et j'ai changé pour un PC sous Win11 avec maintenant une définition d'écran différente 1920x1080, du coup tous mes caractères présents sur mes folios sont trop gros, et mes schémas sont devenus inutilisables sous cette forme.

Peut-on redéfinir toutes les tailles de caractères sur les folios en une seule fois, sans avoir à changer les tailles une à une, ce qui est très long !!!

Merci

Hervé
________

Hello,

I made some fairly large diagrams with 17 folios and I changed to a PC under Win11 with now a different screen definition 1920x1080, suddenly all my characters present on my folios are too big, and my diagrams have become unusable in this form.

Can we redefine all the character sizes on the folios at once, without having to change the sizes one by one, which is very long!!!

Thank you

Herve

2

Re: Taille caractères

Deleted double-post in English Forum!

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

3

Re: Taille caractères

It is not QElectroTech that is the problem, but the fonts you have installed on your systems and which you used for the texts!
QElectroTech only shows, that the font you chose on one system to use for texts is not available on the system, you opened the QET-Project later!

Example:
"Sans Serif" or "ms_shell_dlg" are just placeholders for the real font the system uses. If you want, you can set a Greek font as replacement for them in system-settings.

When you want, that texts look alike on all systems you use:
Install and use the same font (*.ttf) everywhere!

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

4

Re: Taille caractères

... but I'm repeating myself:
https://qelectrotech.org/forum/viewtopi … 443#p19443

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

5

Re: Taille caractères

Hello plc-user, thank you for your reply.

I don't understand everything.

Where should I put what you said? (((To ensure identical text display on all your systems:
Install and use the same font (*.ttf) everywhere!)))

Please note that English is not my native language.

Is this on Windows? or in "Qet"

Regards.

6

Re: Taille caractères

English is not my native language, too, but French would be even worse!

Ich würde auch lieber auf Deutsch antworten, aber das verstehen hier auch nur wenige...

So we stick to English! (I guess, you know how to use online-translators?)

As I wrote in the first few words in first answer:

plc-user wrote:

It is not QElectroTech that is the problem,...

To be neutral:
It's the Operating-System!
The one you use, changes standard-fonts from version to version, from country to country, from...!

Install the same font you used on the other system and keep your fingers crossed, that this is the solution!

On the other hand, you can use a text-editor to change the font and font-size in the qet-file as the other user suggested in the thread I linked above.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

7

Re: Taille caractères

@plc-user Can the qet-file simply be loaded in a text editor to change the text size and font type as you mentioned without damaging the qet-file?

8

Re: Taille caractères

@RedBaron:
Depends on what you modify:
Read the linked thread!
Generally speaking: yes.
But be sure to have a backup!

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

9

Re: Taille caractères

@plc-user:
Maybe we can pick one or a couple of standard open-source font(s) and bundle it as a Qt resource? It would be usable on all OS then.

Peut-être pourrions-nous choisir une ou deux polices open-source standard et les regrouper en tant que ressource Qt ? Elle serait alors utilisable sur tous les systèmes d'exploitation.

10 (edited by plc-user 2025-03-12 22:11:05)

Re: Taille caractères

Do you have information, which fonts are really free to use and re-distributable by an Open-Source-Project, elevatormind?

As we do not speak of DTP or Text-Processing – we still speak of a schematic editor!
I would see a maximum (!) of three fonts: Sans Serif (as default), Monospace and Serif.

Just found these:
https://github.com/liberationfonts/liberation-fonts

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

11 (edited by elevatormind 2025-03-13 00:58:10)

Re: Taille caractères

The Liberation fonts would be excellent! I am 99% sure they shouldn't be any problem to use, only thing we would need to add is Copyright notice and the License for them in the "About"-box.

The OFL-license seems common for open source fonts:
https://openfontlicense.org/how-to-use-ofl-fonts/

I also think one sans, one serif and one monospace font should be enough. It's not Adobe Illustrator we're working on here nomicons/smile

Edit:
https://github.com/elevatormind/qelectr … tion-fonts

12 (edited by achim 2025-03-13 11:11:11)

Re: Taille caractères

Here is a font specifically for CAD
https://github.com/hikikomori82/osifont
and an alternative
https://www.peter-wiegel.de/TGL.html

13

Re: Taille caractères

@elevatormind
No matter which font(s) we decide for:
Simply supplying fonts is not enough!
Is the font then directly usable in QET or even default-font for QET on all systems, or does it have to be installed to the system first?
That would definitely be an additional hurdle for users, which we should spare them!
And the supporters here in the forum: Fonts and font-sizes are regularly cause of problem!

@Achim:
Is the need for an osi-font for electrical schematics a requirement from customers?
As far as I know it the mechanics do have more restrictive requirements on font-selection!
Looking at KiCad for example: They use a monospaced font for schematics and Sans Serif for Titleblock.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

14

Re: Taille caractères

@plc-user
In my "liberation-fonts" branch, the liberation fonts is directly usable in QET (on all OS, without any extra action needed), but it is not supplied to the OS. But is that really necessary if that is what you mean? I haven't looked at it, but the font should be able to be embedded when you export to PDF for example.
It should definitely be the default font in QET as you say though, otherwise people will probably not use it.

The osi-font could be supplied as well, for those who like it nomicons/smile I've actually tried it but personally don't like it and think "regular" fonts look better, but I can imagine there might be some customer somewhere demanding it. It will still be your own choice to use it, so it wouldn't hurt to supply it as well

15

Re: Taille caractères

elevatormind wrote:

In my "liberation-fonts" branch, the liberation fonts is directly usable in QET

That's what I mean! Top!

elevatormind wrote:

I haven't looked at it, but the font should be able to be embedded when you export to PDF for example.

That would of course be necessary! Especially, when we speak of using osi-font!

elevatormind wrote:

It should definitely be the default font in QET as you say though, otherwise people will probably not use it.

Fully agree!

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

16 (edited by achim 2025-03-13 16:29:18)

Re: Taille caractères

Osifont und auch die TGL sind TrueType Schriftarten in Anlehnung an die ISO 3098. Diese Norm definiert Schriften wie sie in technischen Zeichnungen genutzt werden. Im deutschen wird sie auch als Normschrift bezeichnet. Alle Cad-Systeme haben entsprechende Schriftarten implementiert, sind aber natürlich nicht frei. Die von von mir verlinkten Schriftarten sind frei verfügbar.
Ich denke eine Schrift nach Norm gehört zu einem Program wie QElectroTech dazu.
Osifont nutze ich problemlos unter Windows und Linux.
Unter linux habe ich jedoch noch kein PDF Export gemacht, das teste ich heute Abend.

With translator:

Osifont and TGL are TrueType fonts based on ISO 3098. This standard defines fonts used in technical drawings. In German, it's also called a standard font. All CAD systems have implemented corresponding fonts, but of course, they aren't free. The fonts I've linked to are freely available.
I think a standardized font is a must for a program like QElectroTech.
I use Osifont without any problems under Windows and Linux.
However, I haven't exported to PDF under Linux yet, I'll test that tonight.

17

Re: Taille caractères

Ok, so you don't have any problem with different looking fonts on different systems, Achim?

I tried PDF-Export with osifont used as Element-Text. (You might recognize, Achim)
To me it looks like it works perfectly:
osifont is not installed on the system – just used from within QET.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

18 (edited by plc-user 2025-03-22 15:21:29)

Re: Taille caractères

@elevatormind:

elevatormind wrote:

It should definitely be the default font in QET as you say though, otherwise people will probably not use it.

Based on your “liberation-fonts” branch including osifont, I have implemented the setting of the default font to "Liberation Sans, 9, Regular"in QET.
As I believe this is inseparable from each other, I am providing the patch here for you to integrate it.

diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp
--- a/sources/qetapp.cpp    2025-03-13 22:43:33.000000000 +0100
+++ b/sources/qetapp.cpp    2025-03-14 16:41:05.253397571 +0100
@@ -1236,7 +1236,7 @@
 /**
     @brief QETApp::diagramTextsFont
     The font to use
-    By default the font is "sans Serif" and size 9.
+    By default the font is "Liberation Sans" and size 9.
     @param size : the size of font
     @return the font to use
 */
@@ -1246,7 +1246,7 @@
 
     //Font to use
     QString diagram_texts_family = settings.value("diagramfont",
-                              "Sans Serif").toString();
+                              "Liberation Sans").toString();
     qreal diagram_texts_size     = settings.value("diagramsize",
                               9.0).toDouble();
 
@@ -1272,14 +1272,14 @@
 
     //Font to use
     QString diagram_texts_item_family = settings.value("diagramitemfont",
-                               "Sans Serif").toString();
+                               "Liberation Sans").toString();
     qreal diagram_texts_item_size     = settings.value("diagramitemsize",
                                9.0).toDouble();
     auto diagram_texts_item_weight =
             static_cast<QFont::Weight>(
                 settings.value("diagramitemweight", QFont::Normal).toInt());
     QString diagram_texts_item_style  = settings.value("diagramitemstyle",
-                               "normal").toString();
+                               "Regular").toString();
 
     if (size != -1.0) {
         diagram_texts_item_size = size;
diff -r -u a/sources/ui/configpage/generalconfigurationpage.cpp b/sources/ui/configpage/generalconfigurationpage.cpp
--- a/sources/ui/configpage/generalconfigurationpage.cpp    2025-03-13 22:43:33.000000000 +0100
+++ b/sources/ui/configpage/generalconfigurationpage.cpp    2025-03-14 17:26:10.217643923 +0100
@@ -86,13 +86,11 @@
     ui->m_border_0->setChecked(settings.value("border-columns_0", false).toBool());
     ui->m_autosave_sb->setValue(settings.value("diagrameditor/autosave-interval", 0).toInt());
     
-    QString fontInfos = settings.value("diagramitemfont").toString() + " " +
-            settings.value("diagramitemsize").toString() + " (" +
-            settings.value("diagramitemstyle").toString() + ")";
+    QString fontInfos = settings.value("diagramitemfont", "Liberation Sans").toString() + " " +
+            settings.value("diagramitemsize", "9").toString() + " (" +
+            settings.value("diagramitemstyle", "Regular").toString() + ")";
     ui->m_font_pb->setText(fontInfos);
 
-    
-    
 
         //Dynamic element text item
     ui->m_dyn_text_rotation_sb->setValue(settings.value("diagrameditor/dynamic_text_rotation", 0).toInt());
@@ -106,7 +104,7 @@
                 QString::number(font.pointSize()) + " (" +
                 font.styleName() + ")";
         ui->m_dyn_text_font_pb->setText(fontInfos);
-    }
+    } else { ui->m_dyn_text_font_pb->setText("Liberation Sans 9 (Regular)"); }
 
         //Independent text item
     ui->m_indi_text_rotation_sb->setValue(settings.value("diagrameditor/independent_text_rotation",0).toInt());
@@ -119,7 +117,7 @@
                             QString::number(font.pointSize()) + " (" +
                             font.styleName() + ")";
         ui->m_indi_text_font_pb->setText(fontInfos);
-    }
+    } else { ui->m_indi_text_font_pb->setText("Liberation Sans 9 (Regular)"); }
     
     ui->m_highlight_integrated_elements->setChecked(settings.value("diagrameditor/highlight-integrated-elements", true).toBool());
     ui->m_default_elements_info->setPlainText(settings.value("elementeditor/default-informations", "").toString());
@@ -399,7 +397,9 @@
 {
     bool ok;
     QSettings settings;
-    QFont font = QFontDialog::getFont(&ok, QFont("Sans Serif", 9), this);
+    QString currentFont = settings.value("diagramitemfont", "Liberation Sans").toString();
+    int currentPointSize = settings.value("diagramitemsize", "9").toInt();
+    QFont font = QFontDialog::getFont(&ok, QFont(currentFont, currentPointSize), this);
     if (ok)
     {
         settings.setValue("diagramitemfont", font.family());
@@ -421,7 +421,9 @@
 {
     bool ok;
     QSettings settings;
-    QFont font = QFontDialog::getFont(&ok, QFont("Sans Serif", 9), this);
+    QFont curFont;
+    curFont.fromString(settings.value("diagrameditor/dynamic_text_font", "Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular").toString());
+    QFont font = QFontDialog::getFont(&ok, QFont(curFont.family(), curFont.pointSize()), this);
     if (ok)
     {
         settings.setValue("diagrameditor/dynamic_text_font", font.toString());
@@ -510,7 +512,9 @@
 {
     bool ok;
     QSettings settings;
-    QFont font = QFontDialog::getFont(&ok, QFont("Sans Serif", 9), this);
+    QFont curFont;
+    curFont.fromString(settings.value("diagrameditor/independent_text_font", "Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular").toString());
+    QFont font = QFontDialog::getFont(&ok, QFont(curFont.family(), curFont.pointSize()), this);
     if (ok)
     {
         settings.setValue("diagrameditor/independent_text_font", font.toString());

At the same time, this also corrects an unattractive feature: When setting the font, the font dialog did not scroll to the current font, but always displayed the default font.


EDIT:
About the licenses: Do you think it is possible to have only one "tab" for all licenses?
The QET-License should of course be the first to display, but I like the idea with the combobox to choose others to view.

EDIT again:
Already have a solution for only having one license tab in about-dialog.
Just waiting for your PR for including the fonts, elevatormind, nomicons/wink

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

19

Re: Taille caractères

plc-user wrote:

I would see a maximum (!) of three fonts: Sans Serif (as default), Monospace and Serif.

Hallo plc-user, Achim, elevatormind!

Don't forget symbol fonts such as ‘fonts-linuxlibertine’, which are very useful for easily drawing certain special elements, such as for designing the alphanumeric LCD or LED screens found on many systems in industrial equipment, for example, motor frequency converters, as shown in this video:



On Debian like:

apt install fonts-linuxlibertine

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

20

Re: Taille caractères

Do you think, we should include Symbol-Fonts, too, Laurent?
That would "blow-up" the binary of QET even more!

As already said: I would limit the number of fonts to three Liberation-Fonts (or four including osifont) to have the basic fonts available on all systems with the default set to one of these.
That will possibly be enough for 90% of our users, I think.

And with the possibility to enter/display unicode-signs even with Liberation we'll have many symbols "on board". Sample in screenshot.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

21

Re: Taille caractères

In my opinion, the 3 fonts you mention should be included in the list, but you should also give users the choice of accessing other fonts if they so decide, but you should add a popup warning them that if they choose other fonts, these fonts may cause display problems on other machines with different OSes, what do you think?

Edit: I think it's feasible, if anyone's interested in coding it, why not?

on the font widget list of recommended default fonts add a checkbox with a popup /!\ to warn the user, then we check it on display the complete list of all the fonts installed on the machine.

When it comes to typing in unicode, yes, it's a workaround solution but only for us geeks, not for all our users.....

RE EDIT: We're not Apple or Gnome !!!!  .... should not prohibit and block but still leave the choice to those who want it!

I love KDE/ plasma for that!!, you can config and custom your desktop like you want!!

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

22 (edited by plc-user 2025-03-15 10:20:03)

Re: Taille caractères

There will be no limitation!
It is not so, that we only have the fonts available to use, which are coming with QET:
Still all fonts available on your system can be chosen to use with texts in QET.
So in this point there would be no change to the user!
And if the user is upgrading the QET-version and has set some font in Config-Page they wouldn't even notice a change!

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

23

Re: Taille caractères

OK, I'd misunderstood, so I'll give you my consent if anyone wants to do it. nomicons/wink

Hmm, I'll have to modify my packaging scripts... . we'll see when I'm in better health.. it can take some time for me to adapt them...!

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

24 (edited by plc-user 2025-03-15 10:45:15)

Re: Taille caractères

There is no need to hurry, Laurent!

EDIT:

scorpio810 wrote:

so I'll give you my consent if anyone wants to do it.

elevatormind already included the fonts in his "liberation-fonts"-Branch and I added a patch for setting default-font to "Liberation Sans" here. See above


But to repeat the reasons, why delivering a few fonts with QET is a good idea:

The user still has complete freedom to do whatever he wants!
If he wants to be compatible with different systems, it is suggested to use the fonts that QET provides.
If he wants to use other fonts, he can and may of course continue to do so!
He just needs to be aware that the particular font he has selected may not be available on other systems. This may even be the case if he re-installs his operating system.
That's why we supply a few fonts that can be used in addition to the fonts already available in the system!

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

25

Re: Taille caractères

FR

vadoola utilise arial dans son dxf2elmt

Pour Linux/GNU Debian, vous pouvez ajouter le fichier de police windows.
Vous devez ajouter contrib à votre /etc/apt sources.list et vous verrez ttf-mscorefonts-installer 3.8.1
et installé dans /usr/share/fonts/truetype/msttcorefonts/


Pour Linux/GNU Ubuntu
https://idroot.us/install-microsoft-fonts-ubuntu-24-04/
https://linuxcapable.com/how-to-install … ntu-linux/



EN

vadoola use arial in his dxf2elmt

For Linux/GNU Debian can you add the windows font file.
You must add contrib in your /etc/apt sources.list and you see ttf-mscorefonts-installer 3.8.1
and installed in /usr/share/fonts/truetype/msttcorefonts/


For Linux/GNU Ubuntu
https://idroot.us/install-microsoft-fonts-ubuntu-24-04/
https://linuxcapable.com/how-to-install … ntu-linux/

I am an pre-retired industrial developer technician and born in 1960