Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\reflectbox ? #1035

Closed
ctrlcctrlv opened this issue Aug 14, 2020 · 6 comments · Fixed by #1710
Closed

\reflectbox ? #1035

ctrlcctrlv opened this issue Aug 14, 2020 · 6 comments · Fixed by #1710
Labels
enhancement Software improvement or feature request
Milestone

Comments

@ctrlcctrlv
Copy link
Member

I have macros for \LaTeX and \SILE. Is it possible to typeset the XeTeX and XeLaTeX logos, which has flipped ‹E›'s?

image

I suppose I need to make a custom font with a flipped E, Ǝ, if it doesn't exist in the font? Or...

XƎLaTeX / XƎTeX ?

@alerque
Copy link
Member

alerque commented Aug 14, 2020

Is it actually mirrored or would a 180 spin work just as well?

@ctrlcctrlv
Copy link
Member Author

Hmm. I mean, it might be noticeable in some fonts, if the E bar is not exactly centered.

@DavidLRowe
Copy link
Contributor

U+018E perhaps? Ǝ

@ctrlcctrlv
Copy link
Member Author

Thanks @DavidLRowe , I mentioned it in the first post :-)

I suppose I need to make a custom font with a flipped E, Ǝ, if it doesn't exist in the font? Or...

I'm trying to make a logos package for SILE. In LaTeX it's pretty normal to typeset the logo in any font, so that's why I'm asking. It seems more fonts have U+018E than I thought: Gentium Pro, EB Garamond, Noto Serif, etc., all have it, so maybe it's not such a big deal to try to support those without. After all, you have to use a robust text face with SILE to really take advantage of it, so I'm not sure I care about people who aren't. ;-)

I'll just provide -CM versions, like LaTeX-CM, which will choose Latin Modern Roman, I guess, for them. 🤷‍♂️

@simoncozens
Copy link
Member

Implementing \reflectbox would certainly be an interesting project for anyone who wants to learn about output drivers. :-) You would want to look into how the graphics package works in xetex, since we are effectively using xetex's output backend as a library. Here's something from xetex.def that may be relevant:

\def\Gscale@start{%
  \special{pdf:btrans}%
  \special{x:scale \Gscale@x\GPT@space\Gscale@y}%
}
...
\def\Gscale@end{\special{pdf:etrans}}

Now, how do we get those specials into the PDF? libtexpdf doesn't support specials directly, so you need to look at their implementation in dvipdfmx, which you'll find here. Then it's a matter of working out which low-level libtexpdf functions you need to expose to Lua, putting those into justenoughlibtexpdf.c, and writing some routines in packages/pdf.lua to implement the specials.

@ctrlcctrlv
Copy link
Member Author

@simoncozens Cool idea. For now I decided to just use Ǝ and do the rotate, but I'll keep it in mind !

Here are all the major LaTeX logos in SILE format:

https://github.com/ctrlcctrlv/sile-logos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Software improvement or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants