yes.
but as I wrote in the OP, it's not completely satisfying.
one needs to keep track of the association font.Face/[]byte.
so that's either double the memory (give or take), or a filename/io.Reader 
handle to keep around.

-s

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, February 4th, 2021 at 8:28 PM, Robert Engels 
<reng...@ix.netcom.com> wrote:

> If you have the data to pass to Parse then you have the data to embed the 
> font in the pdf.
>
> > On Feb 4, 2021, at 12:02 PM, Sebastien Binet s...@sbinet.org wrote:
> >
> > hi there,
> >
> > Right now, I am pretty happy with the state of the
> >
> > x/image/font{,/sfnt,/opentype}} packages. I can load TTF/OTF files, draw
> >
> > some glyphs in a way that (almost) resembles LaTeX1.
> >
> > Great. (and many thanks, by the way.)
> >
> > We migrated gonum/plot2 from freetype to x/image/font recently and all
> >
> > our use cases worked well (as far as I know.)
> >
> > Well, all, save for one: being able to embed fonts into PDFs.
> >
> > To some extent, embedding fonts into PDF files needs to re-serialize
> >
> > sfnt.Font back into a []byte following the OTF format.
> >
> > Unless I am mistaken, x/image/font doesn't seem to provide the reverse
> >
> > function of sfnt.Parse.
> >
> > (This is a bit annoying because one needs to provide a way to associate
> >
> > a given font.Face or sfnt.Font with its original []byte raw data.)
> >
> > Is it something that x/image/font should or would provide?
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups 
> > "golang-nuts" group.
> >
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to golang-nuts+unsubscr...@googlegroups.com.
> >
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/golang-nuts/mDlexRfwWwESA2w9pIRqq4SD72RMobdQ109RV5g0uQ%40cp3-web-020.plabs.ch.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/xcAPqVWxSEJDj-AntqiUaRWeD7V6bLBZhAJlPIsIfkP3sWpC1c1fnTfmkZ4Hj60-ScCSALVNQr6H_qTvhnHPY2QtqckV6CnD_gTfOl1Yf4Y%3D%40sbinet.org.

Reply via email to