Re: [XeTeX] Character Variants

2011-03-29 Thread James Cloos
JC> So you may want to try \char"8FBB\char"FE00 instead.

Belay that.  The font (at least the version shipped for reader) does
indeed use variation selectors 17-31, ignoring the first 16 such chars
at fe00-fe0f.

-JimC
-- 
James Cloos  OpenPGP: 1024D/ED7DAEA6


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


Re: [XeTeX] Character Variants

2011-03-29 Thread James Cloos
> "BB" == Bob Beckett  writes:

BB> David's suggestion:
BB> \char"8FBB\char"E0100

the first variation selector is U+FE00 VARIATION SELECTOR-1

U+E0100 is VARIATION SELECTOR-17 (aka the first variation selection
outside of the BMP).

So you may want to try \char"8FBB\char"FE00 instead.

-JimC
-- 
James Cloos  OpenPGP: 1024D/ED7DAEA6


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


Re: [XeTeX] Character Variants

2011-03-29 Thread Bob Beckett
Andy Lin  writes:

> With genzi.sty loaded, try
> \itz[0]{辻} % should be the default
> \itz[1]{辻} % should be the variant
> -Andy
>

Wow! It works like a charm. Thank you, thank you!



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


Re: [XeTeX] Character Variants

2011-03-28 Thread Andy Lin
Oh, actually, I just checked genzi.sty and it has the solution you
need. The author did in fact add support for variant glyphs (he even
mentions it on his website, though it isn't documented very well).

With genzi.sty loaded, try
\itz[0]{辻} % should be the default
\itz[1]{辻} % should be the variant

You can select any variant the font offers, just change the number in
the optional argument.

There is another command \kmz, which has the same syntax, except it
selects the annotation form (if it exists in the font).

HTH
-Andy

On Mon, Mar 28, 2011 at 22:18, Bob Beckett  wrote:
> I tried your method of RawFeature=+expt, but it didn't work. Finally, I
> discovered that the package genzi.sty (by Kazuomi Kuniyoshi), somehow
> interfered. After disabling genzi.sty, your code worked perfectly, producing
> the alternate glyph I wanted.
>
> Analyzing the genzi.sty code is  way beyond me, so I guess I'll forgo the
> alternates until XeTeX incorporates the variant selector feature.



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


Re: [XeTeX] Character Variants

2011-03-28 Thread Mike "Pomax" Kamermans

On 3/28/2011 7:18 PM, Bob Beckett wrote:

Andy,

I tried your method of RawFeature=+expt, but it didn't work. Finally, I
discovered that the package genzi.sty (by Kazuomi Kuniyoshi), somehow
interfered. After disabling genzi.sty, your code worked perfectly, producing
the alternate glyph I wanted.

Analyzing the genzi.sty code is  way beyond me, so I guess I'll forgo the
alternates until XeTeX incorporates the variant selector feature.


Sounds like something you may want to bring to his attention; 
http://kuniyoshi.fastmail.fm/


- Mike "Pomax" Kamermans
nihongoresources.com


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


Re: [XeTeX] Character Variants

2011-03-28 Thread Bob Beckett
Andy,

I tried your method of RawFeature=+expt, but it didn't work. Finally, I 
discovered that the package genzi.sty (by Kazuomi Kuniyoshi), somehow 
interfered. After disabling genzi.sty, your code worked perfectly, producing 
the alternate glyph I wanted.

Analyzing the genzi.sty code is  way beyond me, so I guess I'll forgo the 
alternates until XeTeX incorporates the variant selector feature.

Many thanks for your help.




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


Re: [XeTeX] Character Variants

2011-03-28 Thread Ulrike Fischer
Am Sun, 27 Mar 2011 06:40:35 -0500 (CDT) schrieb
msk...@ansuz.sooke.bc.ca:

> If it's just a question of getting in the characters, which the font will
> then process by glyph substitution, it should work to simply include the
> desired characters literally in XeTeX's input.  I haven't tried that with
> variant selectors, but it works for me with private-use characters, even
> outside the Basic Multilingual Plane.  I tried to demonstrate in this
> message, only to discover when I attempted to send it, that my *email
> server* doesn't support the literal characters even if XeTeX, my editor,
> my keyboard config, and my email client all do.

You can enter literal characters in pure ASCII with the
-notation. Simply put the unicode code in small letters behind.

E.g. 20ac is the same as entering an euro sign. 

Useful in mail messages. Avoids a lot of hassle with encodings. 

-- 
Ulrike Fischer 



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


Re: [XeTeX] Character Variants

2011-03-27 Thread Andy Lin
Sorry, this should be \fontspec{Kozuka Mincho Pr6N}\varchar

On Sun, Mar 27, 2011 at 18:50, Andy Lin  wrote:
> \fontspec{Kozuka Mincho Pr6N}辻



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


Re: [XeTeX] Character Variants

2011-03-27 Thread Andy Lin
On Sun, Mar 27, 2011 at 12:49, Bob Beckett  wrote:
> Result:  This didn't work. It produced only the base character, not the
> variant. I also tried +aalt and +salt. No go.

Access All Alternates is something that needs to be supported by the
software you're using.
Stylistic Alternates don't apply to CJK characters.

I'm not sure which variant you're looking for. E0100 selects the first
variant offered for that glyph by the font. In this case, the
difference is that it has a single dot on the left hand side instead
of two.

I'm not sure how to access glyphs by their variant index. However,
where multiple variants exist, you should be able to access them the
"normal" way, i.e. by selecting the character set to which the variant
belongs. Kozuka Mincho Pr6N supports the following sets: regular,
expert, hojo, jis78, jis83, jis90, nlc kanji, traditional.

The following code should allow you to test for variants of a
character and how to access them. I've attached a sample output. In
addition to the sets that KMPr6N supports, I've also included
traditional naming and simplified in case you have other fonts that
use them.

\documentclass{article}
\usepackage{fontspec}
\newcommand\varchar{辻}
\begin{document}
\fontspec{Kozuka Mincho Pr6N}辻
{\addfontfeature{RawFeature=+expt}\varchar} %Single Dot Variant
{\addfontfeature{RawFeature=+hojo}\varchar}
{\addfontfeature{RawFeature=+jp78}\varchar}
{\addfontfeature{RawFeature=+jp83}\varchar} %Single Dot Variant
{\addfontfeature{RawFeature=+jp90}\varchar} %Single Dot Variant
{\addfontfeature{RawFeature=+nlck}\varchar}
{\addfontfeature{RawFeature=+trad}\varchar}
{\addfontfeature{RawFeature=+tnam}\varchar}
{\addfontfeature{RawFeature=+simp}\varchar}
\end{document}

HTH
-Andy


KMinTest.pdf
Description: Adobe PDF document


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


Re: [XeTeX] Character Variants

2011-03-27 Thread Jonathan Kew
On 27 Mar 2011, at 21:42, msk...@ansuz.sooke.bc.ca wrote:

> On Sun, 27 Mar 2011, Paul Isambert wrote:
>> Both, actually. The font by itself does nothing, it simply indicates what the
>> rendering engine should do. I suppose (because it's seems the simplest way
>> here) that this is implemented as a ligature.
> 
> By that logic it could be said that no software ever does anything, it
> only indicates what the computer hardware should do. What I meant was,
> does the handling of variation selectors consist entirely of a feature
> table with "sub xxx yyy by zzz" entries, so that it could be turned on in
> XeTeX the same way we turn on ligatures?  That's a simple yes/no question.
> As you say it would make sense for the answer to be "yes", but I haven't
> been able to find an authoritative answer on the Net.

Variation sequences _could_ be implemented using a ligature mechanism, but this 
is not in fact how it's normally done. There is a special 'cmap' subtable 
(format 14) used to map sequences of  to 
glyphs, without the requirement for the variation selector code by itself to 
map to a glyph ID at all.

I don't think the current xetex code supports this, although it should be a 
pretty minor update if someone wants to work on a patch

JK




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


Re: [XeTeX] Character Variants

2011-03-27 Thread mskala
On Sun, 27 Mar 2011, Paul Isambert wrote:
> Both, actually. The font by itself does nothing, it simply indicates what the
> rendering engine should do. I suppose (because it's seems the simplest way
> here) that this is implemented as a ligature.

By that logic it could be said that no software ever does anything, it
only indicates what the computer hardware should do. What I meant was,
does the handling of variation selectors consist entirely of a feature
table with "sub xxx yyy by zzz" entries, so that it could be turned on in
XeTeX the same way we turn on ligatures?  That's a simple yes/no question.
As you say it would make sense for the answer to be "yes", but I haven't
been able to find an authoritative answer on the Net.
-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/


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


Re: [XeTeX] Character Variants

2011-03-27 Thread Paul Isambert

Le 27/03/2011 22:07, msk...@ansuz.sooke.bc.ca a écrit :

On Sun, 27 Mar 2011, Peter Dyballa wrote:

U+8FBB exists in this and quite a few other fonts, but which font has U+E0100?
(And since this character is outside the BMP, the Basic Multilingual Pane, it
won't be some usual font.)

U+E0100 is not a graphic character in itself, but a "variation selector"
specifying an alternate form for the preceding character; it behaves a
little bit like a combining character.  What I don't know is how that's
supposed to be implemented - whether it is done by the font with glyph
substitution, or by some other mechanism that requires support from the
rendering engine.


Both, actually. The font by itself does nothing, it simply indicates 
what the rendering engine should do. I suppose (because it's seems the 
simplest way here) that this is implemented as a ligature.


Paul


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


Re: [XeTeX] Character Variants

2011-03-27 Thread mskala
On Sun, 27 Mar 2011, Peter Dyballa wrote:
> U+8FBB exists in this and quite a few other fonts, but which font has U+E0100?
> (And since this character is outside the BMP, the Basic Multilingual Pane, it
> won't be some usual font.)

U+E0100 is not a graphic character in itself, but a "variation selector"
specifying an alternate form for the preceding character; it behaves a
little bit like a combining character.  What I don't know is how that's
supposed to be implemented - whether it is done by the font with glyph
substitution, or by some other mechanism that requires support from the
rendering engine.
-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/


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


Re: [XeTeX] Character Variants

2011-03-27 Thread Peter Dyballa


Am 27.03.2011 um 18:49 schrieb Bob Beckett:


Incidentally, Kozuka Mincho is freely available for Adobe Reader.



U+8FBB exists in this and quite a few other fonts, but which font has U 
+E0100? (And since this character is outside the BMP, the Basic  
Multilingual Pane, it won't be some usual font.)


--
Greetings

  Pete

Ce qui a été compris n'existe plus.
(Paul Eluard)




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


Re: [XeTeX] Character Variants

2011-03-27 Thread Bob Beckett
Bob Beckett  writes:

 


  
L


> 
> Can anyone help me get XeTeX to create a character variant?
> 
> I am using Kozuka Mincho Pr6N, which includes a variant of U+8FBB. This 
> variant is obtained by combining 8FBB with the Ideographic Variation 
Sequence 
> E0100. (I hope I'm phrasing this correctly.)
> 
> If I use the editor BabelPad, I can get the variant by typing:
> 
>   8FBB(Alt-x)E0100(Alt-x)
> 
> But I don't know how to accomplish this in XeTeX. The fontspec manual says 
> that it supports character variants, but gives no examples. Not being a 
> computer person, I need a real example.
> 
> Thanks
> 
> --
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
> 
> 
 Thanks for all the suggestions. I had high hopes that one of them would work. 
Alas, ...

Here are the results.

Andy's suggestion:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\fontspec{Kozuka Mincho Pr6N}辻
\addfontfeature{RawFeature=+expt}辻
\end{document}


Result:  This didn't work. It produced only the base character, not the 
variant. I also tried +aalt and +salt. No go.

 
David's suggestion:

\char"8FBB\char"E0100

Result: Didn't work. It produced the base character, followed by a box with an 
X in it.


I also copied the variant into the source, but that failed also.

Incidentally, Kozuka Mincho is freely available for Adobe Reader.





  
L








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


Re: [XeTeX] Character Variants

2011-03-27 Thread David Perry
All of what Matthew wrote is true.  I suggested using the \char" method 
because the original poster said he was using Alt-x, which implied to me 
that he didn't have a convenient keyboard entry method available for the 
characters in question -- otherwise he would have used it instead of Alt-x.


I hope he'll let us know, one way or another, since I am curious about this.

David

On 3/27/2011 7:40 AM, msk...@ansuz.sooke.bc.ca wrote:

On Sun, 27 Mar 2011, David Perry wrote:

character.  You can enter characters by number in XeTeX with \char"; so
try

\char"8FBB\char"E0100


If it's just a question of getting in the characters, which the font will
then process by glyph substitution, it should work to simply include the
desired characters literally in XeTeX's input.  I haven't tried that with
variant selectors, but it works for me with private-use characters, even
outside the Basic Multilingual Plane.  I tried to demonstrate in this
message, only to discover when I attempted to send it, that my *email
server* doesn't support the literal characters even if XeTeX, my editor,
my keyboard config, and my email client all do.

The advantage to using the literal characters is that if your editor
display supports them, they will appear more nicely during editing; the
advantage to using \char" escapes is that then the input remains in ASCII
and will better survive passage through systems (like email) that may
not support the literal characters.




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


Re: [XeTeX] Character Variants

2011-03-27 Thread Cyril Niklaus

On 27 mars 2011, at 20:40, msk...@ansuz.sooke.bc.ca wrote:

> On Sun, 27 Mar 2011, David Perry wrote:
>> character.  You can enter characters by number in XeTeX with \char"; so
>> try
>> 
>> \char"8FBB\char"E0100
> 
> If it's just a question of getting in the characters, which the font will
> then process by glyph substitution, it should work to simply include the
> desired characters literally in XeTeX's input.  

I tried that when I first read Bob's question, but neither TexSHop, TeXworks 
nor aquamacs seem to support variant glyphs. 
I get them nicely in Pages but I can't get by copy-paste. And an export to txt 
doesn't work either… It would seem Andy found the way.




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


Re: [XeTeX] Character Variants

2011-03-27 Thread mskala
On Sun, 27 Mar 2011, David Perry wrote:
> character.  You can enter characters by number in XeTeX with \char"; so
> try
>
> \char"8FBB\char"E0100

If it's just a question of getting in the characters, which the font will
then process by glyph substitution, it should work to simply include the
desired characters literally in XeTeX's input.  I haven't tried that with
variant selectors, but it works for me with private-use characters, even
outside the Basic Multilingual Plane.  I tried to demonstrate in this
message, only to discover when I attempted to send it, that my *email
server* doesn't support the literal characters even if XeTeX, my editor,
my keyboard config, and my email client all do.

The advantage to using the literal characters is that if your editor
display supports them, they will appear more nicely during editing; the
advantage to using \char" escapes is that then the input remains in ASCII
and will better survive passage through systems (like email) that may
not support the literal characters.
-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/


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


Re: [XeTeX] Character Variants

2011-03-27 Thread David Perry

Bob,

I don't have this font, so I can't say for sure that the following will 
work, but it might.  Alt-x in Word and BabelPad is just a way of 
entering a Unicode character.  You can enter characters by number in 
XeTeX with \char"; so try


\char"8FBB\char"E0100


David

On 3/26/2011 6:05 PM, Bob Beckett wrote:

Can anyone help me get XeTeX to create a character variant?

I am using Kozuka Mincho Pr6N, which includes a variant of U+8FBB. This
variant is obtained by combining 8FBB with the Ideographic Variation Sequence
E0100. (I hope I'm phrasing this correctly.)

If I use the editor BabelPad, I can get the variant by typing:

8FBB(Alt-x)E0100(Alt-x)

But I don't know how to accomplish this in XeTeX. The fontspec manual says
that it supports character variants, but gives no examples. Not being a
computer person, I need a real example.

Thanks



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






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


Re: [XeTeX] Character Variants

2011-03-26 Thread Andy Lin
Try this. I'm not sure which variant you're looking for. The expert
form glyph omits one of the dots on the left hand side.

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\fontspec{Kozuka Mincho Pr6N}辻
\addfontfeature{RawFeature=+expt}辻
\end{document}

HTH,
Andy



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


[XeTeX] Character Variants

2011-03-26 Thread Bob Beckett
Can anyone help me get XeTeX to create a character variant?

I am using Kozuka Mincho Pr6N, which includes a variant of U+8FBB. This 
variant is obtained by combining 8FBB with the Ideographic Variation Sequence 
E0100. (I hope I'm phrasing this correctly.)

If I use the editor BabelPad, I can get the variant by typing:

8FBB(Alt-x)E0100(Alt-x)

But I don't know how to accomplish this in XeTeX. The fontspec manual says 
that it supports character variants, but gives no examples. Not being a 
computer person, I need a real example.

Thanks



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