[XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread David Barts via XeTeX

Posted this on the /r/tex subreddit and it was recommended I post it here:

When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me to 
access the small caps (smcp feature) in the Baskerville or Hoefler Text 
fonts. I know these fonts contain small caps, because I can access the 
smcp feature in them when using Libre Office. I know Libre Office isn’t 
simply faking it and using a smaller point size to get small caps 
because a) that’s not how the text appears (the small caps sure look 
like proper small caps to me), b) it doesn’t do this for all fonts.


It’s not all Open Type fonts that XeTeX has problems with, either. It 
can use the small caps in Shinntype’s Scotch Modern just fine.


I’ve done some web searches about this and so far came up dry. Was 
wondering if anyone else had noticed it or has a workaround.


--
David Barts /n5...@me.com
He who has nothing to die for has nothing to live for.
 -- Moroccan proverb


Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread Herbert Schulz via XeTeX



> On Oct 23, 2023, at 8:40 PM, David Barts via XeTeX  wrote:
> 
> Posted this on the /r/tex subreddit and it was recommended I post it here:
> When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me to 
> access the small caps (smcp feature) in the Baskerville or Hoefler Text 
> fonts. I know these fonts contain small caps, because I can access the smcp 
> feature in them when using Libre Office. I know Libre Office isn’t simply 
> faking it and using a smaller point size to get small caps because a) that’s 
> not how the text appears (the small caps sure look like proper small caps to 
> me), b) it doesn’t do this for all fonts.
> 
> It’s not all Open Type fonts that XeTeX has problems with, either. It can use 
> the small caps in Shinntype’s Scotch Modern just fine.
> 
> I’ve done some web searches about this and so far came up dry. Was wondering 
> if anyone else had noticed it or has a workaround.
> -- 
> David Barts / n5...@me.com
> He who has nothing to die for has nothing to live for.
> -- Moroccan proverb

Howdy,

Would you please provide a minimal sample file so we can see how you're 
accessing the font. Also, where is the font located and does Font Book display 
it?

Good Luck,

Herb Schulz
her...@mac.com





Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread Yannis Haralambous
The Scotch Modern font contains glyphs with the smcp extension, these are used 
by the smcp feature. See the screen capture below:



I opened the Hoefler Text font and found no such glyphs, but maybe it is an old 
version of the font. Have you opened it with FontLab and
have you seen glyph with names such as the above?

> Le 24 oct. 2023 à 03:40, David Barts via XeTeX  a écrit :
> 
> Posted this on the /r/tex subreddit and it was recommended I post it here:
> 
> When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me to 
> access the small caps (smcp feature) in the Baskerville or Hoefler Text 
> fonts. I know these fonts contain small caps, because I can access the smcp 
> feature in them when using Libre Office. I know Libre Office isn’t simply 
> faking it and using a smaller point size to get small caps because a) that’s 
> not how the text appears (the small caps sure look like proper small caps to 
> me), b) it doesn’t do this for all fonts.
> 
> It’s not all Open Type fonts that XeTeX has problems with, either. It can use 
> the small caps in Shinntype’s Scotch Modern just fine.
> 
> I’ve done some web searches about this and so far came up dry. Was wondering 
> if anyone else had noticed it or has a workaround.
> 
> -- 
> David Barts / n5...@me.com 
> He who has nothing to die for has nothing to live for.
>  -- Moroccan proverb

 Yannis HARALAMBOUS
Professor
Computer Science Department
UMR CNRS 6285 Lab-STICC
  
 
Technopôle
 Brest-Iroise CS 83818
29238 Brest Cedex 3, France
Une École de l'IMT 

‌All grammars leak.
‌(Edward Sapir, ‌Language: An Introduction to the Study of Speech)‌



Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread Lorna Evans
I downloaded Hoefler Text from here: 
https://fontsgeek.com/fonts/Hoefler-Text-Regular#google_vignette


My minimal example:


%!TEX TS-program = xelatex

\documentclass[12pt]{memoir}

\usepackage{fontspec}


\setmainfont[Renderer=OpenType]{Hoefler Text}


\begin{document}

Now is the time for all good men to come to the aid of their country. 
The quick brown fox jumped over the lazy black dog.



\fontspec{Hoefler Text}[

Renderer=OpenType,

RawFeature={+smcp}]

Now is the time for all good men to come to the aid of their country. 
The quick brown fox jumped over the lazy black dog.




\end{document}




This produced

I don't know if the screenshot will come through on this list. But it 
seems to work. I'm on Windows though.


Lorna


On 10/23/2023 8:40 PM, David Barts via XeTeX wrote:


Posted this on the /r/tex subreddit and it was recommended I post it here:

When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me 
to access the small caps (smcp feature) in the Baskerville or Hoefler 
Text fonts. I know these fonts contain small caps, because I can 
access the smcp feature in them when using Libre Office. I know Libre 
Office isn’t simply faking it and using a smaller point size to get 
small caps because a) that’s not how the text appears (the small caps 
sure look like proper small caps to me), b) it doesn’t do this for all 
fonts.


It’s not all Open Type fonts that XeTeX has problems with, either. It 
can use the small caps in Shinntype’s Scotch Modern just fine.


I’ve done some web searches about this and so far came up dry. Was 
wondering if anyone else had noticed it or has a workaround.


--
David Barts /n5...@me.com
He who has nothing to die for has nothing to live for.
  -- Moroccan proverb

Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread Yannis Haralambous
dear Lorna,

I downloaded the font and opened it with FontLab. Even though it has a feature

feature smcp {
# GSUB feature: Small Capitals
# Lookups: 1

  script latn; # Latin
  sub @smcp by @smcp2;

} smcp;

and a class called smcp:

 b c d e f g h i j k l m n o p q r s t u v w x y z a_acute a_grave a_circumflex 
a_dieresis a_tilde a_ring c_cedilla e_acute e_grave e_circumflex e_dieresis 
i_acute i_grave i_circumflex i_dieresis n_tilde o_acute o_grave o_circumflex 
o_dieresis o_tilde u_acute u_grave u_circumflex u_dieresis a_e o_slash o_e 
y_dieresis a_macron a_breve a_ogonek c_acute c_caron d_quote.right d_bar.croat 
d_bar.eth e_macron e_dot.accent e_ogonek e_caron g_breve g_acute i_macron 
i_ogonek k_cedilla l_acute l_cedilla l_quote.right l_dot.right l_slash n_acute 
n_cedilla n_caron o_macron o_umlaut.hungarian r_acute r_cedilla r_caron s_acute 
s_cedilla s_comma.below s_caron t_cedilla t_comma.below t_quote.right u_ring 
u_macron u_ogonek u__umlaut.hungarian y_acute z_acute z_dot.accent z_caron 
thorn g_comma.below k_comma.below l_comma.below n_comma.below r_comma.below

it does not contain glyphs with the .smcp extension but only glyphs with the 
.small extension as you can see here:



Maybe XeTeX needs to find the .smcp extension to use a glyph in the frame of 
the smcp feature.


