From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41734 Path: news.gmane.org!not-for-mail From: Oleg Kolosov Newsgroups: gmane.comp.tex.context Subject: Re: searchable pdf in mkii, usepdffontresource stub Date: Tue, 17 Jun 2008 22:55:50 +0400 Message-ID: <485808B6.3050709@mail.ru> References: <4857E026.2020105@mail.ru> <4857E785.50706@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010000070207020300010106" X-Trace: ger.gmane.org 1213729097 6191 80.91.229.12 (17 Jun 2008 18:58:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Jun 2008 18:58:17 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 17 20:59:01 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1K8gON-00014r-Cw for gctc-ntg-context-518@m.gmane.org; Tue, 17 Jun 2008 20:58:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A98F61FCE5; Tue, 17 Jun 2008 20:57:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23179-01-2; Tue, 17 Jun 2008 20:57:13 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 178801FC6B; Tue, 17 Jun 2008 20:57:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 215F11FC6B for ; Tue, 17 Jun 2008 20:56:50 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22750-01-6 for ; Tue, 17 Jun 2008 20:56:12 +0200 (CEST) Original-Received: from mx33.mail.ru (mx33.mail.ru [194.67.23.194]) by ronja.ntg.nl (Postfix) with ESMTP id 4FE591FBA8 for ; Tue, 17 Jun 2008 20:56:11 +0200 (CEST) Original-Received: from [87.117.41.245] (port=36239 helo=[172.16.6.235]) by mx33.mail.ru with asmtp id 1K8gLg-000OGp-00 for ntg-context@ntg.nl; Tue, 17 Jun 2008 22:56:08 +0400 User-Agent: Thunderbird 2.0.0.14 (X11/20080512) In-Reply-To: <4857E785.50706@wxs.nl> X-Spam: Not detected X-Mras: OK X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:41734 Archived-At: This is a multi-part message in MIME format. --------------010000070207020300010106 Content-Type: multipart/alternative; boundary="------------080700080802010507010202" --------------080700080802010507010202 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hans Hagen wrote: > Oleg Kolosov wrote: > =20 >> Hello! >> >> I'm trying to generate searchable pdf with cyrrillic glyphs with the=20 >> following: >> >> \enableregime[utf] >> \mainlanguage[ru] >> \setupencoding[default=3Dt2a] >> \useencoding[pfr] >> \usepdffontresource t2a >> \usetypescript[pscyr][\defaultencoding] % type-pscyr is my own=20 >> typescript file >> \setupbodyfont[pscyr,14pt] >> >> also tried with: >> >> \startencoding[t2a] >> \usepdffontresource t2a >> \stopencoding >> >> It seems that \usepdffontresource does nothing. I see pdfr-def loaded = in=20 >> log, but not pdfr-t2a. \input pdfr-t2a (or pdfr-ec) says that=20 >> \startpdffontresource is undefined command. I've created pdfr-t2a.tex = by=20 >> replacing definitions in pdfr-ec with ones from cmap latex package=20 >> (found in file t2a.cmap). I'm using ConTeXt mkII since mkIV is in acti= ve=20 >> development. Tried also with ec as default encoding with the same resu= lt=20 >> (pdfr-ec.tex is not loaded). >> >> Please help me create header for minimal file which will generate=20 >> searchable PDF. >> =20 > > pdftex does it itself (i.e. create the vectors) using pdfr-def.tex=20 > (unless i did something wrong) > > Hans > > =20 It's unlikely. I've tested it with minimal file and english text is=20 indeed searchable, but cyrillic is not, with copy-paste I get some=20 strange symbols. I'm using type1 fonts from PSCyr package with my own=20 typescript, does this matter? I've attached typescript file just in=20 case (it's still incomplete but works fine for me). Maybe I miss some=20 definition or option? BTW cyrillic in PDF TOC works fine (with inclusion=20 of spec-tst.tex). Minimal file which I've used for testing: \enableregime[utf] \mainlanguage[ru] \usetypescript[pscyr][t2a] \setupbodyfont[pscyr] \starttext Some text to test PDF search. =D0=9D=D0=B5=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE = =D1=82=D0=B5=D0=BA=D1=81=D1=82=D0=B0 =D0=B4=D0=BB=D1=8F =D1=82=D0=B5=D1=81= =D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F. \stoptext Thanks for your time. --=20 Best Regards, Oleg Kolosov --------------080700080802010507010202 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hans Hagen wrote:
Oleg Kolosov wrote:
  
