All of lore.kernel.org
 help / color / mirror / Atom feed
* add dejavu-fonts to image
@ 2016-10-11 20:07 idealsim
  2016-10-13 10:07 ` Michel D'HOOGE
  0 siblings, 1 reply; 8+ messages in thread
From: idealsim @ 2016-10-11 20:07 UTC (permalink / raw)
  To: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

Hi, i have build an image for an imx6 card (secoA62) based on this good 
layer https://github.com/graugans/meta-udoo (krogoth branch). All work 
fine but since the last version of qt 5.7, qtbase-font is not provided 
and now i have this error when i deploy an app :

/QFontDatabase: Cannot find font directory /usr/lib/fonts.//
//Note that Qt no longer ships fonts. Deploy some (from 
//http://dejavu-fonts.org//for example) or switch to fontconfig./

Apparently we need to provide fonts with yocto now. Can you advise me 
how i can add ttf-dejavu to the image. I have tried to add it to my 
local.conf like this :

IMAGE_INSTALL_append = "\

             ttf-dejavu \

"

but i have an error during the build of the image rootfs !

Can you help please ?

Mickaël LE STEPHAN


[-- Attachment #2: Type: text/html, Size: 1284 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: add dejavu-fonts to image
  2016-10-11 20:07 add dejavu-fonts to image idealsim
@ 2016-10-13 10:07 ` Michel D'HOOGE
  2016-10-13 14:07   ` idealsim
  0 siblings, 1 reply; 8+ messages in thread
From: Michel D'HOOGE @ 2016-10-13 10:07 UTC (permalink / raw)
  To: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

Hello, 

In fact, the ttf-dejavu recipe doesn't provide a package with the same name. If you look at the PACKAGES variable, you'll find that it provides ${PN}-sans, ${PN}-sans-mono, ${PN}-sans-condensed, ${PN}-serif , ${PN}-serif-condensed & ${PN}-mathtexgyre. 

So you have to explicitly choose the packages you want. 

Michel 

[-- Attachment #2: Type: text/html, Size: 1964 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: add dejavu-fonts to image
  2016-10-13 10:07 ` Michel D'HOOGE
@ 2016-10-13 14:07   ` idealsim
  2016-10-13 14:56     ` Michel D'HOOGE
  0 siblings, 1 reply; 8+ messages in thread
