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

Add in support for setting the font size of text correctly based on the DXF #21

Open
Vadoola opened this issue Oct 17, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Vadoola
Copy link
Owner

Vadoola commented Oct 17, 2024

Discussed at: https://qelectrotech.org/forum/viewtopic.php?pid=20498#p20498.

Looks like in the dxf the text size in stored as a height, in an f64, I'm assuming in the same units as the rest of the drawing, ie mm, inches, etc. Would need to convert into font size.

@Vadoola Vadoola added the enhancement New feature or request label Oct 17, 2024
@Vadoola Vadoola self-assigned this Oct 17, 2024
@Vadoola
Copy link
Owner Author

Vadoola commented Dec 17, 2024

I'm not sure what other information or features dxf supports on text, but there are other things that I might be able to support like color, underline, bold, etc, I'm not really sure.

To support adding these in, I need to figure out how to generate the font string that is stored in the elmt file.

It looks like it's just using QFont::toString(), which at the linked doc gives the order they are output in the comma separated list, but doesn't give me all the info, such as font style, what value equals what etc....might need to look elsewhere or dig into the Qt source...

I also found this bug report for Wireshark, about possible incompatibility between the font strings generated by Qt5 and Qt6. Right now QET is built using Qt5, but I know they are working on porting to Qt6, just something I need to keep in mind.

edit: found this link, and some of the fields like "underlined" are bools, and show as false instead of 0. It looks like it was posted (or updated) about a week ago, so it is most likely Qt6. I wonder if this is the incompatibility mentioned in the Wireshark bug report.

@Vadoola
Copy link
Owner Author

Vadoola commented Dec 26, 2024

plc-user gave me this link in regards to font information for Qt and QET: https://qelectrotech.org/forum/viewtopic.php?id=2637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant