Closed rgreinho closed 8 months ago
Looks good to me! I'm sure it will be reviewed soon, it's just that the owners of this crate are pretty busy at the moment, so don't be surprised if it takes a while until they manage to review it. But they will review it eventually. 😄
Needs rebase/merge because of new crate structure. That aside, I'm not sure whether the PostScript name is the most user-friendly thing to print. We could also group by typographic family and print the available variants like typst
does. But maybe it's overkill here.
Rebased 👌
I can change the output no problem. However I am not sure what is the best overall, I just implemented what helped me with my use case.
Hey!
I think that stuff that does not change the behavior of the CLI but does something different altogether should be a subcommand, not a flag. I agree with @laurmaedje that the font families should be sorted by and displayed with their typographical families. I also get that showing PostScript names is useful, especially since the library is subject to two separate font resolution algorithms (CSS standalone and Typst/consumer). How about an output like this?
Helvetica
├ Helvetica
├ Helvetica-Bold
├ Helvetica-BoldOblique
├ Helvetica-Light
├ Helvetica-LightOblique
└ Helvetica-Oblique
svg2pdf fonts
could have the same output as typst fonts
and an --all
option would switch to this view.
Yep, that sounds good! I can have a look at typst fonts
, add the command, and implement the output you showed! 👍
(Also, just keeping in mind that we're doing all of this to try to solve https://github.com/typst/svg2pdf/issues/44 🙃).
Alright! I looked at typst
and reorganized the code in a similar way.
There are now 2 commands, convert
which converts an SVG file into a PDF file, and fonts
which lists the fonts detected on the system.
Here is the output of the fonts
command:
And here the output of the fonts --all
command:
Let me know what you think, and if this iteration matches what you had in mind. If for any reason that is not the case, just provide some pointers and I'll make the necessary adjustments. :)
I would, if possible, prefer if svg2pdf file.svg
would remain the main convert command and only fonts
needs a subcommand. If that's not possible, this LGTM.
No problem! I'll give it a shot :)
Ok, so I rearranged it like that:
Let me know what you think, and if you like it, I'll start working on rebasing this branch onto master 🙃
Looks good!
@laurmaedje @reknih rebase complete ✅
Thank you for your work and patience!
Adds a new CLI flag allowing the user to just list the fonts which are detected on the system.
Signed-off-by: Rémy Greinhofer remy.greinhofer@gmail.com