Free software should only use free "ingredients"!
Therefore:
We are on a very good way to solve this age-old problem!
You are not logged in. Please login or register.
QElectroTech → Posts by plc-user
Free software should only use free "ingredients"!
Therefore:
We are on a very good way to solve this age-old problem!
You're not living up to your name at the moment:
It looks like, you did not read the last few posts in this thread!
@Re-searcher:
You still did not explain, what you think does "not work" with bigger grid-points.
You need to explain, what you expect to see with bigger points!
If you can't or won't explain what you expect, no one can help you!
The implementation of texts and fonts is not finished in dxf2elmt.
That is why the font selection can still be described as hardcoded and “temporary”!
There is no need to hurry, Laurent!
EDIT:
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!
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!
Lade doch erstmal nur den Quellcode inklusive einer kurzen Beschreibung in einem Post hoch.
Damit können wir doch schon mal anfangen...
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.
Git ist eine Versions-Verwaltung für Quellcode und github ist ein Onlinedienst zur gemeinschaftlichen Versionsverwaltung für Softwareprojekte.
Quelle: Wikipedia
Dort stellst Du primär den Quellcode nebst einer Beschreibung Deiner Anwendung zur Verfügung.
Wenn es Abhängigkeiten gibt, müssen die natürlich irgendwie ersichtlich sein: "RTFM" geht nur, wenn es auch "FM" gibt!
Dort können auch Releases veröffentlicht werden, die als Binärpakete (in Deinem Fall ein AppImage) verfügbar sind.
Im günstigsten Fall hast Du einen github-Account, auf dem Du Sourcecode und Releases veröffentlichst.
Dann kann sich jeder den Quellcode anschauen, weiter verbessern, PullRequests erstellen, etc. pp.
@elevatormind:
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,
That's why i'm asking which system and what QET-version you have!
We support several systems here, where the files are located in different directories!
You have to help with information so that we can help you!
search your system for "nomenclature.json" or "summary.json"
How can I tell, if you have not yet provided any information about your system!
OS, QET-Version, ...
All the best for your health, Laurent!
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.
That is not yet implemented.
You can overwrite entries with empty strings or you can edit the corresponding json file directly with a text editor.
The json-files are located in configuration-dir.
It does not help, posting the same question in more than one thread!
Deleted the other post!
In my "liberation-fonts" branch, the liberation fonts is directly usable in QET
That's what I mean! Top!
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!
It should definitely be the default font in QET as you say though, otherwise people will probably not use it.
Fully agree!
@elevatormind:
I'll try to work on a replacement for KAutoSaveFile (...)
Just noticed this warning:
QMetaObject::connectSlotsByName: No matching signal for on_m_color_kpb_changed(QColor)
and when searching for the slot/signal it returns this file:
sources/editor/ui/dynamictextfieldeditor.cpp
with this function:
void DynamicTextFieldEditor::setupWidget()
{
m_color_kpb = new ColorButton(this);
m_color_kpb->setObjectName(QString::fromUtf8("m_color_kpb"));
connect(m_color_kpb, &ColorButton::changed,
this, &DynamicTextFieldEditor::on_m_color_kpb_changed);
ui->m_main_grid_layout->addWidget(m_color_kpb, 6, 1, 1, 2);
}
@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.
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
Das große Thema "Klemmleisten-Manager", das Joshua in die nächste stabile Version 0.10 reinbringen möchte, ist ja auch im Menüeintrag noch als "DEV" gekennzeichnet und entsprechend nicht fertig! Die solltest Du in Deinen Projekten nicht verwendet haben! Die werden bestimmt nicht unterstützt von einer älteren Version!
Das Python-Klemmleisten-Plugin ist davon aber nicht betroffen. Das sollte gehen.
Du kannst aber sicher sein, daß an Versionen < 0.10 nicht mehr entwickelt wird!
Aussagekräftige Fehlermeldungen sind zwar immer schön zu haben, aber ...
Wie heißt es immer so schön bei Open-Source-Projekten: Keine Garantie in jedwede Richtung!
@RedBaron:
Depends on what you modify:
Read the linked thread!
Generally speaking: yes.
But be sure to have a backup!
I sehe gerade ich habe die 0.8.0
Update auf 0.10-dev dringend empfohlen!
Und im Forum habe ich gefunden das jemand M und F eingebaut hat.
Der "Jemand", der das in den Element-Editor eingebaut hat, antwortet Dir gerade!
Hm. Den den Use Case innerhalb des Baumes hatte ich noch nicht. Ich wolle den Beispielstecker aus dem Zip als libary Element von der Platte importieren. Das war ein m.W. QET format.
Den Use-Case hast Du gerade selber geschrieben:
Wenn Du ein QET-Projekt öffnest, baut sich im Element-Baum eine weitere Sammlung "Importierte Elemente" auf.
Da sind die Elemente des Projekts aufgelistet. Die kannst Du auch in deine Firmen- oder Benutzer-Sammlung ziehen!
Im Element-Eitor gibt es die Menüpunkte "Aus Datei öffnen" und "speichern unter"...
Alternativ kopierst Du die *.elmt - Datei per Datei-Browser in Deine Benutzersammlung.
QElectroTech → Posts by plc-user
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.028 seconds (53% PHP - 47% DB) with 5 queries