> Le 24 oct. 2023 à 22:44, Lorna Evans  a écrit :
> 
> I downloaded Hoefler Text from here: 
> https://fontsgeek.com/fonts/Hoefler-Text-Regular#google_vignette
> 
> My minimal example:
> 
> 
>> %!TEX TS-program = xelatex
>> 
>> \documentclass[12pt]{memoir}
>> \usepackage{fontspec}
>> 
>> \setmainfont[Renderer=OpenType]{Hoefler Text}
>> 
>> \begin{document}
>> Now is the time for all good men to come to the aid of their country. The 
>> quick brown fox jumped over the lazy black dog.
>> 
>> \fontspec{Hoefler Text}[
>> Renderer=OpenType,
>> RawFeature={+smcp}]
>> Now is the time for all good men to come to the aid of their country. The 
>> quick brown fox jumped over the lazy black dog.
>> 
>> 
>> \end{document}
>> 
>> 
> This produced 
> 
> <0zD8ysJKQPSxTnZv.png>
> 
> I don't know if the screenshot will come through on this list. But it seems 
> to work. I'm on Windows though.
> 
> Lorna
> 
> 
> 
> On 10/23/2023 8:40 PM, David Barts via XeTeX wrote:
>> Posted this on the /r/tex subreddit and it was recommended I post it here:
>> 
>> When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me to 
>> access the small caps (smcp feature) in the Baskerville or Hoefler Text 
>> fonts. I know these fonts contain small caps, because I can access the smcp 
>> feature in them when using Libre Office. I know Libre Office isn’t simply 
>> faking it and using a smaller point size to get small caps because a) that’s 
>> not how the text appears (the small caps sure look like proper small caps to 
>> me), b) it doesn’t do this for all fonts.
>> 
>> It’s not all Open Type fonts that XeTeX has problems with, either. It can 
>> use the small caps in Shinntype’s Scotch Modern just fine.
>> 
>> I’ve done some web searches about this and so far came up dry. Was wondering 
>> if anyone else had noticed it or has a workaround.
>> 
>> -- 
>> David Barts / n5...@me.com 
>> He who has nothing to die for has nothing to live for.
>>  -- Moroccan proverb

 Yannis HARALAMBOUS
Professor
Computer Science Department
UMR CNRS 6285 Lab-STICC
  
 
Technopôle
 Brest-Iroise CS 83818
29238 Brest Cedex 3, France
Une École de l'IMT 

‌The ball I threw while playing in the park
has not yet reached the ground
‌(Dylan Thomas, ‌Should Lanterns Shine)‌



Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread Herbert Schulz via XeTeX



> On Oct 24, 2023, at 3:44 PM, Lorna Evans  wrote:
> 
> I downloaded Hoefler Text from here: 
> https://fontsgeek.com/fonts/Hoefler-Text-Regular#google_vignette
> My minimal example:
> 
>> %!TEX TS-program = xelatex 
>> 
>> \documentclass[12pt]{memoir}
>> \usepackage{fontspec}
>> 
>> \setmainfont[Renderer=OpenType]{Hoefler Text}
>> 
>> \begin{document}
>> Now is the time for all good men to come to the aid of their country. The 
>> quick brown fox jumped over the lazy black dog.
>> 
>> \fontspec{Hoefler Text}[
>> Renderer=OpenType,
>> RawFeature={+smcp}]
>> Now is the time for all good men to come to the aid of their country. The 
>> quick brown fox jumped over the lazy black dog.
>> 
>> 
>> \end{document}
>> 
>> 
> This produced 
> 
> <0zD8ysJKQPSxTnZv.png>I don't know if the screenshot will come through on 
> this list. But it seems to work. I'm on Windows though.
> Lorna
> 
> On 10/23/2023 8:40 PM, David Barts via XeTeX wrote:
>> Posted this on the /r/tex subreddit and it was recommended I post it here:
>> When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me to 
>> access the small caps (smcp feature) in the Baskerville or Hoefler Text 
>> fonts. I know these fonts contain small caps, because I can access the smcp 
>> feature in them when using Libre Office. I know Libre Office isn’t simply 
>> faking it and using a smaller point size to get small caps because a) that’s 
>> not how the text appears (the small caps sure look like proper small caps to 
>> me), b) it doesn’t do this for all fonts.
>> 
>> It’s not all Open Type fonts that XeTeX has problems with, either. It can 
>> use the small caps in Shinntype’s Scotch Modern just fine.
>> 
>> I’ve done some web searches about this and so far came up dry. Was wondering 
>> if anyone else had noticed it or has a workaround.
>> -- 
>> David Barts / n5...@me.com
>> He who has nothing to die for has nothing to live for.
>> -- Moroccan proverb

Howdy,

Does the OpenType version of Hoefler Text appear in Font Book? If you are using 
\setmainfont using a font name (rather than file name) xelatex (at least on 
Mac) will only use fonts that that the system `knows' about. There is a ttf 
version of Hoefler Text so that is what will be used. You must let Font Book 
`know' about the OpenType version and then make it the active version.

