trevorld / r-xmpdf

Edit XMP metadata and PDF bookmarks/documentation info
https://trevorldavis.com/R/xmpdf/dev/index.html
Other
4 stars 0 forks source link

Update bookmarks style to match R graphics standard #28

Closed trevorld closed 1 year ago

trevorld commented 1 year ago

Instead of using the pdfmark 0, 1, 2, 3 for bookmarks "style" we could instead use the R base graphics standard throwing an error for unsupported "oblique" and HersheySerif values. According to ?grid::gpar() description of fontface:

The specification of ‘fontface’ can be an integer or a string. If an integer, then it follows the R base graphics standard: 1 = plain, 2 = bold, 3 = italic, 4 = bold italic. If a string, then valid values are: ‘"plain"’, ‘"bold"’, ‘"italic"’, ‘"oblique"’, and ‘"bold.italic"’. For the special case of the HersheySerif font family, ‘"cyrillic"’, ‘"cyrillic.oblique"’, and ‘"EUC"’ are also available.