All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH v2] poppler-data: install CMap resources for CJK glyph support
@ 2015-12-01 20:56 Joshua Lock
  2015-12-10 14:42 ` Joshua Lock
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua Lock @ 2015-12-01 20:56 UTC (permalink / raw)
  To: openembedded-devel

CID-keyed fonts, as commonly used to support pictographic East
Asian character sets require Character Maps which unidirectionally
map character codes (i.e. Unicode encoding) to CID (the glyphs in
the font face).

Without a CMap poppler isn't able to correctly PDF files in
Chinese, Japanese or Korean without embedded fonts.

This change installs a copy of the Identity files from Adobe's
CMap Resources[1] based on a similar change in Fedora's
poppler-data[2][3].

1. https://github.com/adobe-type-tools/cmap-resources
2. http://pkgs.fedoraproject.org/cgit/poppler-data.git/tree/poppler-data.spec#n18
3. https://bugzilla.redhat.com/show_bug.cgi?id=842351

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb b/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
index 4f55e9f..fb8f43d 100644
--- a/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
+++ b/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
@@ -1,5 +1,7 @@
-SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
-LICENSE = "Adobe"
+SUMMARY = "Encoding files for Poppler"
+DESCRIPTION = "Encoding files for use with poppler that enable poppler to \
+               correctly render CJK and Cyrrilic."
+LICENSE = "BSD & GPLv2 & GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
                     file://COPYING.adobe;md5=63c6a8a9df204c00461fa5f163d8a663 \
                     file://COPYING.gpl2;md5=751419260aa954499f7abaabaa882bbe \
@@ -7,15 +9,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
 
 inherit allarch
 
-SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz"
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz \
+           https://github.com/adobe-type-tools/cmap-resources/raw/master/cmapresources_identity-0.zip;name=cmap"
 SRC_URI[md5sum] = "636a8f2b9f6df9e7ced8ec0946961eaf"
 SRC_URI[sha256sum] = "e752b0d88a7aba54574152143e7bf76436a7ef51977c55d6bd9a48dccde3a7de"
+SRC_URI[cmap.md5sum] = "32aab2e25655e475dd58a50479270f91"
+SRC_URI[cmap.sha256sum] = "3a3b591b7153588a77d1304bcefc1781750a36811cebae03680c85882765f515"
 
 do_compile() {
 }
 
 do_install() {
     oe_runmake install DESTDIR=${D}
+    install -d ${D}${datadir}/poppler/cMap
+    install -m644 ${WORKDIR}/cmapresources_identity-0/CMap/Identity-* ${D}${datadir}/poppler/cMap/
 }
 
 FILES_${PN} += "${datadir}"
-- 
2.4.3



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

* Re: [meta-oe][PATCH v2] poppler-data: install CMap resources for CJK glyph support
  2015-12-01 20:56 [meta-oe][PATCH v2] poppler-data: install CMap resources for CJK glyph support Joshua Lock
@ 2015-12-10 14:42 ` Joshua Lock
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Lock @ 2015-12-10 14:42 UTC (permalink / raw)
  To: openembedded-devel

Please don't merge this.

On 01/12/15 20:56, Joshua Lock wrote:
> CID-keyed fonts, as commonly used to support pictographic East
> Asian character sets require Character Maps which unidirectionally
> map character codes (i.e. Unicode encoding) to CID (the glyphs in
> the font face).
>
> Without a CMap poppler isn't able to correctly PDF files in
> Chinese, Japanese or Korean without embedded fonts.
>
> This change installs a copy of the Identity files from Adobe's
> CMap Resources[1] based on a similar change in Fedora's
> poppler-data[2][3].
>
> 1. https://github.com/adobe-type-tools/cmap-resources
> 2. http://pkgs.fedoraproject.org/cgit/poppler-data.git/tree/poppler-data.spec#n18
> 3. https://bugzilla.redhat.com/show_bug.cgi?id=842351
>
> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
> ---
>   meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb | 15 ++++++++++++---
>   1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb b/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
> index 4f55e9f..fb8f43d 100644
> --- a/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
> +++ b/meta-oe/recipes-support/poppler/poppler-data_0.4.7.bb
> @@ -1,5 +1,7 @@
> -SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
> -LICENSE = "Adobe"
> +SUMMARY = "Encoding files for Poppler"
> +DESCRIPTION = "Encoding files for use with poppler that enable poppler to \
> +               correctly render CJK and Cyrrilic."
> +LICENSE = "BSD & GPLv2 & GPLv3+"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
>                       file://COPYING.adobe;md5=63c6a8a9df204c00461fa5f163d8a663 \
>                       file://COPYING.gpl2;md5=751419260aa954499f7abaabaa882bbe \
> @@ -7,15 +9,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
>
>   inherit allarch
>
> -SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz"
> +INHIBIT_DEFAULT_DEPS = "1"
> +
> +SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz \
> +           https://github.com/adobe-type-tools/cmap-resources/raw/master/cmapresources_identity-0.zip;name=cmap"

This raw URI isn't safe to use and the .zip is no longer present in the 
master branch of the repository.

A colleague is in the process of working up an improved version of this 
patch with a safer URI.

>   SRC_URI[md5sum] = "636a8f2b9f6df9e7ced8ec0946961eaf"
>   SRC_URI[sha256sum] = "e752b0d88a7aba54574152143e7bf76436a7ef51977c55d6bd9a48dccde3a7de"
> +SRC_URI[cmap.md5sum] = "32aab2e25655e475dd58a50479270f91"
> +SRC_URI[cmap.sha256sum] = "3a3b591b7153588a77d1304bcefc1781750a36811cebae03680c85882765f515"
>
>   do_compile() {
>   }
>
>   do_install() {
>       oe_runmake install DESTDIR=${D}
> +    install -d ${D}${datadir}/poppler/cMap
> +    install -m644 ${WORKDIR}/cmapresources_identity-0/CMap/Identity-* ${D}${datadir}/poppler/cMap/
>   }
>
>   FILES_${PN} += "${datadir}"
>



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

end of thread, other threads:[~2015-12-10 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 20:56 [meta-oe][PATCH v2] poppler-data: install CMap resources for CJK glyph support Joshua Lock
2015-12-10 14:42 ` Joshua Lock

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.