Version 0.19 TechDraw problem

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Pafnutij
Posts: 13
Joined: Sat Nov 21, 2020 1:54 pm

Re: Version 0.19 TechDraw problem

Post by Pafnutij »

I just now saw that you can attach files directly...
TextTest.FCStd
(11.56 KiB) Downloaded 18 times
domad
Veteran
Posts: 2051
Joined: Mon Jun 22, 2020 12:16 pm

Re: Version 0.19 TechDraw problem

Post by domad »

Greetings to the Community!

Code: Select all

OS: Linux Mint 20.3 (X-Cinnamon / cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.28751 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 660655e)
Hash: 660655e54c97b5017ff0ac1e030059308cd4e3f5
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
I confirm, I add that it also happens for the "Balloon" function
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Version 0.19 TechDraw problem

Post by wandererfan »

Old versions set font size in points. New versions set font size in pixels. Since points are bigger than pixels, the text looks small in new versions.

A macro to adjust text size for annotations, balloons and dimensions is here: https://github.com/FreeCAD/FreeCAD-macr ... 18.FCMacro
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Version 0.19 TechDraw problem

Post by Roy_043 »

Isn't it possible to handle the conversion factor internally so that the Text Size property value matches the actual size?
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Version 0.19 TechDraw problem

Post by wandererfan »

Roy_043 wrote: Tue Apr 26, 2022 6:47 pm Isn't it possible to handle the conversion factor internally so that the Text Size property value matches the actual size?
Not really. Two different fonts in the same nominal size can have very different sized glyphs. You'd have to measure the actual font to get an exact conversion factor.
Pafnutij
Posts: 13
Joined: Sat Nov 21, 2020 1:54 pm

Re: Version 0.19 TechDraw problem

Post by Pafnutij »

@wandererfan Thanks for your macro.
wandererfan wrote: Tue Apr 26, 2022 11:38 pm Not really. Two different fonts in the same nominal size can have very different sized glyphs. You'd have to measure the actual font to get an exact conversion factor.
Do I understand correctly that the problem will not be solved in the future either. So if I want 7mm text, do I have to enter 9.33mm!?

By the way: The templates are correct if you save the file and open it again...
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Version 0.19 TechDraw problem

Post by wandererfan »

Pafnutij wrote: Wed Apr 27, 2022 10:55 am Do I understand correctly that the problem will not be solved in the future either. So if I want 7mm text, do I have to enter 9.33mm!?
If you are using v018, then yes. If you are using v019 or v020, then it depends on how you measure the text and what font you are using. If you want the tallest glyph to be exactly 10mm, you will have to fiddle. If you are content with the usual bit of blank space above and/or below text, then you can just specify the height in mm.

The grid in the picture is 10mm. So if you want the "b" in "Ubuntu" to be exactly 10mm high, you will have to specify 12mm text. For a different font, it might be a different number.
Attachments
fontSizesv020.png
fontSizesv020.png (28.53 KiB) Viewed 1117 times
Pafnutij
Posts: 13
Joined: Sat Nov 21, 2020 1:54 pm

Re: Version 0.19 TechDraw problem

Post by Pafnutij »

Too bad.
Maybe the bug or the feature will be fixed in one of the next versions, that like in version 0.18 a 5mm text is also 5mm high.
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Version 0.19 TechDraw problem

Post by kaktus »

Hi.
:mrgreen:

Allow me to speak in the discussion. :roll:

The issue requires the establishment of specific criteria - at least, we need to determine how to define font size.

Let's assume that the font matrix consists of pixels of 8x4 layout (8 is the height). With such an assumption one has to pay attention that for example the letter b does not occupy the whole font matrix, neither does the letter o or the letter y.
So you need to establish a rule for dimensioning the font when specifying its length. And you have to do it so that it is communicative for the user.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
Pafnutij
Posts: 13
Joined: Sat Nov 21, 2020 1:54 pm

Re: Version 0.19 TechDraw problem

Post by Pafnutij »

Since it is about the creation of technical plans, the definition is easy in my opinion. If I create a lettering by hand, I use a 5mm stencil and then the lettering is 5mm high (refers to capital letters e.g. H). Fortunately, this also works in 0.18, which I continue to use.
Post Reply