From: idealsim @ 2016-10-13 14:07 UTC (permalink / raw)
  To: Yocto list discussion, Michel D'HOOGE

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Hello, thanks a lot the build work now !
But i have another issue, i would like to install the font in  
/usr/lib/fonts, this is not the case for the moment (it 's for Qt5.7 use).  
How i can said to yocto to install font (.ttf) on this folder please ?

regards

Mickaël

Le Thu, 13 Oct 2016 12:07:24 +0200, Michel D'HOOGE <michel.dhooge@free.fr>  
a écrit:

> Hello,
>
> In fact, the ttf-dejavu recipe doesn't provide a package with the same  
> name. If you look at the PACKAGES variable, you'll find that it  
> >provides ${PN}-sans, ${PN}-sans-mono, ${PN}-sans-condensed, ${PN}-serif  
> , ${PN}-serif-condensed & ${PN}-mathtexgyre.
>
>> So you have to explicitly choose the packages you want.
>
>> Michel



-- 
Utilisant le logiciel de courrier d'Opera : http://www.opera.com/mail/

[-- Attachment #2.1: Type: text/html, Size: 2806 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: add dejavu-fonts to image
  2016-10-13 14:07   ` idealsim
@ 2016-10-13 14:56     ` Michel D'HOOGE
  2016-10-13 15:59       ` idealsim
  0 siblings, 1 reply; 8+ messages in thread
From: Michel D'HOOGE @ 2016-10-13 14:56 UTC (permalink / raw)
  To: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 2357 bytes --]




Hello, thanks a lot the build work now ! 

I'm very proud: this is the 1st time I can help someone on Yocto! This means a lot to me ;-) 


<blockquote>


But i have another issue, i would like to install the font in /usr/lib/fonts, this is not the case for the moment (it 's for Qt5.7 use). How i can said to yocto to install font (.ttf) on this folder please ? 
</blockquote>
I also need to use Qt5.7, but since I'm currently on other tasks, you discover the troubles a couple of hours before me. So let's try to debug this together… 
<blockquote>


</blockquote>



1/ File ttf-dejavu_2.37.bb includes (requires) `ttf.inc` that is in the same folder. 
2/ File ttf.inc has the following method: 

do_install() { 
install -d ${D}${datadir}/fonts/truetype/ 
find ./ -name '*.tt[cf]' -exec install -m 0644 {} ${D}${datadir}/fonts/truetype/ \; 
} 


which is in turn appended by dejavu with: 

do_install_append () { 
install -d ${D}${sysconfdir}/fonts/conf.d/ 
install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/ 
} 


3/ The log of the install task of the recipe is /tmp/work/all-poky-linux/ttf-dejavu/2.37-r7/temp/run.do_install 
We have: 

export datadir="/usr/share" 

export sysconfdir="/etc" 



I compared to my Debian system: the files are stored in the same folders. So it seems this is qt that doesn't search in the "correct" place. 


4/ After some grepping in meta-qt5, I have: 



classes/qmake5_paths.bbclass 
OE_QMAKE_PATH_LIBS = "${libdir}" 



classes/qmake5_paths.bbclass 
OE_QMAKE_PATH_QT_FONTS = "${OE_QMAKE_PATH_LIBS}/fonts" 


5/ But I don't know what is the best solution now. We could change the OE_QMAKE_PATH_QT_FONTS variable. But this implies to recompile many pieces, I believe. 


So I opt for changing the do_install function. The quick & dirty solution is to create a ttf-dejavu_2.37.bbappend file that totally redefine the do_install method. 




do_install() { 
install -d ${D}${datadir}/fonts/truetype/ 
find ./ -name '*.tt[cf]' -exec install -m 0644 {} ${D}${ libdir }/fonts/truetype/ \; 

install -d ${D}${sysconfdir}/fonts/conf.d/ 
install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/ 
} 




I can't test it right now, but I hope this helps you. 


Michel 








[-- Attachment #2: Type: text/html, Size: 8313 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: add dejavu-fonts to image
  2016-10-13 14:56     ` Michel D'HOOGE
@ 2016-10-13 15:59       ` idealsim
  2016-10-13 16:12         ` Michel D'HOOGE
  0 siblings, 1 reply; 8+ messages in thread
From: idealsim @ 2016-10-13 15:59 UTC (permalink / raw)
  To: Yocto list discussion, Michel D'HOOGE

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

Thanks for this. I will try and let you know the solution worked for me !

regards

Le Thu, 13 Oct 2016 16:56:34 +0200, Michel D'HOOGE <michel.dhooge@free.fr>  
a écrit:

>> Hello, thanks a lot the build work now !
> I'm very proud: this is the 1st time I can help someone on Yocto! This  
> means a lot to me ;-)
>
>>> But i have another issue, i would like to install the font in  
>>> /usr/lib/fonts, this is not the case for the moment (it 's >>for Qt5.7  
>>> use). How i can said to yocto to install font (.ttf) on this folder  
>>> please ?
> I also need to use Qt5.7, but since I'm currently on other tasks, you  
> discover the troubles a couple of hours before >me. So let's try to  
> debug this together…
>
>> 1/ File ttf-dejavu_2.37.bb includes (requires) `ttf.inc` that is in the  
>> same folder.
> 2/ File ttf.inc has the following method:
> do_install() {
>    install -d ${D}${datadir}/fonts/truetype/
>    find ./ -name '*.tt[cf]' -exec install -m 0644 {}  
> ${D}${datadir}/fonts/>truetype/ \;
> }
>
>> which is in turn appended by dejavu with:
> do_install_append () {
>    install -d ${D}${sysconfdir}/fonts/conf.d/
>    install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf  
> ${D}${sysconfdir}/fonts/>conf.d/
> }
>
>> 3/ The log of the install task of the recipe is  
>> /tmp/work/all-poky-linux/ttf-dejavu/2.37-r7/temp/run.do_install
> We have:
> export datadir="/usr/share"
> export sysconfdir="/etc"
>
> I compared to my Debian system: the files are stored in the same  
> folders. So it seems this is qt that doesn't search >in the "correct"  
> place.
>
> 4/ After some grepping in meta-qt5, I have:
>
> classes/qmake5_paths.bbclass
> OE_QMAKE_PATH_LIBS = "${libdir}"
>
> classes/qmake5_paths.bbclass
> OE_QMAKE_PATH_QT_FONTS = "${OE_QMAKE_PATH_LIBS}/fonts"
>
> 5/ But I don't know what is the best solution now. We could change the  
> OE_QMAKE_PATH_QT_FONTS variable. >But this implies to recompile many  
> pieces, I believe.
>
> So I opt for changing the do_install function. The quick & dirty  
> solution is to create a ttf-dejavu_2.37.bbappend file >that totally  
> redefine the do_install method.
>
> do_install() {
>    install -d ${D}${datadir}/fonts/truetype/
>    find ./ -name '*.tt[cf]' -exec install -m 0644 {}  
> ${D}${libdir}/fonts/>truetype/ \;
>    install -d ${D}${sysconfdir}/fonts/conf.d/
>    install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf  
> ${D}${sysconfdir}/fonts/>conf.d/
> }
>
>
>> I can't test it right now, but I hope this helps you.
>
> Michel
>
>
>
>



-- 
Utilisant le logiciel de courrier d'Opera : http://www.opera.com/mail/

[-- Attachment #2.1: Type: text/html, Size: 8660 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: add dejavu-fonts to image
  2016-10-13 15:59       ` idealsim
@ 2016-10-13 16:12         ` Michel D'HOOGE
  2016-10-14  8:08           ` idealsim
  0 siblings, 1 reply; 8+ messages in thread
From: Michel D'HOOGE @ 2016-10-13 16:12 UTC (permalink / raw)
  To: Yocto list discussion

After solving all the QA issues, this bbappend creates RPM packages with fonts in the expected folder. I didn't try to generate an image but I'm quite confident about the result.
Michel


do_install() {
    install -d ${D}${libdir}/fonts/
    find ./ -name '*.tt[cf]' -exec install -m 0644 {} ${D}${libdir}/fonts/ \;
    install -d ${D}${sysconfdir}/fonts/conf.d/
    install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/
}

FILES_${PN}-sans            = "${libdir}/fonts/DejaVuSans.ttf ${libdir}/fonts/DejaVuSans-*.ttf"
FILES_${PN}-sans-mono       = "${libdir}/fonts/DejaVuSansMono*.ttf"
FILES_${PN}-sans-condensed  = "${libdir}/fonts/DejaVuSansCondensed*.ttf"
FILES_${PN}-serif           = "${libdir}/fonts/DejaVuSerif.ttf ${libdir}/fonts/DejaVuSerif-*.ttf"
FILES_${PN}-serif-condensed = "${libdir}/fonts/DejaVuSerifCondensed*.ttf"
FILES_${PN}-mathtexgyre     = "${libdir}/fonts/DejaVuMathTeXGyre.ttf"


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: add dejavu-fonts to image
  2016-10-13 16:12         ` Michel D'HOOGE
@ 2016-10-14  8:08           ` idealsim
  2016-10-17  7:51             ` <DKIM> " idealsim
  0 siblings, 1 reply; 8+ messages in thread
From: idealsim @ 2016-10-14  8:08 UTC (permalink / raw)
  To: Michel D'HOOGE, Yocto list discussion

Ok, i will test this week end and let you know !

Otherwise, if you build qt5.7 perhaps you can have the same issue like 
me with sdk, see here for more details :

https://github.com/graugans/meta-udoo/issues/20

regards


Le 13/10/2016 à 18:12, Michel D'HOOGE a écrit :
> After solving all the QA issues, this bbappend creates RPM packages with fonts in the expected folder. I didn't try to generate an image but I'm quite confident about the result.
> Michel
>
>
> do_install() {
>      install -d ${D}${libdir}/fonts/
>      find ./ -name '*.tt[cf]' -exec install -m 0644 {} ${D}${libdir}/fonts/ \;
>      install -d ${D}${sysconfdir}/fonts/conf.d/
>      install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/
> }
>
> FILES_${PN}-sans            = "${libdir}/fonts/DejaVuSans.ttf ${libdir}/fonts/DejaVuSans-*.ttf"
> FILES_${PN}-sans-mono       = "${libdir}/fonts/DejaVuSansMono*.ttf"
> FILES_${PN}-sans-condensed  = "${libdir}/fonts/DejaVuSansCondensed*.ttf"
> FILES_${PN}-serif           = "${libdir}/fonts/DejaVuSerif.ttf ${libdir}/fonts/DejaVuSerif-*.ttf"
> FILES_${PN}-serif-condensed = "${libdir}/fonts/DejaVuSerifCondensed*.ttf"
> FILES_${PN}-mathtexgyre     = "${libdir}/fonts/DejaVuMathTeXGyre.ttf"



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: <DKIM> Re: add dejavu-fonts to image
  2016-10-14  8:08           ` idealsim
@ 2016-10-17  7:51             ` idealsim
  0 siblings, 0 replies; 8+ messages in thread
From: idealsim @ 2016-10-17  7:51 UTC (permalink / raw)
  To: Michel D'HOOGE, Yocto list discussion, idealsim

Hi Michel, your solution work fine thanks a lot for that !

Le Fri, 14 Oct 2016 10:08:37 +0200, idealsim <idealsim@laposte.net> a  
écrit:

> Ok, i will test this week end and let you know !
>
> Otherwise, if you build qt5.7 perhaps you can have the same issue like  
> me with sdk, see here for more details :
>
> https://github.com/graugans/meta-udoo/issues/20
>
> regards
>
>
> Le 13/10/2016 à 18:12, Michel D'HOOGE a écrit :
>> After solving all the QA issues, this bbappend creates RPM packages  
>> with fonts in the expected folder. I didn't try to generate an image  
>> but I'm quite confident about the result.
>> Michel
>>
>>
>> do_install() {
>>      install -d ${D}${libdir}/fonts/
>>      find ./ -name '*.tt[cf]' -exec install -m 0644 {}  
>> ${D}${libdir}/fonts/ \;
>>      install -d ${D}${sysconfdir}/fonts/conf.d/
>>      install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf  
>> ${D}${sysconfdir}/fonts/conf.d/
>> }
>>
>> FILES_${PN}-sans            = "${libdir}/fonts/DejaVuSans.ttf  
>> ${libdir}/fonts/DejaVuSans-*.ttf"
>> FILES_${PN}-sans-mono       = "${libdir}/fonts/DejaVuSansMono*.ttf"
>> FILES_${PN}-sans-condensed  = "${libdir}/fonts/DejaVuSansCondensed*.ttf"
>> FILES_${PN}-serif           = "${libdir}/fonts/DejaVuSerif.ttf  
>> ${libdir}/fonts/DejaVuSerif-*.ttf"
>> FILES_${PN}-serif-condensed =  
>> "${libdir}/fonts/DejaVuSerifCondensed*.ttf"
>> FILES_${PN}-mathtexgyre     = "${libdir}/fonts/DejaVuMathTeXGyre.ttf"
>


-- 
Utilisant le logiciel de courrier d'Opera : http://www.opera.com/mail/


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-17  7:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 20:07 add dejavu-fonts to image idealsim
2016-10-13 10:07 ` Michel D'HOOGE
2016-10-13 14:07   ` idealsim
2016-10-13 14:56     ` Michel D'HOOGE
2016-10-13 15:59       ` idealsim
2016-10-13 16:12         ` Michel D'HOOGE
2016-10-14  8:08           ` idealsim
2016-10-17  7:51             ` <DKIM> " idealsim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.