LC server and fonts

Mike Bonner bonnmike at gmail.com
Mon Mar 5 21:28:22 CET 2018


Hmm. Not sure what to do about loading a fontfile then.  Out of curiosity,
what is the error?

On Mon, Mar 5, 2018 at 11:39 AM, jbv via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi Mike,
> Thanks for your reply.
>
> Yes, I managed to set the textfont of a btn or fld to one of the fonts
> available in the fontnames, but I still can't figure how to use any
> other ttf font...
> load font file "nameofyourfont.ttf" -> returns an error
> I tried load URL "nameofyourfont.ttf", it works, but then the textfont
> property isn't updated...
>
> On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode wrote:
> > With on-rev, I put up this script..
> >
> >
> > <?lc
> > create button "mybtn"
> >
> > repeat for each line tLIne in the fontnames -- will make 1 png per font
> >
> > set the label of btn "mybtn" to tLine set the textfont of button "mybtn"
> > to tLine set the width of button "mybtn" to the formattedwidth of button
> > "mybtn" + 5
> >
> >
> > export snapshot from button "mybtn" to file (tLine & ".png") as PNG
> >
> > put the textfont of button "mybtn" && "<img src=" & quote & tline &
> > ".png"
> > & quote & "><br>" & cr
> > end repeat ?>
> >
> >
> > And it works fine, with the exception of fonts with a - in the name.  All
> >  of them are Hershey fonts, so not sure if its the font family that is
> > broken, or the dashes causing the issue.
> >
> > If you have a ttf font file to use, you can probably put it on your
> > server next to your script and: load font file "nameofyourfont.ttf" and
> then
> > set the textfont to "nameofyourfont" and it will likely work.
> >
> > To see my script in action, check here:
> > http://guidezone.info/fonttest.lc
> >
> >
> > On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
> > use-livecode at lists.runrev.com> wrote:
> >
> >> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
> >>
> >>
> >>> Hello list
> >>> How can I load ttf font files with LC server, at least version 7.1
> >>> available on my on-rev account ? Neither "revFontLoad" nor "start using
> >>> font file" seem to work... And the list of available fonts returned by
> >>> "the fontNames" is quite
> >>> limited...
> >>>
> >>> Thanks in advance.
> >>> jbv
> >>>
> >>>
> >>>
> >> Does on-rev run on Linux? If you create a directory called '.fonts'
> >> under your user name and install the fonts you want to use in your
> >> images in that directory, LiveCode will find them.
> >>
> >> A quick test shows this to be true using LC Server 8.1.4, but you may
> >> have to do some experimenting to get them working in a script accessed
> >> through your web server. Executing a script to show the fontnames works
> >> from the command line but without having done any real investigating, I
> >> have to admit it's not working when accessed through my server. This
> >> isn't an on-rev nor an Apache server so ymmv. If you decide to go the
> >> standalone route, you should be able to install your fonts this way to
> >> use them in the standalone.
> >>
> >> Good luck!
> >>
> >>
> >> Warren
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list use-livecode at lists.runrev.com Please visit
> this
> >> url to subscribe, unsubscribe and manage your subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list use-livecode at lists.runrev.com Please visit
> this
> > url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list