I've merged the fix (allowing search paths for fonts to be specified in $OPENIMAGEIO_FONTS, so that there's no real need to put whole file paths into the font= modifier, just the font name) into both master and dev-2.3. The dev-2.3 branch will turn into the next tagged release on Oct 1).
If this turns out not to be enough in practice, let me know, and we'll figure out a better solution. > On Sep 16, 2021, at 2:08 PM, Steven Caron <car...@gmail.com> wrote: > > I am not sure, since I am not on 'master' I haven't tried out your PR but I > get the idea and I think it probably is a good enough fix. Also, since I am > using Python to call oiiotool I was able to use pathlib to turn my absolute > path into a relative path pretty easily and that worked around the parsing > options issue. Switching to using OPENIMAGEIO_FONTS env var would be easy > enough to do also. > > Regarding 'splitting of the options', maybe we can reuse your expression > evaluation and substitution syntax? Would that be overloading it too much and > maybe confusing? > > > > > > > On Thu, Sep 16, 2021 at 2:00 PM Larry Gritz <l...@larrygritz.com > <mailto:l...@larrygritz.com>> wrote: > Steven, do you think that the env variable and global attribute tricks I > propose in PR #3096 (allowing you to separately specify searchpaths for > fonts) will adequately solve the problem for you? > > I suppose I could also change the splitting of the options around ':' so that > it's aware of embedded quotes or something, but that seemed like a bigger > surgery to perform. > > -- lg > > >> On Sep 15, 2021, at 11:25 PM, Steven Caron <car...@gmail.com >> <mailto:car...@gmail.com>> wrote: >> >> Hi Jonathan, >> >> Your reply was marked as spam by Gmail so I didn't see it. You're right, >> Arial did work if I left off the full path. I wasn't actually wanting to use >> Arial but a font located somewhere else but needed a simple case that failed >> when making my post. >> >> Thanks! >> >> On Tue, Sep 14, 2021 at 10:02 AM Jonathan Tilden (2K) >> <jonathan.til...@2k.com <mailto:jonathan.til...@2k.com>> wrote: >> I haven’t used the OIIOTool flavor of adding text (usually its just done in >> python), but FWIW, I’ve found that if you just use ‘arial’ ImageBufAlgo >> will find the font and render it ok. >> >> >> >> From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org <>> On Behalf Of >> Larry Gritz >> Sent: Tuesday, September 14, 2021 10:00 AM >> To: OpenImageIO dev list <oiio-dev@lists.openimageio.org <>> >> Subject: Re: [Oiio-dev] oiiotool --text:font >> >> >> >> Oh boy, that's tricky. The ':' separates options, but in this case, it's >> part of the filename. >> >> >> >> By any chance, does this work? >> >> >> >> --text:font=/C/Windows/Fonts/Arial.tff >> >> >> >> ?? >> >> >> >> If not, I'll brew something up for you to fix. This is an unintended >> limitation. >> >> >> >> >> >> >> On Sep 14, 2021, at 8:57 AM, Steven Caron <car...@gmail.com <>> wrote: >> >> >> >> Hi Again! >> >> I can't seem to set the font option of the --text command. It doesn't seem >> to like my windows drive syntax with a colon. I think the parser is >> expecting another option/modifier. Example... >> >> oiiotool in.exr --text:font=C:/Windows/Fonts/Arial.ttf test -o out.exr >> oiiotool ERROR: text : Could not set font face to "C" >> >> I tried wrapping the path in quotes without luck. >> >> >> >> Thanks, >> Steven >> >> _______________________________________________ >> Oiio-dev mailing list >> Oiio-dev@lists.openimageio.org <> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org <> >> >> >> -- >> >> Larry Gritz >> >> l...@larrygritz.com <> >> >> >> >> >> >> >> >> >> _______________________________________________ >> Oiio-dev mailing list >> Oiio-dev@lists.openimageio.org <> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org <> >> _______________________________________________ >> Oiio-dev mailing list >> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > > -- > Larry Gritz > l...@larrygritz.com <mailto:l...@larrygritz.com> > > > > > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz l...@larrygritz.com
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org