Good Luck,

Herb Schulz
her...@mac.com





Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread David Barts via XeTeX
Interesting. This works for me! I don't know why (I am relatively new to 
TeX/LaTeX, but it works. It finds the small caps in both the Baskerville 
and Hoefler Text fonts that ship with MacOS.


What I had been doing is using :

\scshape{Some text here.}

I also tried using \scshapeand that also failed. (As I wrote earlier, 
both \scshapeand \textscwork fine with Scotch Modern, so the issue only 
seems to affect certain fonts.) For the time being I will just use 
\fontspecas you did below.


For reference, the error message I get is:

LaTeX Font Warning: Font shape `TU/HoeflerText(0)/m/sc' undefined 
(Font)  using `TU/HoeflerText(0)/m/n' instead on input line 
11. [1] (./mfbb.aux) LaTeX Font Warning: Some font shapes were not 
available, defaults substituted.


Anyhow, thanks for the workaround!

On 2023-10-24 13:44, Lorna Evans wrote:


I downloaded Hoefler Text from here: 
https://fontsgeek.com/fonts/Hoefler-Text-Regular#google_vignette


My minimal example:


%!TEX TS-program = xelatex

\documentclass[12pt]{memoir}

\usepackage{fontspec}


\setmainfont[Renderer=OpenType]{Hoefler Text}


\begin{document}

Now is the time for all good men to come to the aid of their country. 
The quick brown fox jumped over the lazy black dog.



\fontspec{Hoefler Text}[

Renderer=OpenType,

RawFeature={+smcp}]

Now is the time for all good men to come to the aid of their country. 
The quick brown fox jumped over the lazy black dog.




\end{document}




This produced

I don't know if the screenshot will come through on this list. But it 
seems to work. I'm on Windows though.


Lorna


On 10/23/2023 8:40 PM, David Barts via XeTeX wrote:


Posted this on the /r/tex subreddit and it was recommended I post it 
here:


When I run XeLaTeX from TeX Live 2023 on my Mac, it does not allow me 
to access the small caps (smcp feature) in the Baskerville or Hoefler 
Text fonts. I know these fonts contain small caps, because I can 
access the smcp feature in them when using Libre Office. I know Libre 
Office isn’t simply faking it and using a smaller point size to get 
small caps because a) that’s not how the text appears (the small caps 
sure look like proper small caps to me), b) it doesn’t do this for 
all fonts.


It’s not all Open Type fonts that XeTeX has problems with, either. It 
can use the small caps in Shinntype’s Scotch Modern just fine.


I’ve done some web searches about this and so far came up dry. Was 
wondering if anyone else had noticed it or has a workaround.


--
David Barts /n5...@me.com
He who has nothing to die for has nothing to live for.
  -- Moroccan proverb


--
David Barts /n5...@me.com
He who has nothing to die for has nothing to live for.
 -- Moroccan proverb


Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread David Barts via XeTeX

They are both TrueType as reported by Font Book.

But as I just wrote, I can access the small caps via the \fontspec 
macro; it is just \textsc and \scshape that fail.


On 2023-10-24 17:06, Herbert Schulz via XeTeX wrote:

Howdy,

Does the OpenType version of Hoefler Text appear in Font Book? If you are using 
\setmainfont using a font name (rather than file name) xelatex (at least on 
Mac) will only use fonts that that the system `knows' about. There is a ttf 
version of Hoefler Text so that is what will be used. You must let Font Book 
`know' about the OpenType version and then make it the active version.

Good Luck,

Herb Schulz
her...@mac.com


--
David Barts /n5...@me.com
He who has nothing to die for has nothing to live for.
 -- Moroccan proverb


Re: [XeTeX] XeTeX OpenType Features bug?

2023-10-24 Thread David Barts via XeTeX

That should of course read \textsc{Some text here.}

On 2023-10-24 19:57, David Barts via XeTeX wrote:


What I had been doing is using :

\scshape{Some text here.}


--
David Barts /n5...@me.com
He who has nothing to die for has nothing to live for.
 -- Moroccan proverb