https://bugs.documentfoundation.org/show_bug.cgi?id=155486

--- Comment #16 from ⁨خالد حسني⁩ <kha...@libreoffice.org> ---
(In reply to Regis Perdreau from comment #15)
> The link you pointed almost explains the opposite... but with many "should"
>  conditionnal, the author is probably embarassed with this question.
> 
> 
> "A file containing a single font resource with TrueType outlines should have
> either .OTF or .TTF extension. The choice between .OTF and .TTF may depend
> on the desire for backward compatibility on older systems or with previous
> versions of the font.
> A file containing a single font resource with only CFF outline data (no
> TrueType outlines) should have an .OTF extension."
> 
> I have an otf font which have never previous ttf version and only CFF
> outline, so we could expect to have a conservative attitude and keep otf
> extension. 
> 
> If extension is not hard linked to the real file content,   it's an user
> indicator of what the file is supposed to be... I don't think it's a good
> practice to change it on the fly. Help doesn't  mention it. 
> 
> I close the ticket.
> 
> Thanks for your help.

When we embed the font, we don’t know what its original file extension is, and
on some systems (namely Windows and macOS) we never get access to the original
file, only its data loaded in memory.

So whatever file extension we use will always be a guess. We can add some code
to detect if the font has a CFF table and change the file extension
accordingly, but that is so much work for something users are not supposed to
see any way (I don’t think extracting the ODT file and looking at its content
is a general practice that we need to worry so much about).

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to