summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorwl <wl>2006-07-12 19:31:08 +0000
committerwl <wl>2006-07-12 19:31:08 +0000
commitd0aaf996772a9b623023b45a47fa6ea656d64872 (patch)
tree5b28076dc0fb537b632079ebeb4a4875df4bfefa /doc
parentc5116ee8cc5889b23b1049ff702f19b828026af2 (diff)
downloadgroff-d0aaf996772a9b623023b45a47fa6ea656d64872.tar.gz
Add a request `.fzoom' and a number register `.zoom' to magnify
fonts. * src/include/font.h (font): Add member variable `zoom'. Add member functions `set_zoom' and `get_zoom'. Remove `static' attribute from `scale' member function. * src/libs/libgroff/font.cpp (font::font): Updated. (scale_round): New version with three parameters to handle zoom factor. (font::scale, font::get_width): Handle zoom factor. (font::set_zoom, font::get_zoom): New functions. (font::load): Handle `zoom' while computing `space_width'. * src/roff/troff/env.h: Declare `env_get_zoom'. (environment): Add member function `get_zoom'. * src/roff/troff/env.cpp (environment::get_zoom): New function. (init_env_requests): Initialize `.zoom' register. * src/roff/troff/node.cpp (font_info): New member functions `set_zoom' and `get_zoom'. (tfont): New member function `get_zoom'. (env_get_zoom): New function. (troff_output_file::set_font): Handle zoom factor. (font_zoom_request): New function. (init_node_requests): Initialize `fzoom' request. * docs/groff.texinfo (Changing Fonts), man/groff.man, man/groff_diff.man, NEWS: Document `fzoom' request and `.zoom' register. * src/roff/troff/TODO: Updated.
Diffstat (limited to 'doc')
-rw-r--r--doc/groff.texinfo36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index aae17d01..97b53473 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -8703,6 +8703,7 @@ the current environment.
@endDefreq
@Defreq {ftr, f [@Var{g}]}
+@cindex font translation (@code{ftr})
@cindex @code{ft} request, and font translations
@cindex @code{ul} request, and font translations
@cindex @code{bd} request, and font translations
@@ -8725,6 +8726,41 @@ font@tie{}@var{g} is used. If @var{g} is missing or equal to@tie{}@var{f}
the translation is undone.
@endDefreq
+@DefreqList {fzoom, f [@Var{zoom}]}
+@DefregListEnd {.zoom}
+@cindex magnification of a font (@code{fzoom})
+@cindex font, magnification (@code{fzoom})
+@cindex zoom factor of a font (@code{fzoom})
+@cindex factor, zoom, of a font (@code{fzoom})
+@cindex font, zoom factor (@code{fzoom})
+@cindex optical size of a font
+@cindex font, optical size
+@cindex size, optical, of a font
+Set magnification of font@tie{}@var{f} to factor @var{zoom}, which must be a
+non-negative integer multiple of 1/1000th. This request is useful to adjust
+the optical size of a font in relation to the others. In the example below,
+font @code{CR} is magnified by 10% (the zoom factor is thus 1.1).
+
+@Example
+.fam P
+.fzoom CR 1100
+.ps 12
+Palatino and \f[CR]Courier\f[]
+@endExample
+
+A missing or zero value of @var{zoom} is the same as a value of 1000, which
+means no magnification. @var{f}@tie{}must be a real font name, not a style.
+
+Note that the magnification of a font is completely transparent to troff; a
+change of the zoom factor doesn't cause any effect except that the
+dimensions of glyphs, (word) spaces, kerns, etc., of the affected font are
+adjusted accordingly.
+
+The zoom factor of the current font is available in the read-only number
+register @samp{.zoom}, in multiples of 1/1000th. It returns zero if there
+is no magnification.
+@endDefreq
+
@c ---------------------------------------------------------------------
@node Font Families, Font Positions, Changing Fonts, Fonts and Symbols