Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 5806
Joined: Thu Jan 05, 2017 9:03 pm

Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby Kunda1 » Thu Jun 28, 2018 1:19 pm

issue #3254 Wrong paths to fonts occur when you exchange models between different systems. An 'Embed' option would be useful

Original thread: https://forum.freecadweb.org/viewtopic. ... 05#p198775

Discussion thread dedicated for this feature. Please contribute
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 19043
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby chrisb » Thu Jun 28, 2018 3:11 pm

I would appreciate the option. The linked discussion is about a certain workbench, but it occurs in core FreeCAD as well if using ShapeString.
For copyright reasons it is necessary to have the option to not include the fonts.
wandererfan
Posts: 3088
Joined: Tue Nov 06, 2012 5:42 pm

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby wandererfan » Fri Jun 29, 2018 1:46 pm

Font files can be quite large. 250kb and up. Probably bigger than the rest of the fcstd combined.

Maybe a function to remap paths when fonts aren't found?
chrisb
Posts: 19043
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby chrisb » Fri Jun 29, 2018 3:23 pm

wandererfan wrote:
Fri Jun 29, 2018 1:46 pm
Font files can be quite large. 250kb and up.
Arial.ttf is 700kB, that is a lot!

Maybe a function to remap paths when fonts aren't found?
Good idea, I guess it's a common workflow (at least outside the forum) that a FreeCAD file is used only on a very limited number of systems.
User avatar
DeepSOIC
Posts: 7074
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby DeepSOIC » Fri Jun 29, 2018 4:09 pm

Lattice's ShapeString supports relative font path. It is searched for, among other places, in project directory. So even though it doesn't embed the font into FCStd, it is easy to bundle. Does Draft offer the same - I don't know actually...
chrisb
Posts: 19043
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby chrisb » Fri Jun 29, 2018 4:33 pm

A relative path can be entered in the properties and is respected. It is not possible to select a relative path when using the file selection box.
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby hokieengr » Sat Jun 30, 2018 6:22 pm

wandererfan wrote:
Fri Jun 29, 2018 1:46 pm
Font files can be quite large. 250kb and up. Probably bigger than the rest of the fcstd combined.

Maybe a function to remap paths when fonts aren't found?
Is that really a lot anymore? I mean, sure, if you're running FreeCAD from hand made core rope memory but this is 2018 and my refrigerator uses more than that!

I'd suggest an option to embed the font in a given document. That way the user can decide if increasing file size is worth the reward.

I work in a very technical field and I can say from personal experience that these little things can be very important. It can be the difference between opening a file from a colleague and moving on or spending half of your day reformatting everything because the font is wrong. Heck, I'd gladly triple my Simulink model file sizes if that meant different versions would actually place nice together!
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby NormandC » Sun Jul 01, 2018 3:39 pm

I think this has the potential for being very problematic, licensing wise. Fonts provided on Windows and macOS are not open source, an end user most certainly does not have the right to distribute them.

Adobe products like InDesign have the option to bundle fonts with a project, it's normal because this is for the publishing industry, it's a very small user base - and they pay for their fonts. Here we're talking about a wide variety of users who aren't aware of these licensing issues.

This definitely should not be enabled by default. And it would be preferable I think to offer font substitution, at least as a fallback.

wandererfan wrote:
Fri Jun 29, 2018 1:46 pm
Maybe a function to remap paths when fonts aren't found?
Do you mean to convert a ShapeString into a "dumb" set of curves, breaking the link to the font? Inkscape can do that. (On the other hand, this is already possible by using Draft Downgrade)
User avatar
DeepSOIC
Posts: 7074
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby DeepSOIC » Sun Jul 01, 2018 3:48 pm

NormandC wrote:
Sun Jul 01, 2018 3:39 pm
Fonts provided on Windows and macOS are not open source, an end user most certainly does not have the right to distribute them.
That's quite an interesting problem. I can embed fonts into pdfs and such, and freely distribute the pdf. What's the problem here?


AFAIK Microsoft does allow embedding most fonts into a file.
https://docs.microsoft.com/en-us/typogr ... soft-fonts
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Feature #3254 Embed font into FCSTD file for better model exchange between different systems

Postby NormandC » Sun Jul 01, 2018 3:54 pm

DeepSOIC wrote:
Sun Jul 01, 2018 3:48 pm
AFAIK Microsoft does allow embedding most fonts into a file.
I find that FAQ confusing. This is what I'm talking about:
Microsoft's Font redistribution FAQ wrote:The fonts are governed by the same restrictions as the products they are supplied with. You are not allowed to copy, redistribute or reverse engineer the font files.
Yet embedding is allowed.

What's the difference between redistributing and embedding font files??? :?