[Interest] cross-language matching of QStrings: partial success only?

Till Oliver Knoll till.oliver.knoll at gmail.com
Tue May 12 08:08:57 CEST 2015



> Am 12.05.2015 um 00:07 schrieb René J.V. Bertin <rjvbertin at gmail.com>:
> 
> On Monday May 11 2015 23:00:36 Till Oliver Knoll wrote:
> 
> Hi,
> 
> Didn't see your message before sending my previous reply.
> 
>> Each name record is associated with an Encoding ID and Language ID. It would be no fun if those IDs would be interpreted the same across platforms (that's why we have cross-platform toolkits such as Qt to deal with that mess ;)):
> 
> I don't think Qt is dealing directly with TTF or OTF files, but rather uses whatever the OS gives it. Did I miss something?

Most likely no. My point was merely to re-iterate and illustrate what a royal pain it can be even "at the font level".

And we even haven't yet talked about X11 font formats ;) (altough there it might actually be /simpler/).

> 
> ...
> 
>> But IF you have that, you could do a heuristic matching by:
>> 
>> - always compare english values
>> - if not, translate into english values first by
>> - having a predefined set of "supported languages" for typical font names and styles: "bold", "fett", "gras" etc
> 
> That exists (translate("QFontDatabase","Bold")) but only for a limited subset of font styles and weights.

Yes, something line that.

I have never heard about "Universally Unique Font Style Enums" and in my memory font matching was always a "fuzzy thing".

But the good news seems to be that you are working "under the hood", so you have access to more powerful font APIs which might help.

The bad news is probably that you have to deal with those non-Qt APIs ;)

Good luck!
  Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150512/ed5dcbb7/attachment.html>


More information about the Interest mailing list