ubuntu - draft dimensions/annotations fonts not working

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: ubuntu - draft dimensions/annotations fonts not working

Post by triplus »

Hi @Giulio Buccini.

Could you try out:

Code: Select all

sudo apt-get install libfontconfig1-dev
P.S. And please attach the list of packages you will install along with it.
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: ubuntu - draft dimensions/annotations fonts not working

Post by Giulio Buccini »

Code: Select all

sudo apt-get install libfontconfig1-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libexpat1-dev libfreetype6-dev libpng12-dev zlib1g-dev
The following NEW packages will be installed:
  libexpat1-dev libfontconfig1-dev libfreetype6-dev libpng12-dev zlib1g-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2.081 kB of archives.
After this operation, 8.239 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Should I go with installation? :?
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: ubuntu - draft dimensions/annotations fonts not working

Post by triplus »

Giulio Buccini wrote:Should I go with installation? :?
Yes.
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: ubuntu - draft dimensions/annotations fonts not working

Post by Giulio Buccini »

Code: Select all

Get:1 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1-dev amd64 2.1.0-7ubuntu0.16.04.2 [115 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4 [168 kB]
Get:3 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 libpng12-dev amd64 1.2.54-1ubuntu1 [184 kB]
Get:4 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 libfreetype6-dev amd64 2.6.1-0.1ubuntu2 [956 kB]
Get:5 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libfontconfig1-dev amd64 2.11.94-0ubuntu1.1 [658 kB]
Fetched 2.081 kB in 3s (673 kB/s)           
Selecting previously unselected package libexpat1-dev:amd64.
(Reading database ... 332873 files and directories currently installed.)
Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.2_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.2) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4) ...
Selecting previously unselected package libpng12-dev:amd64.
Preparing to unpack .../libpng12-dev_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-dev:amd64 (1.2.54-1ubuntu1) ...
Selecting previously unselected package libfreetype6-dev:amd64.
Preparing to unpack .../libfreetype6-dev_2.6.1-0.1ubuntu2_amd64.deb ...
Unpacking libfreetype6-dev:amd64 (2.6.1-0.1ubuntu2) ...
Selecting previously unselected package libfontconfig1-dev:amd64.
Preparing to unpack .../libfontconfig1-dev_2.11.94-0ubuntu1.1_amd64.deb ...
Unpacking libfontconfig1-dev:amd64 (2.11.94-0ubuntu1.1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 3 added doc-base files...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.2) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4) ...
Setting up libpng12-dev:amd64 (1.2.54-1ubuntu1) ...
Setting up libfreetype6-dev:amd64 (2.6.1-0.1ubuntu2) ...
Setting up libfontconfig1-dev:amd64 (2.11.94-0ubuntu1.1) ...
And now? :?
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: ubuntu - draft dimensions/annotations fonts not working

Post by triplus »

Giulio Buccini wrote: And now? :?
Well open up FreeCAD and business as usual. ;)
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: ubuntu - draft dimensions/annotations fonts not working

Post by Giulio Buccini »

It works!
It works!
It works!
:o :D :D
I'm happy like a tornado in a caravan parking zone! :D

So that libs was missing or what???
(I would like to update my bug report)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: ubuntu - draft dimensions/annotations fonts not working

Post by triplus »

Giulio Buccini wrote:It works!
It works!
It works!
:o :D :D
I'm happy like a tornado in a caravan parking zone! :D
;)
So that libs was missing or what???
(I would like to update my bug report)
Well i don't have a final answer for that ATM and likely for now i won't investigate this further. As i wanted to push first release of ShortCuts out ASAP but stuff like this changes priorities a bit. ;) My goal was to find out why some users are having issues and some not on the same system. I feel that this question was answered.

Now as for why libfontconfig1-dev (development files) are needed as runtime dependency and why it doesn't work when just providing libfontconfig1 runtime library. As Yorik doesn't need libfontconfig1-dev (development files) on Debian if he shared full output i would guess it could come down to packaging issue. Now not necessary FreeCAD packaging issue. It could be Ubuntu package has issue and/or some symlink is missing. For more definitive answer this would need to be investigated further.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: ubuntu - draft dimensions/annotations fonts not working

