aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-03-04 15:27:33 +0100
committerJay Berkenbilt <ejb@ql.org>2021-03-04 21:08:36 +0100
commitc46137432e19c0701624eb3bcb954b4cf39ec6f5 (patch)
treea038c8d22f12b88329dbab1d92ebb14c1173a4c7
parent887f35efaa60653dcb92ea96c5f4d17bdd859d93 (diff)
downloadqpdf-c46137432e19c0701624eb3bcb954b4cf39ec6f5.tar.zst
TODO notes about text appearance streams
-rw-r--r--TODO31
1 files changed, 31 insertions, 0 deletions
diff --git a/TODO b/TODO
index 5a0b8e0b..e308927b 100644
--- a/TODO
+++ b/TODO
@@ -34,6 +34,37 @@ Document-level work
--copy-attachments-from to preserve these. What will the strategy be
for deduplicating in the automatic case?
+Text Appearance Streams
+=======================
+
+This is a list of known issues with text appearance streams and things
+we might do about it.
+
+* For variable text, the spec says to pull any resources from /DR that
+ are referenced in /DA but if the resource dictionary already has
+ that resource, just use the one that's there. The current code looks
+ only for /Tf and adds it if needed. We might want to instead merge
+ /DR with resources and then remove anything that's unreferenced. We
+ have all the code required for that in ResourceFinder except
+ TfFinder also gets the font size, which ResourceFinder doesn't do.
+
+* There are things we are missing because we don't look at font
+ metrics. The code from TextBuilder (work) has almost everything in
+ it that is required. Once we have knowledge of character widths, we
+ can support quadding and multiline text fields (/Ff 4096), and we
+ can potentially squeeze text to fit into a field. For multiline,
+ first squeeze vertically down to the font height, then squeeze
+ horizontally with Tz. For single line, squeeze horizontally with Tz.
+ If we use Tz, issue a warning.
+
+* When mapping characters to widths, we will need to care about
+ character encoding. For built-in fonts, we can create a map from
+ Unicode code point to width and then go from the font's encoding to
+ unicode to the width. Get rid of "ugly switch statements" in
+ QUtil.cc and replace with static map initializers. See
+ misc/character-encoding/ (not on github) and font metric information
+ for the 14 standard fonts in my local pdf-spec directory.
+
Fuzz Errors
===========