ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Oleg Kolosov <radhelorn@mail.ru>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: searchable pdf in mkii, usepdffontresource stub
Date: Tue, 17 Jun 2008 22:55:50 +0400	[thread overview]
Message-ID: <485808B6.3050709@mail.ru> (raw)
In-Reply-To: <4857E785.50706@wxs.nl>


[-- Attachment #1.1: Type: text/plain, Size: 1988 bytes --]

Hans Hagen wrote:
> Oleg Kolosov wrote:
>   
>> Hello!
>>
>> I'm trying to generate searchable pdf with cyrrillic glyphs with the 
>> following:
>>
>> \enableregime[utf]
>> \mainlanguage[ru]
>> \setupencoding[default=t2a]
>> \useencoding[pfr]
>> \usepdffontresource t2a
>> \usetypescript[pscyr][\defaultencoding] % type-pscyr is my own 
>> 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 
>> log, but not pdfr-t2a. \input pdfr-t2a (or pdfr-ec) says that 
>> \startpdffontresource is undefined command. I've created pdfr-t2a.tex by 
>> replacing definitions in pdfr-ec with ones from cmap latex package 
>> (found in file t2a.cmap). I'm using ConTeXt mkII since mkIV is in active 
>> development. Tried also with ec as default encoding with the same result 
>> (pdfr-ec.tex is not loaded).
>>
>> Please help me create header for minimal file which will generate 
>> searchable PDF.
>>     
>
> pdftex does it itself (i.e. create the vectors) using pdfr-def.tex 
> (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  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. Немного текста для тестирования.
\stoptext

Thanks for your time.

-- 
Best Regards,
Oleg Kolosov


[-- Attachment #1.2: Type: text/html, Size: 2396 bytes --]

[-- Attachment #2: type-pscyr.tex --]
[-- Type: text/x-tex, Size: 10379 bytes --]

% 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

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2008-06-17 18:55 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 14:36 distro info Andrea Valle
2008-06-10 14:43 ` Andrea Valle
2008-06-10 15:29   ` Wolfgang Schuster
2008-06-10 15:30   ` Otared Kavian
2008-06-10 15:34   ` Hans Hagen
2008-06-10 17:21     ` David
2008-06-10 17:37       ` Hans Hagen
2008-06-10 20:31         ` Andrea Valle
2008-06-12  1:22         ` David
2008-06-12  7:51           ` Olivier Guéry
2008-06-12  8:58             ` Mojca Miklavec
2008-06-10 15:58 ` Mojca Miklavec
2008-06-10 20:27   ` Andrea Valle
2008-06-10 21:08     ` Mojca Miklavec
2008-06-11 12:09   ` Oliver Buerschaper
2008-06-11 14:55     ` Andrea Valle
2008-06-11 16:05       ` Mojca Miklavec
2008-06-11 16:55         ` Andrea Valle
2008-06-11 20:43           ` Jesse Alama
2008-06-12  9:00             ` Andrea Valle
2008-06-13 16:40               ` Henning Hraban Ramm
2008-06-13 17:08                 ` Andrea Valle
2008-06-13 18:01                   ` Mojca Miklavec
2008-06-13 18:20                   ` Henning Hraban Ramm
2008-06-13 18:26                     ` Matthias Weber
2008-06-13 19:23                       ` Henning Hraban Ramm
2008-06-13 17:57                 ` Thomas A. Schmitz
2008-06-14 11:07                   ` Oliver Buerschaper
2008-06-14 11:35                     ` Thomas A. Schmitz
2008-06-14 13:57                       ` Andrea Valle
2008-06-14 17:36                         ` Thomas A. Schmitz
2008-06-14 21:38                           ` Henning Hraban Ramm
2008-06-14 23:32                             ` Charles P. Schaum
2008-06-14 14:19                       ` Oliver Buerschaper
2008-06-14 16:35                       ` Jesse Alama
2008-06-14 18:59                         ` Mojca Miklavec
2008-06-14 23:05                           ` Diego Depaoli
2008-06-15  0:41                             ` Charles P. Schaum
2008-06-15  1:36                               ` Matthias Weber
2008-06-15  9:40                             ` Andrea Valle
2008-06-30  5:27                           ` Jesse Alama
2008-06-30  7:03                             ` Alan Stone
2008-06-30  8:20                             ` Mojca Miklavec
2008-06-30 16:21                               ` George N. White III
2008-06-14 11:48                     ` Andrea Valle
2008-06-14 13:55                     ` John Culleton
2008-06-17 16:02 ` searchable pdf in mkii, usepdffontresource stub Oleg Kolosov
2008-06-17 16:34   ` Hans Hagen
2008-06-17 18:55     ` Oleg Kolosov [this message]
2008-06-17 19:13       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=485808B6.3050709@mail.ru \
    --to=radhelorn@mail.ru \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).