[Bug?] An Arch Space produces wrong text sizes for the first line

A forum dedicated to the Draft, Arch and BIM workbenches development.
Posts: 410
Joined: Thu Oct 18, 2018 9:18 pm

[Bug?] An Arch Space produces wrong text sizes for the first line

Postby vocx » Sun Oct 21, 2018 3:19 am

Create a closed Draft Wire, then an Arch Structure, and then an Arch Space.

In the Property view the Space has an initial font size that is quite small, for example, 12 mm. This value appears in both First Line, and Font Size. The initial Text is [$label,$area], which results in displaying the label of the object (defaults to "Space"), and the calculated area of the space, in two lines.
  1. Change First Line to a larger value, for example, 150 mm; the text "Space" grows large.
  2. Change Font Size to the same value, 150 mm; the text that shows the area "5.800" grows large, however, at the same time the text "Space" grows much larger.
FreeCad_Arch_space_text_01.png (85.03 KiB) Viewed 128 times
Both the first line and the second line have the same font size (150 mm), but the former looks much bigger.
  • In order to correct this problem, go back to First Line, change the size to something different, say, 100 mm, and then again to 150 mm.
  • Change the Line Spacing to 2.000 so the text elements "Space" and "5.800" don't overlap.
  • Now both lines of text are the same size and look fine.
FreeCad_Arch_space_text_02.png (66.14 KiB) Viewed 128 times
So, I think the bug is that when the Space is newly created, it does not quite respect the values of First Line and Font Size.

What are the units of Line Spacing? Is it a multiplier for First Line?

The same appearance can be obtained by using a different combination of First Line, Font Size and Line Spacing.
FreeCad_Arch_space_text_03.png (61.62 KiB) Viewed 128 times

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14995 (Git)
Build type: Release
Branch: master
Hash: 7b866816785ac1ca9787b63d4bff12873bb3a593
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)