Skip to content

Commit

Permalink
Update docos.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 5, 2023
1 parent c188cb8 commit f1ad982
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
16 changes: 15 additions & 1 deletion doc/pdfio.3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH pdfio 3 "pdf read/write library" "2023-11-15" "pdf read/write library"
.TH pdfio 3 "pdf read/write library" "2023-12-04" "pdf read/write library"
.SH NAME
pdfio \- pdf read/write library
.SH Introduction
Expand Down Expand Up @@ -1774,6 +1774,20 @@ bool pdfioContentTextEnd (
pdfio_stream_t *st
);
.fi
.SS pdfioContentTextMeasure
Measure a text string and return its width.
.PP
.nf
double pdfioContentTextMeasure (
pdfio_obj_t *font,
const char *s,
double size
);
.fi
.PP
This function measures the given text string "s" and returns its width based
on "size". The text string must always use the UTF-8 (Unicode) encoding but
any control characters (such as newlines) are ignored.
.SS pdfioContentTextMoveLine
Move to the next line and offset.
.PP
Expand Down
26 changes: 23 additions & 3 deletions doc/pdfio.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>PDFio Programming Manual v1.1.3</title>
<title>PDFio Programming Manual v1.2.0</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="generator" content="codedoc v3.7">
<meta name="author" content="Michael R Sweet">
<meta name="language" content="en-US">
<meta name="copyright" content="Copyright © 2021-2023 by Michael R Sweet">
<meta name="version" content="1.1.3">
<meta name="version" content="1.2.0">
<style type="text/css"><!--
body {
background: white;
Expand Down Expand Up @@ -245,7 +245,7 @@
<body>
<div class="header">
<p><img class="title" src="pdfio-512.png"></p>
<h1 class="title">PDFio Programming Manual v1.1.3</h1>
<h1 class="title">PDFio Programming Manual v1.2.0</h1>
<p>Michael R Sweet</p>
<p>Copyright © 2021-2023 by Michael R Sweet</p>
</div>
Expand Down Expand Up @@ -342,6 +342,7 @@ <h2 class="title">Contents</h2>
<li><a href="#pdfioContentStroke">pdfioContentStroke</a></li>
<li><a href="#pdfioContentTextBegin">pdfioContentTextBegin</a></li>
<li><a href="#pdfioContentTextEnd">pdfioContentTextEnd</a></li>
<li><a href="#pdfioContentTextMeasure">pdfioContentTextMeasure</a></li>
<li><a href="#pdfioContentTextMoveLine">pdfioContentTextMoveLine</a></li>
<li><a href="#pdfioContentTextMoveTo">pdfioContentTextMoveTo</a></li>
<li><a href="#pdfioContentTextNextLine">pdfioContentTextNextLine</a></li>
Expand Down Expand Up @@ -2005,6 +2006,25 @@ <h4 class="parameters">Parameters</h4>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
<p class="description"><code>true</code> on success, <code>false</code> on failure</p>
<h3 class="function"><a id="pdfioContentTextMeasure">pdfioContentTextMeasure</a></h3>
<p class="description">Measure a text string and return its width.</p>
<p class="code">
double pdfioContentTextMeasure(<a href="#pdfio_obj_t">pdfio_obj_t</a> *font, const char *s, double size);</p>
<h4 class="parameters">Parameters</h4>
<table class="list"><tbody>
<tr><th>font</th>
<td class="description">Font object created by <a href="#pdfioFileCreateFontObjFromFile"><code>pdfioFileCreateFontObjFromFile</code></a></td></tr>
<tr><th>s</th>
<td class="description">UTF-8 string</td></tr>
<tr><th>size</th>
<td class="description">Font size/height</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Width</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function measures the given text string &quot;s&quot; and returns its width based
on &quot;size&quot;. The text string must always use the UTF-8 (Unicode) encoding but
any control characters (such as newlines) are ignored.</p>
<h3 class="function"><a id="pdfioContentTextMoveLine">pdfioContentTextMoveLine</a></h3>
<p class="description">Move to the next line and offset.</p>
<p class="code">
Expand Down

0 comments on commit f1ad982

Please sign in to comment.