Discussion:
[XeTeX] Could Adobe Photoshop's "blending options" for text be supported in a future {Pdf|Xe}TeX variant
Philip Taylor (RHUoL)
2018-04-04 18:38:44 UTC
Permalink
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Ross Moore
2018-04-04 22:39:25 UTC
Permalink
Hi Phil.

On Apr 5, 2018, at 4:38 AM, Philip Taylor (RHUoL) <***@Rhul.Ac.Uk<mailto:***@Rhul.Ac.Uk>> wrote:


I have been playing with Adobe Photoshop's "blending options" for text recently, adding a gold or metallic texture to otherwise plain text. The results are visually very striking, and I therefore began to wonder whether similar functionality might one day be added to Pdf/XeTeX, in the former case natively and in the latter case via \specials and an extended (x)dvipdfm(x) driver.

Three examples of the sorts of effect I have in mind can be seen at :

* https://www.dropbox.com/s/b7a1383rb1dx2vp/Ao%20dais.pdf?dl=0
* https://www.dropbox.com/s/7s6s7n9w8popiyg/MENU%20001%20new%20ellipse.pdf?dl=0
* https://www.dropbox.com/s/smmcjy9zuuxa1nu/MENU%20001%20%28metallic%20gold%20text%20demo%29.pdf?dl=0

I would be interested in others' reactions to this.

These are using PDF’s concept of “Text Rendering” modes.
In particular 7 Tr meaning mode 7,
which uses the outlines of characters to be the clipping path for an underlying graphic.
Thus the letter shapes restrict what parts of the graphic come shining through.

This is essentially already available with pdfTeX; viz.

https://tex.stackexchange.com/questions/250156/problem-with-pdfliteral/250162#250162


There is one part missing: how to make the underlying graphic correctly?
e.g., to have letters looking like they are embossed, or standing out in 3D, etc.

You need to construct the desired view in an image, and then place the actual characters,
with appropriate rendering mode, exactly over that image so that only the desired parts are shown.
This requires external image-processing software, which is what you paid Adobe to do with Photoshop.




Philip Taylor

Hope this helps.

Ross


Dr Ross Moore

Mathematics Dept | 12 Wally’s Walk, 734
Macquarie University, NSW 2109, Australia

T: +61 2 9850 8955 | F: +61 2 9850 8114<tel:%2B61%202%209850%209695>
M:+61 407 288 255<tel:%2B61%20409%20125%20670> | E: ***@mq.edu.au<mailto:***@mq.edu.au>

http://www.maths.mq.edu.au<http://mq.edu.au/>


[cid:***@01D030BE.D37A46F0]<http://mq.edu.au/>


CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.<http://mq.edu.au/>

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.<http://mq.edu.au/>
Ross Moore
2018-04-05 00:25:57 UTC
Permalink
Hi again Phil,

On Apr 5, 2018, at 8:39 AM, Ross Moore <***@mq.edu.au<mailto:***@mq.edu.au>> wrote:


* https://www.dropbox.com/s/b7a1383rb1dx2vp/Ao%20dais.pdf?dl=0
* https://www.dropbox.com/s/7s6s7n9w8popiyg/MENU%20001%20new%20ellipse.pdf?dl=0
* https://www.dropbox.com/s/smmcjy9zuuxa1nu/MENU%20001%20%28metallic%20gold%20text%20demo%29.pdf?dl=0

I would be interested in others' reactions to this.

These are using PDF’s concept of “Text Rendering” modes.
In particular 7 Tr meaning mode 7,
which uses the outlines of characters to be the clipping path for an underlying graphic.

I was able to extract the “underlying graphics” from the 1st of your PDFs.
Here is the one for the 2nd line of text.

[cid:F4531BBB-B66D-4E0C-B6BC-***@mq.edu.au]

You can see the need to have a clipping path, created from the text using the same font that was “blended” to make this image.
The need for exact positioning can also be appreciated from the image.


Below is the image for the gold text in the 3rd PDF.
Again the need for clipping is apparent.

[cid:3F4B8FAD-7EA9-4891-AA17-***@mq.edu.au]


Thus the letter shapes restrict what parts of the graphic come shining through.

This is essentially already available with pdfTeX; viz.

https://tex.stackexchange.com/questions/250156/problem-with-pdfliteral/250162#250162


There is one part missing: how to make the underlying graphic correctly?
e.g., to have letters looking like they are embossed, or standing out in 3D, etc.

You need to construct the desired view in an image, and then place the actual characters,
with appropriate rendering mode, exactly over that image so that only the desired parts are shown.
This requires external image-processing software, which is what you paid Adobe to do with Photoshop.




Philip Taylor

Hope this helps.

Ross


Dr Ross Moore

Mathematics Dept | 12 Wally’s Walk, 734
Macquarie University, NSW 2109, Australia

T: +61 2 9850 8955 | F: +61 2 9850 8114<tel:%2B61%202%209850%209695>
M:+61 407 288 255<tel:%2B61%20409%20125%20670> | E: ***@mq.edu.au<mailto:***@mq.edu.au>

http://www.maths.mq.edu.au<http://mq.edu.au/>


[cid:***@01D030BE.D37A46F0]<http://mq.edu.au/>


CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.<http://mq.edu.au/>

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.<http://mq.edu.au/>
Zdenek Wagner
2018-04-05 07:25:10 UTC
Permalink
Hi all,

about a week ago I mentioned my article in Czech mentioning the rendering
modes. I showed how to do it via \special and \pdfliteral. Embossing may be
acheved by storing the text in an \hbox and \copy'ing it several times at
slightly shifted positions with different colours and redering modes. Petr
Olšák wrote another article (in Czech) about primitive graphics again via
\pdfliteral and \special. You can do quite a lot using these tricks and TeX
macros. Of course, I would not use it for complex graphics but simple
effects are easy to achieve and no further support in pdftex and xdvipdfmx
is needed.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
Post by Ross Moore
Hi again Phil,
- https://www.dropbox.com/s/b7a1383rb1dx2vp/Ao%20dais.pdf?dl=0
- https://www.dropbox.com/s/7s6s7n9w8popiyg/MENU%20001%
20new%20ellipse.pdf?dl=0
- https://www.dropbox.com/s/smmcjy9zuuxa1nu/MENU%20001%20%
28metallic%20gold%20text%20demo%29.pdf?dl=0
<https://www.dropbox.com/s/smmcjy9zuuxa1nu/MENU%20001%20%28metallic%20gold%20text%20demo%29.pdf?dl=0>
I would be interested in others' reactions to this.
These are using PDF’s concept of “Text Rendering” modes.
In particular 7 Tr meaning mode 7,
which uses the outlines of characters to be the clipping path for an underlying graphic.
I was able to extract the “underlying graphics” from the 1st of your PDFs.
Here is the one for the 2nd line of text.
You can see the need to have a clipping path, created from the text using
the same font that was “blended” to make this image.
The need for exact positioning can also be appreciated from the image.
Below is the image for the gold text in the 3rd PDF.
Again the need for clipping is apparent.
Thus the letter shapes restrict what parts of the graphic come shining through.
This is essentially already available with pdfTeX; viz.
https://tex.stackexchange.com/questions/250156/problem-
with-pdfliteral/250162#250162
There is one part missing: how to make the underlying graphic correctly?
e.g., to have letters looking like they are embossed, or standing out in 3D, etc.
You need to construct the desired view in an image, and then place the actual characters,
with appropriate rendering mode, exactly over that image so that only the
desired parts are shown.
This requires external image-processing software, which is what you paid
Adobe to do with Photoshop.
Philip Taylor
Hope this helps.
Ross
* Dr Ross Moore*
*Mathematics Dept **|* 12 Wally’s Walk, 734
Macquarie University, NSW 2109, Australia
*T:* +61 2 9850 *8955 | F:* +61 2 9850 8114 <%2B61%202%209850%209695>
http://www.maths.mq.edu.au <http://mq.edu.au/>
<http://mq.edu.au/>
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.
<http://mq.edu.au/>
This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. <http://mq.edu.au/>
--------------------------------------------------
http://tug.org/mailman/listinfo/xetex
Reinhard Kotucha
2018-04-07 19:44:41 UTC
Permalink
Post by Ross Moore
I have been playing with Adobe Photoshop's "blending options" for
text recently, adding a gold or metallic texture to otherwise plain
text.  The results are visually very striking, and I therefore
began to wonder whether similar functionality might one day be
added to Pdf/XeTeX, in the former case natively and in the latter
case via \specials and an extended (x)dvipdfm(x) driver.
Three examples of the sorts of effect I have in mind can be seen at
[omitted]
Sorry Phil, this can't and shouldn't be done by TeX engines.

The only reasonable way to achieve such effects is:

* convert each glyph to a standalone vector graphic (PostScript,
SVG, or similar)

* process each vector graphic with external tools and export the
results to PostScript

* create a new Type 3 font with the original, maybe adjusted,
metrics

Type 3 fonts can contain arbitrary PostScript code (scalable, with
colours and shading) and are supported by all PDF-creating engines and
dvips already.

The best tool for vector graphic processing I'm aware of is Inkscape.
I have absolutey no experience with Inkscape and don't know whether it
has a scripting language built-in. The latter is required in order to
process a complete font without manual interaction.

I suggest to move this discussion to texhax because there is no way to
add such a feature to TeX engines and because I'm convinced that you
get more feedback there.

Looking forward to meet you at BachoTeX,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Loading...