Follow-up Comment #2, bug #68022 (group groff): At 2026-02-06T08:10:00-0500, Deri James wrote: >>> I would [...] like to see the meaning of bit 3 of `--opt` inverted. >>> >>> I'd like to see this done before 1.24.0 is out, to avoid the >>> necessity of changing the meaning of bit 3 of gropdf's `--opt` >>> [later, from that in a shipped release]. >>> >>> Unless of course you disagree with that proposal, in which case >>> further discussion is warranted. >>> >>> If you agree, I'm happy to help develop the change[]. >> >> Setting Item Group to "Feature change" because that seems most >> accurate, however this would not (of itself) require a "NEWS" entry, >> because it would be a change to a feature that hasn't yet shipped in >> a _groff_ release. >> >> Assigning to Deri for his feedback. > > I'm not to keen on this, although I may be persuaded. Let me explain > my logic:- > > Bits > ==== > > 1. = subset
I see Savannah "helpfully" rewrote your list enumerator here. :-|
Un-corrupting it:
> 0 = subset [embedded fonts]
> 1 = compact by using space glyph (if available)
> 2 = compress streams
> 3 = remove font data (may create non-standard pdf)
>
> Setting value to 1 = do it, to zero = don't do it.
>
> The first 3 are things which you definitely want to do, the last is
> definitely dodgy, so the default value is 7.
>
> Since bit 3 is "dangerous" I think it is "safer" to conciously add 8
> to the value to cause it to happen.
>
> Please explain your logic similarly.
Your presentation makes sense to me. I think of these as a set of
"optimizations" (maybe that's what you were going for with `--opt`,
rather than the "options" I inferred).
In fact, once I read your logic, I thought immediately of gzip
compression, where bigger numbers (generally) mean tighter "crunching".
Maybe you could ward off confusion among other readers by giving this
option a full-word long name _and_ a one-letter alias?
How about:
--optimizations=bit-mask
-O bit-mask
Specify output optimization features that generally reduce
the size of the generated PDF. bit-mask is a vector of
bits, each selecting an operation. Sum the following
values as desired.
Value Meaning
-----------------------------------------------------
1 Subset embedded fonts, retaining only glyphs
used in the document.
2 Make text more compact by using space glyphs
instead of motions. Fonts that do not
include a space glyph may conflict with this
feature.
[GBR: how? Will there be an error message?]
4 Compress all streams.
[GBR: "Streams" is undefined in this man
page. I suppose this is some kind of
embedded PDF data structure. Can you offer
one or two words more? What does ISO 32000
call them?]
8 Don't embed font files required by the
document. A document employing any font
other than the base 14 of the PDF standard is
unlikely to render satisfactorily.
The default bit-mask is 7. To mimic what gropdf from groff
1.23 and earlier produced, specify "6", turning off
subsetting.
Again, I'm happy to contribute code changes, and if you like my recast
partial man page, that work's almost already done.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68022>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