Hello!

I'm trying to generate searchable pdf with cyrrillic glyphs with the=20
following:

\enableregime[utf]
\mainlanguage[ru]
\setupencoding[default=3Dt2a]
\useencoding[pfr]
\usepdffontresource t2a
\usetypescript[pscyr][\defaultencoding] % type-pscyr is my own=20
typescript file
\setupbodyfont[pscyr,14pt]

also tried with:

\startencoding[t2a]
\usepdffontresource t2a
\stopencoding

It seems that \usepdffontresource does nothing. I see pdfr-def loaded in=20
log, but not pdfr-t2a. \input pdfr-t2a (or pdfr-ec) says that=20
\startpdffontresource is undefined command. I've created pdfr-t2a.tex by=20
replacing definitions in pdfr-ec with ones from cmap latex package=20
(found in file t2a.cmap). I'm using ConTeXt mkII since mkIV is in active=20
development. Tried also with ec as default encoding with the same result=20
(pdfr-ec.tex is not loaded).

Please help me create header for minimal file which will generate=20
searchable PDF.
    

pdftex does it itself (i.e. create the vectors) using pdfr-def.tex=20
(unless i did something wrong)

Hans

  
It's unlikely. I've tested it with minimal file and english text is indeed searchable, but cyrillic is not, with copy-paste I get some strange symbols. I'm using type1 fonts from PSCyr package with my own typescript, does this matter? I've attached=C2=A0 typescript file just in case (it's still incomplete but works fine for me). Maybe I miss some definition or option? BTW cyrillic in PDF TOC works fine (with inclusion of spec-tst.tex).

Minimal file which I've used for testing:

\enableregime[utf]
\mainlanguage[ru]

\usetypescript[pscyr][t2a]
\setupbodyfont[pscyr]

\starttext
Some text to test PDF search. =D0=9D=D0=B5=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE = =D1=82=D0=B5=D0=BA=D1=81=D1=82=D0=B0 =D0=B4=D0=BB=D1=8F =D1=82=D0=B5=D1=81= =D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F.
\stoptext

Thanks for your time.

--=20
Best Regards,
Oleg Kolosov
--------------080700080802010507010202-- --------------010000070207020300010106 Content-Type: text/x-tex; name="type-pscyr.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="type-pscyr.tex" % ConTeXt typescript file for use with the PSCyr font package % Version: 0.3.1 \starttypescriptcollection [pscyr] \starttypescript [map] [pscyr] [t2a] \loadmapfile [pscyr.map] \stoptypescript % Academy \starttypescript [serif] [academy] [name] \setups [font:fallback:serif] \definefontsynonym [Serif] [AcademyPSCyr-Regular] \definefontsynonym [SerifBold] [AcademyPSCyr-Bold] \definefontsynonym [SerifItalic] [AcademyPSCyr-Italic] \definefontsynonym [SerifSlanted] [AcademyPSCyr-Slanted] \definefontsynonym [SerifBoldItalic] [AcademyPSCyr-BoldSlanted] \definefontsynonym [SerifBoldSlanted] [AcademyPSCyr-BoldSlanted] \definefontsynonym [SerifCaps] [AcademyPSCyr-SmallCaps] \stoptypescript \starttypescript [serif] [academy] [t2a] \definefontsynonym [AcademyPSCyr-Regular] [facr6t] [encoding=\typescriptthree] \definefontsynonym [AcademyPSCyr-Bold] [facb6t] [encoding=\typescriptthree] \definefontsynonym [AcademyPSCyr-Italic] [facri6t] [encoding=\typescriptthree] \definefontsynonym [AcademyPSCyr-Slanted] [facro6t] [encoding=\typescriptthree] \definefontsynonym [AcademyPSCyr-BoldSlanted] [facbo6t] [encoding=\typescriptthree] \definefontsynonym [AcademyPSCyr-SmallCaps] [facrc6t] [encoding=\typescriptthree] \stoptypescript % Antiqua \starttypescript [serif] [antiqua] [name] \setups [font:fallback:serif] \definefontsynonym [Serif] [AntiquaPSCyr-Regular] \definefontsynonym [SerifBold] [AntiquaPSCyr-Bold] \definefontsynonym [SerifItalic] [AntiquaPSCyr-Italic] \definefontsynonym [SerifSlanted] [AntiquaPSCyr-Slanted] \definefontsynonym [SerifBoldItalic] [AntiquaPSCyr-BoldItalic] \definefontsynonym [SerifBoldSlanted] [AntiquaPSCyr-BoldSlanted] \definefontsynonym [SerifCaps] [AntiquaPSCyr-SmallCaps] \stoptypescript \starttypescript [serif] [antiqua] [t2a] \definefontsynonym [AntiquaPSCyr-Regular] [faqr6t] [encoding=\typescriptthree] \definefontsynonym [AntiquaPSCyr-Bold] [faqb6t] [encoding=\typescriptthree] \definefontsynonym [AntiquaPSCyr-Italic] [faqri6t] [encoding=\typescriptthree] \definefontsynonym [AntiquaPSCyr-Slanted] [faqro6t] [encoding=\typescriptthree] \definefontsynonym [AntiquaPSCyr-BoldItalic] [faqbi6t] [encoding=\typescriptthree] \definefontsynonym [AntiquaPSCyr-BoldSlanted] [faqbo6t] [encoding=\typescriptthree] \definefontsynonym [AntiquaPSCyr-SmallCaps] [faqrc6t] [encoding=\typescriptthree] \stoptypescript % Handbook \starttypescript [serif] [handbook] [t2a] \definefontsynonym [HandbookPSCyr-Regular] [fhar6t] [encoding=\typescriptthree] \definefontsynonym [HandbookPSCyr-Bold] [fhab6t] [encoding=\typescriptthree] \definefontsynonym [HandbookPSCyr-Italic] [fhari6t] [encoding=\typescriptthree] \definefontsynonym [HandbookPSCyr-Slanted] [fharo6t] [encoding=\typescriptthree] \definefontsynonym [HandbookPSCyr-BoldSlanted] [fhabo6t] [encoding=\typescriptthree] \stoptypescript % College \starttypescript [serif] [college] [t2a] \definefontsynonym [CollegePSCyr-Regular] [fcor6t] [encoding=\typescriptthree] \definefontsynonym [CollegePSCyr-Bold] [fcob6t] [encoding=\typescriptthree] \definefontsynonym [CollegePSCyr-Italic] [fcori6t] [encoding=\typescriptthree] \definefontsynonym [CollegePSCyr-Slanted] [fcoro6t] [encoding=\typescriptthree] \definefontsynonym [CollegePSCyr-BoldSlanted] [fcobo6t] [encoding=\typescriptthree] \stoptypescript % Journal \starttypescript [serif] [journal] [t2a] \definefontsynonym [JournalPSCyr-Regular] [fjnr6t] [encoding=\typescriptthree] \definefontsynonym [JournalPSCyr-Bold] [fjnb6t] [encoding=\typescriptthree] \definefontsynonym [JournalPSCyr-Italic] [fjnri6t] [encoding=\typescriptthree] \definefontsynonym [JournalPSCyr-Slanted] [fjnro6t] [encoding=\typescriptthree] \definefontsynonym [JournalPSCyr-BoldSlanted] [fjnbo6t] [encoding=\typescriptthree] \stoptypescript % Lazurski \starttypescript [serif] [lazurski] [t2a] \definefontsynonym [LazurskiPSCyr-Regular] [flzr6t] [encoding=\typescriptthree] \definefontsynonym [LazurskiPSCyr-Slanted] [flzro6t] [encoding=\typescriptthree] \stoptypescript % Souvenir \starttypescript [serif] [souvenir] [t2a] \definefontsynonym [SouvenirPSCyr-Regular] [fsvr6t] [encoding=\typescriptthree] \definefontsynonym [SouvenirPSCyr-Bold] [fsvb6t] [encoding=\typescriptthree] \definefontsynonym [SouvenirPSCyr-Slanted] [fsvro6t] [encoding=\typescriptthree] \definefontsynonym [SouvenirPSCyr-BoldSlanted] [fsvbo6t] [encoding=\typescriptthree] \stoptypescript % TimesNewRomanPSMT \starttypescript [serif] [times] [name] \setups [font:fallback:serif] \definefontsynonym [Serif] [TimesNewRomanPSMT-Regular] \definefontsynonym [SerifBold] [TimesNewRomanPSMT-Bold] \definefontsynonym [SerifItalic] [TimesNewRomanPSMT-Italic] \definefontsynonym [SerifSlanted] [TimesNewRomanPSMT-Slanted] \definefontsynonym [SerifBoldItalic] [TimesNewRomanPSMT-BoldItalic] \definefontsynonym [SerifBoldSlanted] [TimesNewRomanPSMT-BoldSlanted] \definefontsynonym [SerifCaps] [TimesNewRomanPSMT-SmallCaps] \stoptypescript \starttypescript [serif] [times] [t2a] \definefontsynonym [TimesNewRomanPSMT-Regular] [ftmr6t] [encoding=\typescriptthree] \definefontsynonym [TimesNewRomanPSMT-Bold] [ftmb6t] [encoding=\typescriptthree] \definefontsynonym [TimesNewRomanPSMT-Italic] [ftmri6t] [encoding=\typescriptthree] \definefontsynonym [TimesNewRomanPSMT-Slanted] [ftmro6t] [encoding=\typescriptthree] \definefontsynonym [TimesNewRomanPSMT-BoldItalic] [ftmbi6t] [encoding=\typescriptthree] \definefontsynonym [TimesNewRomanPSMT-BoldSlanted] [ftmbo6t] [encoding=\typescriptthree] \definefontsynonym [TimesNewRomanPSMT-SmallCaps] [ftmrc6t] [encoding=\typescriptthree] \stoptypescript % ArialMT \starttypescript [sans] [arial] [t2a] \definefontsynonym [ArialMT-Regular] [farr6t] [encoding=\typescriptthree] \definefontsynonym [ArialMT-Bold] [farb6t] [encoding=\typescriptthree] \definefontsynonym [ArialMT-Italic] [farri6t] [encoding=\typescriptthree] \definefontsynonym [ArialMT-BoldItalic] [farbi6t] [encoding=\typescriptthree] \definefontsynonym [ArialMT-Slanted] [farro6t] [encoding=\typescriptthree] \definefontsynonym [ArialMT-BoldSlanted] [farbo6t] [encoding=\typescriptthree] \definefontsynonym [ArialMT-Black] [farbe6t] [encoding=\typescriptthree] \stoptypescript % Textbook \starttypescript [sans] [textbook] [name] \setups [font:fallback:sans] \definefontsynonym [Sans] [TextbookPSCyr-Regular] \definefontsynonym [SansBold] [TextbookPSCyr-Bold] \definefontsynonym [SansItalic] [TextbookPSCyr-Italic] \definefontsynonym [SansSlanted] [TextbookPSCyr-Slanted] \definefontsynonym [SansBoldItalic] [TextbookPSCyr-BoldSlanted] \definefontsynonym [SansCaps] [TextbookPSCyr-SmallCaps] \stoptypescript \starttypescript [sans] [textbook] [t2a] \definefontsynonym [TextbookPSCyr-Regular] [ftxr6t] [encoding=\typescriptthree] \definefontsynonym [TextbookPSCyr-Bold] [ftxb6t] [encoding=\typescriptthree] \definefontsynonym [TextbookPSCyr-Italic] [ftxri6t] [encoding=\typescriptthree] \definefontsynonym [TextbookPSCyr-Slanted] [ftxro6t] [encoding=\typescriptthree] \definefontsynonym [TextbookPSCyr-BoldSlanted] [ftxbo6t] [encoding=\typescriptthree] \definefontsynonym [TextbookPSCyr-SmallCaps] [ftxrc6t] [encoding=\typescriptthree] \stoptypescript % Magazine \starttypescript [sans] [magazine] [t2a] \definefontsynonym [MagazinePSCyr-Regular] [fmar6t] [encoding=\typescriptthree] \definefontsynonym [MagazinePSCyr-Bold] [fmab6t] [encoding=\typescriptthree] \definefontsynonym [MagazinePSCyr-Italic] [fmari6t] [encoding=\typescriptthree] \definefontsynonym [MagazinePSCyr-Slanted] [fmaro6t] [encoding=\typescriptthree] \definefontsynonym [MagazinePSCyr-BoldSlanted] [fmabo6t] [encoding=\typescriptthree] \stoptypescript % CourierNewPSMT \starttypescript [mono] [courier] [t2a] \definefontsynonym [CourierNewPSMT-Regular] [fcrr6t] [encoding=\typescriptthree] \definefontsynonym [CourierNewPSMT-Bold] [fcrb6t] [encoding=\typescriptthree] \definefontsynonym [CourierNewPSMT-Italic] [fcrri6t] [encoding=\typescriptthree] \definefontsynonym [CourierNewPSMT-BoldItalic] [fcrbi6t] [encoding=\typescriptthree] \stoptypescript % ERKurier \starttypescript [mono] [erkurier] [name] \setups [font:fallback:mono] \definefontsynonym [Mono] [ERKurierPSCyr-Regular] \definefontsynonym [MonoBold] [ERKurierPSCyr-Bold] \definefontsynonym [MonoItalic] [ERKurierPSCyr-Italic] \definefontsynonym [MonoBoldItalic] [ERKurierPSCyr-BoldItalic] \stoptypescript \starttypescript [mono] [erkurier] [t2a] \definefontsynonym [ERKurierPSCyr-Regular] [ferr6t] [encoding=\typescriptthree] \definefontsynonym [ERKurierPSCyr-Bold] [ferb6t] [encoding=\typescriptthree] \definefontsynonym [ERKurierPSCyr-Italic] [ferri6t] [encoding=\typescriptthree] \definefontsynonym [ERKurierPSCyr-BoldItalic] [ferbi6t] [encoding=\typescriptthree] \stoptypescript % Math \starttypescript [math] [antiqua] [name] \definefontsynonym [MathRoman] [faqr7t] \definefontsynonym [MathItalic] [zfaqcmrm] \definefontsynonym [MathRomanBold] [faqb7t] \definefontsynonym [MathItalicBold] [zfaqcmbm] \stoptypescript % Typefaces \starttypescript [pscyr] [t2a] \definetypeface [pscyr] [rm] [serif] [antiqua] [default] [encoding=\typescripttwo] \definetypeface [pscyr] [ss] [sans] [textbook] [default] [encoding=\typescripttwo] \definetypeface [pscyr] [tt] [mono] [erkurier] [default] [encoding=\typescripttwo] \definetypeface [pscyr] [mm] [math] [antiqua] [default] [encoding=\typescripttwo] \definetypeface [pscyr-times] [rm] [serif] [times] [default] [encoding=\typescripttwo] \definetypeface [pscyr-times] [ss] [sans] [textbook] [default] [encoding=\typescripttwo] \definetypeface [pscyr-times] [tt] [mono] [erkurier] [default] [encoding=\typescripttwo] \definetypeface [pscyr-times] [mm] [math] [antiqua] [default] [encoding=\typescripttwo] \stoptypescript \stoptypescriptcollection --------------010000070207020300010106 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --------------010000070207020300010106--