khaledhosny / harf

A HarfBuzz-based font loader and shaper for HarfTeX
GNU General Public License v2.0
10 stars 1 forks source link

Support transparent colors #19

Closed khaledhosny closed 5 years ago

khaledhosny commented 5 years ago

Issues #14 and #15 implemented support for color options and fonts, but transparency (alpha) is currently ignored because it needs cooperation between various LaTeX package. We need to figure what should be done here.

emojifreak commented 5 years ago

beamer.cls transparency does not work for COLR/CPAL nor CBDT/CBLC font as expected 😭

\documentclass{beamer}
\usepackage{harfload}
\usepackage{fontspec}
\setsansfont{Segoe UI Emoji}[
  RawFeature={mode=harf;+dist;+ccmp}]

\usetheme{Madrid}

\begin{document}
\begin{frame}{text πŸ˜‚ text after emoji}
\setbeamercovered{transparent=30}
   \begin{itemize}
  \item <+-> Apple 🍎{\fontspec[RawFeature={mode=harf}]{Noto Color Emoji} 🍎}
  \item <+-> Peach πŸ‘{\fontspec[RawFeature={mode=harf}]{Noto Color Emoji} πŸ‘}
  \item <+-> Orange 🍊{\fontspec[RawFeature={mode=harf}]{Noto Color Emoji} 🍊}
 \end{itemize}
\end{frame}
\end{document}

harftex-transparent.pdf

khaledhosny commented 5 years ago

That is a different issue, though. My issue is about when the font palette uses transparent color. Your issue is about respecting transparent text color.

I don’t think bitmap fonts can be easily made transparent. Layer fonts should be doable, but that requires more deeper knowledge of LaTeX, PDF and LuaTeX than I do.

khaledhosny commented 5 years ago

Will be fixed when integrated with luaotfload.