如何提高嘈杂、多彩背景下的文本可读性?

如何提高嘈杂、多彩背景下的文本可读性?

我有一个嘈杂的彩色背景,我正在向其中写入文本。问题是,根据背景颜色,部分文本难以阅读。这是一个 TeXified 问题另一个问题来自 graphicdesign.SE。

这是(相同)图片(原文取自这里)。现在,如果我使用它作为以下 MWE 中的背景(london3.png)(感谢 Christian Hupfer 的建议,现在它更加清晰了):

\documentclass[a4paper,landscape]{article}
\usepackage[outline]{contour}
\usepackage{background}
\usepackage{eso-pic}
\backgroundsetup{contents={}}

\newcommand\BackgroundPic{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\includegraphics[
width=\paperwidth,
keepaspectratio%,
]{london3.png}}%
}}      
\newcommand{\fancytext}[1]{\textcolor{white}{\contour{black}{\textbf{#1}}}}

\begin{document}
\AddToShipoutPicture*{\BackgroundPic}
\sffamily
\Huge
\vspace*{3cm}
\noindent\scalebox{3}{\fancytext{This is a longgg text which is difficult to read on this background.}}
\noindent\scalebox{3}{\fancytext{This s anothhhher long text which is difficult to read.}}  
\end{document}

然后我得到了如下结果:

在此处输入图片描述

这很不愉快。为了改进这篇文章,我想

  1. 申请半透明背景,如下图所示 周围文本(但保留生动的背景);以及
  2. 修复gh现象。

答案1

这是一个初步的解决方案,transparency仅对目前有效。

\documentclass[a4paper,landscape]{article}
\usepackage[outline]{contour}
\usepackage{xcolor}
\usepackage{graphicx}
%\usepackage{transparent}
\usepackage{background}
\usepackage{eso-pic}
\newcommand\BackgroundPic{%
  \includegraphics[%
  width=\paperwidth,
  keepaspectratio%,
  ]{london3.png}
}
% \textheight = 630pt %762pt
% \topmargin=-1.2cm
\oddsidemargin=-2.5cm

\newcommand{\fancytext}[1]{\textcolor{white}{\contour{black}{\textbf{#1}}}}
\backgroundsetup{contents={\BackgroundPic},position={0,0},placement=top,scale=1,angle=0,opacity=0.6}
\begin{document}
\thispagestyle{empty}
\sffamily
\Huge
\vspace*{3cm}
\noindent\scalebox{3}{\fancytext{This is a longgg text which is difficult to read on this background.}}
 \vskip0.5\baselineskip
\noindent\scalebox{3}{\fancytext{This s anothhhher long text which is difficult to read.}}  
\end{document}

更新,但仍然不太好

\documentclass[a4paper,landscape]{article}
\usepackage[outline]{contour}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{background}
\usepackage{eso-pic}
\newcommand\BackgroundPic{%
  \includegraphics[%
  width=\paperwidth,
  keepaspectratio%,
  ]{london3.png}
}
% \textheight = 630pt %762pt
% \topmargin=-1.2cm
\oddsidemargin=-2.5cm

\newcommand{\fancytext}[2][]{\begin{tikzpicture} \node[gray,#1] (A) at (0,0) {\contour{black}{#2}};\end{tikzpicture}}
\backgroundsetup{contents={\BackgroundPic},position={0,0},placement=top,scale=1,angle=0,opacity=1.0}
\begin{document}
\thispagestyle{empty}
\sffamily
\Huge
\vspace*{3cm}
\noindent\scalebox{3}{\protect\fancytext[opacity=0.3]{This is a longgg text which is difficult to read on this background.}}
\vskip0.5\baselineskip
\noindent\scalebox{3}{\fancytext[red,opacity=0.3]{This s anothhhher long text which is difficult to read.}}  
\end{document}

相关内容