adobe-fonts / source-serif

Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans.
https://adobe-fonts.github.io/source-serif
SIL Open Font License 1.1
2.17k stars 163 forks source link

Source Serif Pro's uppercase glyphs failed to be textsuperscript while being specified in XeLaTeX. #7

Closed ShikiSuen closed 8 years ago

ShikiSuen commented 9 years ago

For example: if I use Georgia or other fonts, it shows \textsuperscript like this: image

But if I use Source Serif Pro, it shows like this with \textsuperscript failed-to-apply: image

frankrolf commented 9 years ago

Hmm. What does \textsuperscript do exactly? Does it use an OpenType feature, or does it just scale/move the glyphs?

In case \textsuperscript uses the 'sups' feature, try using lowercase letters – Source Serif has superscript lowercase (but not superscript uppercase at this point). It might be that the OpenType feature is preferred if present.

ShikiSuen commented 9 years ago

Apologies that I'm just a recruit among TeX users and know less about how the \textsuperscript command works.

I have tried what you have suggested and have found that only the lowercase alphabets of this font works in this mode. image

frankrolf commented 9 years ago

Okay, then I suspect that \textsuperscript uses the 'sups' feature if present, and just scales glyphs if there is no such feature.

This brings me to my question: superscript uppercase? Is that something used frequently? I don't think I have seen superscript uppercase very often yet—that's why I am asking.

ShikiSuen commented 9 years ago

I just want to emphasize the visual contrast between the tip mark and the normal texts. This may not be a manner for writing in native western languages, but we may need it if translating some books written in CJK languages. All Kanji glyphs looks capital, that's why I want to use capitalized "TIP" in that manner.

ShikiSuen commented 9 years ago

image Then why are those brackets not capable in their superscripts, too?

frankrolf commented 9 years ago

This example confirms my suspicion: The \textsuperscript command uses only glyphs that are contained in the "sups" OT feature; brackets are not. (Only lowercase, figures, parentheses and some punctuation).

It is not very common to include the whole font within itself as superscript; maybe the behavior of the package itself can be adjusted?

See someone having a similar problem here, maybe that helps: http://tex.stackexchange.com/questions/132884/xelatex-textsuperscript-issue

ShikiSuen commented 9 years ago

Thanks for your recommendation even though it doesn't work in my case. I will use lowercase instead for a while, and I will ask other other people's opinion on it. If they think the uppercase is better, I will try other fonts instead.

frankrolf commented 9 years ago

Here is another solution to the same problem, maybe it works for you: http://tex.stackexchange.com/questions/15035/how-to-change-parameters-for-textsuperscript-in-french

The reason why all superscript characters works with Georgia etc. is those fonts simply not having a sups OT feature; this means that the small glyphs are just scaled and shifted.

Source Sans has superscript capitals, I will go ahead and include them in a future release.

Thanks for bringing up those examples.

dag commented 8 years ago

FWIW XeLaTeX doesn't do this (for me and/or any longer anyway, with TeX Live 2015) by default; I have to load the realscripts package which is from 2013, suggesting it was required back then as well. Are you loading that, directly or indirectly, perhaps? If that is the case, you'll have access to the \fakesuperscript macro that skips the sups OT feature (run texdoc realscripts for documentation).

As for Western use cases, I'm not sure it's done very frequently but it is possible to configure LaTeX packages like biblatex to put citations in superscripts, and to label the citations based on author/year which means it will typically contain upper-case letters:

For example, instead of “Jones 1995” this style would use the label “[Jon95]”. “Jones and Williams 1986” would be rendered as “[JW86]”.

But typically this style will only be used in-line, and only a numeric style for superscripts.

I thought of Wikipedia as another example but upon looking for confirmation I realized it only uses lower-case superscripts, at least for the common ones like [citation needed].

ShikiSuen commented 8 years ago

@dag Thanks to your suggestion. I will use \fakesuperscript in lieu of this issue request. Over.

frankrolf commented 8 years ago

FYI: The next release of Source Serif Pro will include uppercase superiors & brackets.

frankrolf commented 7 years ago

@ShikiSuen Source Serif Version 2.0 has a full set of superior caps and also superior brackets. Your issue even made it into the blog post! http://blog.typekit.com/2017/01/10/introducing-source-serif-2-0/