ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Not wanted hidden spaces when you compress fonts
@ 2012-01-06 10:55 Jan Heinen
  2012-01-06 11:23 ` Susan Dittmar
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Heinen @ 2012-01-06 10:55 UTC (permalink / raw)
  To: ntg-context

Hello,

when I turn off the compression [extend=0.8]  -> [extend=1] 
the problems are gone :-) ... the compression unfourtunately 
also :-(
What do I have to configure to get the compression without 
spaces? :-)

Regards
Jannis

===== copy
Hello,


if I compress a font, there are suddenly hidden spaces 
between words. You can't see the spaces in the PDF, but when 
you copy the text from the PDF to an editor you can see the 
spaces. And when you search for a word (with hidden spaces) 
in the PDF, the word can't be found.

This is the result when you copy the text from the PDF into 
an editor: "The quick brow n fox jum ps over the lazy dog."

There is a space in "brow n" and one in "jum ps".
When you search for "brown" in the PDF you get no result.

Here is an example:


\definefontfeature[cond][default][extend=0.8]
\usemodule[simplefonts]
\setmainfont[Allerlight][features=cond]

\starttext
The quick brown fox jumps over the lazy dog.
\stoptext


How to get rid of this hidden spaces?

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


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

* Re: Not wanted hidden spaces when you compress fonts
  2012-01-06 10:55 Not wanted hidden spaces when you compress fonts Jan Heinen
@ 2012-01-06 11:23 ` Susan Dittmar
  2012-01-06 11:46   ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Susan Dittmar @ 2012-01-06 11:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Jan,

> when I turn off the compression [extend=0.8]  -> [extend=1] 
> the problems are gone :-) ... the compression unfourtunately 
> also :-(
> What do I have to configure to get the compression without 
> spaces? :-)

I guess you will need a new font, or a new version of the same font with
compression. I am sure there are tools out there that can do the
compression of a font.

As far as I understand, TeX itself knows nothing about the glyphs. They are
just some boxes for the TeX engine. It does not handle the glyphs itself --
TeX just places them. So the only way TeX has to compress fonts is to push
the glyphs closer together -- thus introducing these 'spaces' (in fact,
they are negative spaces, places where TeX interrupts words to push the
glyphs closer together).

In very special cases you might be able to use postscript's (or pdf's)
transformation engine to archieve condensed fonts. I once used that by
creating a minipage with 'normal' font within a picture environment that
itself then did the transformation. But I guess that's not what you really
are after.

Hope that helps,

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


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

* Re: Not wanted hidden spaces when you compress fonts
  2012-01-06 11:23 ` Susan Dittmar
@ 2012-01-06 11:46   ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2012-01-06 11:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.01.2012 um 12:23 schrieb Susan Dittmar:

> Dear Jan,
> 
>> when I turn off the compression [extend=0.8]  -> [extend=1] 
>> the problems are gone :-) ... the compression unfourtunately 
>> also :-(
>> What do I have to configure to get the compression without 
>> spaces? :-)
> 
> I guess you will need a new font, or a new version of the same font with
> compression. I am sure there are tools out there that can do the
> compression of a font.
> 
> As far as I understand, TeX itself knows nothing about the glyphs. They are
> just some boxes for the TeX engine. It does not handle the glyphs itself --
> TeX just places them. So the only way TeX has to compress fonts is to push
> the glyphs closer together -- thus introducing these 'spaces' (in fact,
> they are negative spaces, places where TeX interrupts words to push the
> glyphs closer together).
> 
> In very special cases you might be able to use postscript's (or pdf's)
> transformation engine to archieve condensed fonts. I once used that by
> creating a minipage with 'normal' font within a picture environment that
> itself then did the transformation. But I guess that's not what you really
> are after.


As you can in the example below the font is stretched to the given value
but the problem when you copy the text can be in the algorithm Adobe Reader
use to determine spaces in the text.

\starttext

\define[1]\ExtendFont
  {\definefontfeature[condensed][default][extend=#1]
   \definedfont[name:allerlight*condensed]The quick brown fox jumps over the lazy dog.\endgraf}

\processcommalist[0.4,0.6,0.8,1.0,1.2,1.4]\ExtendFont

\stoptext

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


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

* Not wanted hidden spaces when you compress fonts
@ 2012-01-05  2:25 Jan Heinen
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Heinen @ 2012-01-05  2:25 UTC (permalink / raw)
  To: ntg-context

Hello,

if I compress a font, there are suddenly hidden spaces 
between words.
You can't see the spaces in the PDF, but when you copy the 
text from the PDF to an editor you can see the spaces.
And when you search for a word (with hidden spaces) in the 
PDF, the word can't be found.

This is the result when you copy the text from the PDF into 
an editor: "The quick brow n fox jum ps over the lazy dog."
There is a space in "brow n" and one in "jum ps".
When you search for "brown" in the PDF you get no result.

Here is an example:


\definefontfeature[cond][default][extend=0.8]
\usemodule[simplefonts]
\setmainfont[Allerlight][features=cond]

\starttext
The quick brown fox jumps over the lazy dog.
\stoptext


How to get rid of this hidden spaces?

Regards
Jannis

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


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

end of thread, other threads:[~2012-01-06 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06 10:55 Not wanted hidden spaces when you compress fonts Jan Heinen
2012-01-06 11:23 ` Susan Dittmar
2012-01-06 11:46   ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2012-01-05  2:25 Jan Heinen

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).