ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Philipp Gesang <Philipp.Gesang@alumni.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: copy&paste from pdf bug (smallcaps, text figures)
Date: Fri, 2 Aug 2013 17:56:01 +0200	[thread overview]
Message-ID: <20130802155601.GA15777@tartaros> (raw)
In-Reply-To: <51FBC940.2020104@wxs.nl>


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

···<date: 2013-08-02, Friday>···<from: Hans Hagen>···

> On 8/2/2013 2:28 PM, Philipp Gesang wrote:
> >···<date: 2013-08-02, Friday>···<from: Marco Patzer>···
> >
> >>On 2013–08–02 Philipp Gesang wrote:
> >>
> >>>     https://phi-gamma.net/pdf/copypasta.pdf
> >>>     https://phi-gamma.net/files/copypasta.txt
> >>>
> >>>I definitely get   from this
> >>>one.
> >>
> >>Indeed. When I copy from your file I get those private Unicode
> >>slots. When I run the example code from your OP, I get the correct
> >>characters. I don't know what's the difference between those two
> >>files.
> >
> >The PDF is what Context produces here with that code.
> >
> >>        The LuaTeX version and ConTeXt version is the same.
> >>
> >>Creator:        ConTeXt - 2013.08.01 01:31
> >>Producer:       LuaTeX-0.76.0
> >
> >There appears to be a difference between node and base mode
> >depending on how the font is defined:
> >
> >   \pdfcompresslevel0
> >
> >   \setupbodyfont [iwona]
> >
> >   \definefontfeature [proto]    [onum=yes,smcp=yes,script=dflt,lang=dflt]
> >   \definefontfeature [withbase] [proto] [mode=base]
> >   \definefontfeature [withnode] [proto] [mode=node]
> >
> >   \definefont [iwonab] [file:Iwona-Regular.otf*withbase]
> >   \definefont [iwonan] [file:Iwona-Regular.otf*withnode]
> >
> >   \starttext
> >     \feature[<]
> >     base mode\par
> >     {\feature[!][withbase]0123456789abcdefghijklmnopqrstuvwxyz\par}
> >     {\iwonab 0123456789abcdefghijklmnopqrstuvwxyz}
> >
> >     node mode\par
> >     {\feature[!][withnode]0123456789abcdefghijklmnopqrstuvwxyz\par}
> >     {\iwonan 0123456789abcdefghijklmnopqrstuvwxyz}
> >   \stoptext \endinput
> >
> >This gets me (through pdftotext):
> >
> >   base mode
> >   
> >   0123456789abcdefghijklmnopqrstuvwxyz
> >   node mode
> >   
> >   
> >
> >So base mode with \definefont works while node mode or the font
> >from the typescript doesn’t.
> 
> For such tests you need to compare all cases:
> 
> nopdfcompression
> 
> \setupbodyfont [iwona]
> 
> \definefontfeature [withbaseone] [proto] [mode=base]
> \definefontfeature [withnodeone] [proto] [mode=node]
> \definefontfeature [withbasetwo] [proto]
> [mode=base,onum=yes,smcp=yes,script=dflt,lang=dflt]
> \definefontfeature [withnodetwo] [proto]
> [mode=node,onum=yes,smcp=yes,script=dflt,lang=dflt]
> 
> \definefont [iwonabone] [file:Iwona-Regular.otf*withbaseone]
> \definefont [iwonanone] [file:Iwona-Regular.otf*withnodeone]
> 
> \definefont [iwonabtwo] [file:Iwona-Regular.otf*withbasetwo]
> \definefont [iwonantwo] [file:Iwona-Regular.otf*withnodetwo]
> 
> \starttext
> 
> test 1, both modes:
> 
> {\iwonanone 0123456789abcdefghijklmnopqrstuvwxyz}\par
> {\iwonabone 0123456789abcdefghijklmnopqrstuvwxyz}\par
> {\iwonantwo 0123456789abcdefghijklmnopqrstuvwxyz}\par
> {\iwonabtwo 0123456789abcdefghijklmnopqrstuvwxyz}\par
> 
> % test 2, base only:
> 
> % {\iwonabone 0123456789abcdefghijklmnopqrstuvwxyz}\par
> % {\iwonabtwo 0123456789abcdefghijklmnopqrstuvwxyz}\par
> 
> % test 3, node only:
> 
> % {\iwonanone 0123456789abcdefghijklmnopqrstuvwxyz}\par
> % {\iwonantwo 0123456789abcdefghijklmnopqrstuvwxyz}\par
> 
> \stoptext
> 
> i.e. get rid of potential interferences
> 
> attached is what i get

Your PDF is flawless, but on my machine node mode produces the
wrong output. (Also I run the luatex beta-0.76.0-2013040516 that
comes with the minimals.) PDF:

  https://phi-gamma.net/pdf/copypasta-hh.pdf

Here’s a link to the diff between your PDF and my output:

  http://pastie.org/private/zwnesrug7wpy4ket6ppl1g

This bug is quite elusive; can you think of anything that this
behavior might be a side-effect of?

Philipp


[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2013-08-02 15:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01 17:33 Philipp Gesang
2013-08-01 20:23 ` Otared Kavian
2013-08-01 21:46   ` Philipp Gesang
2013-08-01 22:01     ` Marco Patzer
2013-08-01 22:12       ` Philipp Gesang
2013-08-02 11:09         ` Hans Hagen
2013-08-02 11:37           ` Philipp Gesang
2013-08-02 12:02             ` Marco Patzer
2013-08-02 12:28               ` Philipp Gesang
2013-08-02 14:59                 ` Hans Hagen
2013-08-02 15:56                   ` Philipp Gesang [this message]
2013-08-02 16:04                     ` Arthur Reutenauer
2013-08-02 18:21                   ` Philipp Gesang
2013-08-01 21:38 ` Marco Patzer
2013-08-01 22:08 ` Jannik Voges

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=20130802155601.GA15777@tartaros \
    --to=philipp.gesang@alumni.uni-heidelberg.de \
    --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).