[Interest] Fonts not rendering!-solved

Lata Agrawal lata.agrawal at enrouteinc.com
Sun Jul 1 08:39:48 CEST 2012


The fonts were not rendering properly because of some missing system files.
Device was not prepared properly. Thanks a ton, everyone for helping us
rule out any QT related problems and narrow down the problem.

Regards,
Lata

On 29 June 2012 14:17, Lata Agrawal <lata.agrawal at enrouteinc.com> wrote:

> Sorry for the previous message, sent it by mistake.
>
> Regards,
> Lata
>
>
> On 29 June 2012 14:15, Lata Agrawal <lata.agrawal at enrouteinc.com> wrote:
>
>> without network connection.
>>
>> On 28 June 2012 09:10, Lata Agrawal <lata.agrawal at enrouteinc.com> wrote:
>>
>>> Thanks Atlant for the time and info you have provided here. I will
>>> follow what you have recommended and hopefully be able to solve the problem.
>>>
>>> Thanks again and best regards,
>>> Lata
>>>
>>>
>>> On 28 June 2012 00:33, Atlant Schmidt <aschmidt at dekaresearch.com> wrote:
>>>
>>>>  Lata:
>>>>
>>>> ****
>>>>
>>>> Desktop > grep -i 'q[sp]f' QScrollLabelLog.txt****
>>>>
>>>> stat64("/tmp/qtembedded-0//fonts/dejavu_sans_12_75.qsf",
>>>> {st_mode=S_IFREG|0644, st_size=17284, ...}) = 0****
>>>>
>>>> stat64("/tmp/qtembedded-0//fonts/dejavu_sans_12_50.qsf",
>>>> {st_mode=S_IFREG|0644, st_size=18600, ...}) = 0****
>>>>
>>>> unlink("/tmp/qtembedded-0//fonts/dejavu_sans_12_50.qsf") = 0****
>>>>
>>>> unlink("/tmp/qtembedded-0//fonts/dejavu_sans_12_75.qsf") = 0****
>>>>
>>>> ** **
>>>>
>>>> access("/tmp/qtembedded-0//fonts/dejavu_sans_12_50.qsf", F_OK) = -1
>>>> ENOENT (No such file or directory)****
>>>>
>>>> open(  "/tmp/qtembedded-0//fonts/dejavu_sans_12_50.qsf",
>>>> O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0644) = 13****
>>>>
>>>> write( 13, "QPF2\0\0\0\0\2\0\0\324\0\0\0\vDejaVu Sans\0\1\0H/"...,
>>>> 16596) = 16596****
>>>>
>>>> ** **
>>>>
>>>> access("/tmp/qtembedded-0//fonts/dejavu_sans_12_75.qsf", F_OK) = -1
>>>> ENOENT (No such file or directory)****
>>>>
>>>> open(  "/tmp/qtembedded-0//fonts/dejavu_sans_12_75.qsf",
>>>> O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0644) = 14****
>>>>
>>>> write( 14, "QPF2\0\0\0\0\2\0\0\330\0\0\0\vDejaVu Sans\0\1\0M/"...,
>>>> 16588) = 16588****
>>>>
>>>> ** **
>>>>
>>>>   In general, this looks like the right stuff is going on. It indicates
>>>>   that Qt has opened the temporary cache file (.qsf in this case)
>>>>   for the Déjà vu sans-serif font in the 12 point size for both
>>>>   the regular (‘50’) and bold (‘75’) weights.****
>>>>
>>>>
>>>>   It wrote quite a bit of data to each file so probably all the
>>>>   correct header stuff and **MAYBE** the rendering of the
>>>>   first few glyphs.****
>>>>
>>>> ** **
>>>>
>>>>   I’m not sure where you should go next, but maybe it’s time
>>>>   to consider whether things like text color and transparency are
>>>>   correct (so that you’d actually be able to see the text drawn on
>>>>   the buttons).****
>>>>
>>>> ** **
>>>>
>>>>   It **IS** possible, by the way, to decode what’s in one of these
>>>>   .QPF/.qsf files. I have a Perl script that does this but I’m afraid my
>>>>   management wouldn’t agree to share it, but I know you could do the
>>>>   same reverse-engineering that I did. Try dumping the file with a
>>>> variety
>>>>   of printout widths and you should eventually see the bitmaps of your
>>>>   rendered characters****
>>>>
>>>> ** **
>>>>
>>>>   Note that the character bitmaps are stored in the .QPF/.qsf file only
>>>>   once and in the exact same order as they were first used by you, so
>>>>   if your button contained the text “Hello, world from Atlant!”, the
>>>>   glyphs in the file would be in the following order:****
>>>>
>>>> ** **
>>>>
>>>>     Helo,wrdfmAtlan!****
>>>>
>>>> ** **
>>>>
>>>>   In the file, the glyphs vary in width depending on the font metrics
>>>>   but they are always an even (or even multiple of 4?) in width.****
>>>>
>>>> ** **
>>>>
>>>>                                               Atlant****
>>>>
>>>> ** **
>>>>
>>>> ** **
>>>>
>>>> *From:* Lata Agrawal [mailto:lata.agrawal at enrouteinc.com]
>>>> *Sent:* Wednesday, June 27, 2012 2:09 PM
>>>> *To:* Atlant Schmidt
>>>> *Cc:* Konstantin Tokarev; interest at qt-project.org
>>>>
>>>> *Subject:* Re: [Interest] Fonts not rendering!****
>>>>
>>>>  ** **
>>>>
>>>> Atlant, Thanks for replying.
>>>>
>>>> I checked strace according to which .qpf files are created at
>>>> /tmp/qtembedded-0//fonts on my device. Qt app is also able to access the
>>>> temporarily created font files.
>>>> Can you please go through the strace (attached here) and suggest whats
>>>> possibly gone wrong?
>>>>
>>>> Regards,
>>>> Lata****
>>>>
>>>> On 27 June 2012 21:15, Atlant Schmidt <aschmidt at dekaresearch.com>
>>>> wrote:
>>>>
>>>> ****
>>>>
>>>> Lata:****
>>>>
>>>>  ****
>>>>
>>>>   When your app is running, Qt should produce temporary .qpf files
>>>>   in your system’s fonts folder (for example,
>>>> /usr/lib/fonts/helvetica_100_50.qpf).
>>>>   These represent a cache of glyphs that Qt has already rendered from
>>>>   the scalable font file. (In the case of my example, the Helvetica font
>>>>   rendered at 10.0 points, normal weight.)****
>>>>
>>>>  ****
>>>>
>>>>   See if these files are there; that may give you some clue as to how
>>>>   far font processing got.****
>>>>
>>>>  ****
>>>>
>>>>                                       Atlant****
>>>>
>>>>  ****
>>>>
>>>>  ****
>>>>
>>>> *From:* interest-bounces+aschmidt=dekaresearch.com at qt-project.org[mailto:
>>>> interest-bounces+aschmidt=dekaresearch.com at qt-project.org] *On Behalf
>>>> Of *Lata Agrawal
>>>> *Sent:* Wednesday, June 27, 2012 11:12 AM
>>>> *To:* Konstantin Tokarev
>>>> *Cc:* interest at qt-project.org
>>>> *Subject:* Re: [Interest] Fonts not rendering!****
>>>>
>>>>  ****
>>>>
>>>> In configure command for QT, I have used -qt-freetype. That should
>>>> build freetype support, right?****
>>>>
>>>> On 27 June 2012 20:38, Konstantin Tokarev <annulen at yandex.ru> wrote:***
>>>> *
>>>>
>>>>
>>>> 27.06.2012, 19:06, "Lata Agrawal" <lata.agrawal at enrouteinc.com>:****
>>>>
>>>> > Hi,
>>>> >
>>>> > I am working with an Embedded Linux/MIPS device. It has qt-4.6.2 libs
>>>> compiled using gcc-4.2.4 installed on it. LD_LIBRARY_PATH is set
>>>> appropriately.
>>>> >
>>>> > I tried running a simple QT app with a button on device. The app runs
>>>> fine but the text on button is not showing. I also executed the same app
>>>> with strace (log attached here). In strace log, app appears to find the
>>>> fonts in <QTDIR>/lib/fonts folder but still it is not rendering the text.
>>>> > When I execute the same app on similar device having Qt-4.6.2 libs
>>>> compiled using gcc-3.4.4, it shows the text properly.
>>>> >
>>>> > Can someone please check the strace and help me find out the reason
>>>> for fonts not rendering?****
>>>>
>>>> Do you build Qt with freetype? If not, you need fonts to be rasterized
>>>> to qpf2 format.
>>>>
>>>> --
>>>> Regards,
>>>> Konstantin****
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *
>>>> *Lata Agrawal
>>>> 9699750643
>>>> En Route Media Pvt. Ltd.
>>>>
>>>> *Winner of 'Innovative Creation of a New Medium' at the E4M & N2M
>>>> Awards 2012*
>>>> *                                 *
>>>>
>>>> ****
>>>>
>>>> Click here <https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==>to report this email as spam.
>>>> ****
>>>>
>>>> ** **
>>>>  ------------------------------
>>>>
>>>> This e-mail and the information, including any attachments, it contains
>>>> are intended to be a confidential communication only to the person or
>>>> entity to whom it is addressed and may contain information that is
>>>> privileged. If the reader of this message is not the intended recipient,
>>>> you are hereby notified that any dissemination, distribution or copying of
>>>> this communication is strictly prohibited. If you have received this
>>>> communication in error, please immediately notify the sender and destroy
>>>> the original message.
>>>>
>>>> Thank you.
>>>>
>>>> Please consider the environment before printing this email.****
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *
>>>> *Lata Agrawal
>>>> 9699750643
>>>> En Route Media Pvt. Ltd.
>>>>
>>>> *Winner of 'Innovative Creation of a New Medium' at the E4M & N2M
>>>> Awards 2012*
>>>> *                                 *****
>>>>
>>>> ------------------------------
>>>> This e-mail and the information, including any attachments, it contains
>>>> are intended to be a confidential communication only to the person or
>>>> entity to whom it is addressed and may contain information that is
>>>> privileged. If the reader of this message is not the intended recipient,
>>>> you are hereby notified that any dissemination, distribution or copying of
>>>> this communication is strictly prohibited. If you have received this
>>>> communication in error, please immediately notify the sender and destroy
>>>> the original message.
>>>>
>>>> Thank you.
>>>>
>>>> Please consider the environment before printing this email.
>>>>
>>>
>>>
>>>
>>> --
>>> *
>>> *Lata Agrawal
>>> 9699750643
>>> En Route Media Pvt. Ltd.
>>>
>>> *Winner of 'Innovative Creation of a New Medium' at the E4M & N2M
>>> Awards 2012*
>>> *                                 *
>>>
>>>
>>
>>
>> --
>> *
>> *Lata Agrawal
>> 9699750643
>> En Route Media Pvt. Ltd.
>>
>> *Winner of 'Innovative Creation of a New Medium' at the E4M & N2M Awards
>> 2012*
>> *                                 *
>>
>>
>
>
> --
> *
> *Lata Agrawal
> 9699750643
> En Route Media Pvt. Ltd.
>
> *Winner of 'Innovative Creation of a New Medium' at the E4M & N2M Awards
> 2012*
> *                                 *
>
>


-- 
*
*Lata Agrawal
9699750643
En Route Media Pvt. Ltd.

*Winner of 'Innovative Creation of a New Medium' at the E4M & N2M Awards
2012*
*                                 *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120701/958117f3/attachment.html>


More information about the Interest mailing list