Post by NormandC »

yorik wrote:I'm unable to reproduce the problem on my system (being 0.16 or 0.17). Most probably something missing on the Coin3D side...
This page explains how Coin locates fonts https://grey.colorado.edu/coin3d/classSoFont.html
Apparently on linux it uses the freetype library.
libfreetype6-dev is already a FreeCAD dependency on both the Daily and Stable PPAs.
https://git.launchpad.net/~freecad-main ... ontrol#n22

The FreeCAD binary package therefore has a dependency on libfreetype6.
Giulio Buccini wrote:So that libs was missing or what???
It could be libfontconfig1-dev, or it could be any of its dependencies:
Giulio Buccini wrote:

Code: Select all

The following additional packages will be installed:
  libexpat1-dev libfreetype6-dev libpng12-dev zlib1g-dev
Notice that libfreetype6-dev is there...
triplus wrote:I think i ruled freetype out earlier today
Did you mean the libfreetype-dev package, or just the runtime package?

I'm really puzzled that a development package would be required here. :?

Maybe it's been working all this time for Yorik, triplus and myself because we have all compiled FreeCAD at some point, so we already have these libraries installed on our systems.
triplus wrote:It could be Ubuntu package has issue and/or some symlink is missing.
But remember that Ulrich wrote he has the same problem on a Windows 7 PC...

viewtopic.php?f=3&t=13886&start=10#p132934
triplus wrote:For more definitive answer this would need to be investigated further.
I've been procrastinating on installing 16.04 LTS on my home desktop PC, I'll try to think about this when I do manage it...
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: ubuntu - draft dimensions/annotations fonts not working

Post by Giulio Buccini »

Anyway, I'm glad that my problem was solved. I'm a final user, this means that I don't want to go too deep in lib-dependency problems. :D
At the same time, I hope that the package problem (Ubuntu? FreeCAD?) will be fixed in the next release or, as minimum, a clear notice will be published for Ubuntu 16 users.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: ubuntu - draft dimensions/annotations fonts not working

Post by triplus »

NormandC wrote:I've been procrastinating on installing 16.04 LTS on my home desktop PC, I'll try to think about this when I do manage it...
You don't have to do that. Just remove libfontconfig1-dev on your Ubuntu 14.04 install and it will stop working. Likely the same behaviour can be observed on Ubuntu 12.04.

Anyway i felt i should investigate this a bit further as packaging issue isn't resolved/explained. Therefore this is most likely what is happening. Somewhere in the Ubuntu 11.04 era multiarch folder structure/paths started being used. Therefore libfontconfig1 library is now installed in /usr/lib/x86_64-linux-gnu/ on 64bit systems and in /usr/lib/i386-linux-gnu/on 32bit systems. Likely Coin library hasn't adapted to this change yet and it is still searching for the library in /usr/lib path. Creating symlink:

Code: Select all

sudo ln -s /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 /usr/lib/libfontconfig.so
Therefore enables the Coin library to find the libfontconfig1 runtime library for me on Ubuntu 16.04.

This needs to be addressed upstream:

https://bitbucket.org/Coin3D/coin/wiki/Home

If anybody has an account issue report can be opened. Something like Coin is searching for the libfontconfig1 runtime library in the wrong place on Debian/Ubuntu.

It could probably be addressed in Debian/Ubuntu Coin package:

https://launchpad.net/ubuntu/+source/coin3/+bugs

Therefore if anybody has Launchpad account the same issue report can be opened there.

If anything of the above will happen compiling FreeCAD on Debian/Ubuntu and after using FreeCAD should start working as expected. Until that happens user needs to install libfontconfig1-dev package to have this functionality or to add symbolic link:

Ubuntu (likely Debian) 64bit:

Code: Select all

sudo ln -s /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 /usr/lib/libfontconfig.so
Ubuntu (likely Debian) 32bit:

Code: Select all

sudo ln -s /usr/lib/i386-linux-gnu/libfontconfig.so.1 /usr/lib/libfontconfig.so
As for the PPA i haven't done any tests but something like this might work (rules file):

Code: Select all

ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libfontconfig.so.1  /usr/lib/libfontconfig.so
P.S. That is it from my side for now.
Post Reply