Document new v2.6 fonts work
This commit is contained in:
parent
3bf1bfb759
commit
57931eb911
|
@ -1731,6 +1731,7 @@ let setidironlypdfs () =
|
||||||
let setnowarnrotate () =
|
let setnowarnrotate () =
|
||||||
args.no_warn_rotate <- true
|
args.no_warn_rotate <- true
|
||||||
|
|
||||||
|
(* Unused for now *)
|
||||||
let setfontttfencoding s =
|
let setfontttfencoding s =
|
||||||
args.fontencoding <-
|
args.fontencoding <-
|
||||||
match s with
|
match s with
|
||||||
|
@ -2462,9 +2463,6 @@ and specs =
|
||||||
("-load-ttf",
|
("-load-ttf",
|
||||||
Arg.String loadttf,
|
Arg.String loadttf,
|
||||||
" Use a TrueType font");
|
" Use a TrueType font");
|
||||||
("-font-encoding",
|
|
||||||
Arg.String setfontttfencoding,
|
|
||||||
" Set the encoding for the TrueType font");
|
|
||||||
("-embed-std14",
|
("-embed-std14",
|
||||||
Arg.String setembedstd14,
|
Arg.String setembedstd14,
|
||||||
" Embed standard 14 fonts");
|
" Embed standard 14 fonts");
|
||||||
|
|
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
|
@ -1,4 +1,3 @@
|
||||||
%FIXME: FIXMEs
|
|
||||||
\documentclass{book}
|
\documentclass{book}
|
||||||
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
||||||
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
||||||
|
@ -15,7 +14,7 @@
|
||||||
\usepackage{microtype}
|
\usepackage{microtype}
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\usepackage{upquote}
|
\usepackage{upquote}
|
||||||
\usepackage[plainpages=false,pdfpagelabels,pdfborder=0 0 0,draft=false,hidelinks,bookmarksnumbered]{hyperref}
|
\PassOptionsToPackage{hyphens}{url}\usepackage[plainpages=false,pdfpagelabels,pdfborder=0 0 0,draft=false,hidelinks,bookmarksnumbered]{hyperref}
|
||||||
\usepackage{framed}
|
\usepackage{framed}
|
||||||
\newcommand{\smallgap}{\bigskip}
|
\newcommand{\smallgap}{\bigskip}
|
||||||
\newcommand{\cpdf}{\texttt{cpdf}}
|
\newcommand{\cpdf}{\texttt{cpdf}}
|
||||||
|
@ -2244,17 +2243,20 @@ the file using a different page range each time.
|
||||||
|
|
||||||
\vspace{1.5mm}
|
\vspace{1.5mm}
|
||||||
\noindent\small\begin{verbatim}cpdf ([-add-text <text-format> | -add-rectangle <size>])
|
\noindent\small\begin{verbatim}cpdf ([-add-text <text-format> | -add-rectangle <size>])
|
||||||
[-font <fontname>] [-font-size <size-in-points>]
|
[-font <fontname>] [-font-size <size-in-points>]
|
||||||
[-font-ttf <filename>] [-embed-std14]
|
[-load-ttf <name>=<file>] [-embed-std14]
|
||||||
[-color <color>] [-line-spacing <number>]
|
[-font-enconding
|
||||||
[-outline] [-linewidth <number>]
|
[-color <color>] [-line-spacing <number>]
|
||||||
[-underneath] [-relative-to-cropbox]
|
[-outline] [-linewidth <number>]
|
||||||
[-prerotate] [-no-warn-rotate]
|
[-underneath] [-relative-to-cropbox]
|
||||||
[-bates <number>] [-bates-at-range <number>]
|
[-prerotate] [-no-warn-rotate]
|
||||||
[-bates-pad-to <number>] [-opacity <number>]
|
[-bates <number>] [-bates-at-range <number>]
|
||||||
[-midline] [-topline]
|
[-bates-pad-to <number>] [-opacity <number>]
|
||||||
[-fast]
|
[-midline] [-topline]
|
||||||
in.pdf [<range>] -o out.pdf\end{verbatim}
|
[-fast]
|
||||||
|
in.pdf [<range>] -o out.pdf\end{verbatim}
|
||||||
|
|
||||||
|
\vspace{1.5mm}
|
||||||
\noindent See also positioning commands below.
|
\noindent See also positioning commands below.
|
||||||
|
|
||||||
\vspace{1.5mm}
|
\vspace{1.5mm}
|
||||||
|
@ -2434,7 +2436,7 @@ than its baseline. Similarly, the \texttt{-topline} option may be used to specif
|
||||||
|
|
||||||
\subsection{Font and Size}
|
\subsection{Font and Size}
|
||||||
\index{font}
|
\index{font}
|
||||||
The 14 standard PDF fonts may be set with the \texttt{-font} option. They are:
|
The standard PDF fonts may be set with the \texttt{-font} option. They are:
|
||||||
|
|
||||||
\vspace{2mm}
|
\vspace{2mm}
|
||||||
\begin{tabular}{l}
|
\begin{tabular}{l}
|
||||||
|
@ -2449,9 +2451,7 @@ than its baseline. Similarly, the \texttt{-topline} option may be used to specif
|
||||||
Courier\\
|
Courier\\
|
||||||
Courier-Bold\\
|
Courier-Bold\\
|
||||||
Courier-Oblique\\
|
Courier-Oblique\\
|
||||||
Courier-BoldOblique\\
|
Courier-BoldOblique
|
||||||
Symbol\\
|
|
||||||
ZapfDingbats
|
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\vspace{2mm}
|
\vspace{2mm}
|
||||||
|
|
||||||
|
@ -2460,21 +2460,24 @@ than its baseline. Similarly, the \texttt{-topline} option may be used to specif
|
||||||
\noindent\small\verb!cpdf -add-text "-%Page-" -font "Times-Italic" in.pdf -o out.pdf!
|
\noindent\small\verb!cpdf -add-text "-%Page-" -font "Times-Italic" in.pdf -o out.pdf!
|
||||||
\end{framed}
|
\end{framed}
|
||||||
|
|
||||||
FIXME: How to provide font files for -embed-std14
|
\noindent The font size can be altered with the \texttt{-font-size} option, which
|
||||||
FIXME: Which font packs we provide
|
|
||||||
FIXME: Which characters are available in Latin1, and Google fonts
|
|
||||||
FIXME: How to choose font encoding
|
|
||||||
|
|
||||||
\noindent Adding \texttt{-embed-std14} to the command will embed subsetted font files in the PDF for any of the Standard 14 fonts used.
|
|
||||||
|
|
||||||
Other TrueType fonts may be introduced with the \texttt{-font-ttf} option, giving the file name of the font. See Section \ref{copyfont} for how to use an existing font from the source document.
|
|
||||||
|
|
||||||
The font size can be altered with the \texttt{-font-size} option, which
|
|
||||||
specifies the size in points:
|
specifies the size in points:
|
||||||
\begin{framed}
|
\begin{framed}
|
||||||
\noindent\small\verb!cpdf -add-text "-%Page-" -font-size 36 in.pdf -o out.pdf!
|
\noindent\small\verb!cpdf -add-text "-%Page-" -font-size 36 in.pdf -o out.pdf!
|
||||||
\end{framed}
|
\end{framed}
|
||||||
|
|
||||||
|
\noindent Adding \texttt{-embed-std14 <directory>}, given a directory holding the GhostScript/URW free fonts, will embed subsetted font files in the PDF for any of the Standard fonts used. These free fonts can be downloaded from \url{https://github.com/ArtifexSoftware/urw-base35-fonts}. This is important, for example, for PDF/A documents, which must have their fonts embedded.
|
||||||
|
|
||||||
|
The standard fonts cover only the Latin characters, and are limiting. Other TrueType fonts may be introduced with the \texttt{-load-ttf} option, giving a name for, and the file name of the font. For example:
|
||||||
|
|
||||||
|
\begin{framed}
|
||||||
|
\noindent\small\verb!cpdf -load-ttf A=NotoSans-Black.ttf -font A "-%Page-" -o out.pdf!
|
||||||
|
\end{framed}
|
||||||
|
|
||||||
|
\noindent Here we have used the Noto Sans font from Google. This and other Google fonts contain characters for a huge number of scripts, and are available free from \url{https://fonts.google.com/noto/}. But you may use any TrueType font.
|
||||||
|
|
||||||
|
See Section \ref{copyfont} for how to use an existing font from the source document.
|
||||||
|
|
||||||
\subsection{Colors}
|
\subsection{Colors}
|
||||||
\index{color}
|
\index{color}
|
||||||
The \texttt{-color} option takes an RGB (3 values), CYMK (4 values), or Grey (1 value) color. Components range between 0 and 1. All the standard web colours \url{https://www.w3.org/wiki/CSS/Properties/color/keywords} are provided as RGB components, and may be selected by name.
|
The \texttt{-color} option takes an RGB (3 values), CYMK (4 values), or Grey (1 value) color. Components range between 0 and 1. All the standard web colours \url{https://www.w3.org/wiki/CSS/Properties/color/keywords} are provided as RGB components, and may be selected by name.
|
||||||
|
@ -4362,7 +4365,6 @@ Lines may have dash patterns. A dash pattern consists of one or more numbers. Al
|
||||||
\fbox{\includegraphics[width=0.3\textwidth]{manualimages/dash.pdf}}
|
\fbox{\includegraphics[width=0.3\textwidth]{manualimages/dash.pdf}}
|
||||||
\bigskip
|
\bigskip
|
||||||
|
|
||||||
%FIXME specify the angles etc. properly - what units?
|
|
||||||
\section{The graphics stack and matrices}
|
\section{The graphics stack and matrices}
|
||||||
{\small\begin{framed}
|
{\small\begin{framed}
|
||||||
\noindent\verb!-push! Push graphics stack\\
|
\noindent\verb!-push! Push graphics stack\\
|
||||||
|
|
Loading…
Reference in New Issue