LC server and fonts

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

LC server and fonts

Trevor DeVore via use-livecode
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


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
LC server generates html code to display text..... so you need to use
inline CSS, external CSS to generate the text you want using HTML

On Fri, Mar 2, 2018 at 5:14 AM, jbv via use-livecode <
[hidden email]> 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
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
Hello
Thanks for the reply, but that's not what I need.
For instance, here's what I want to do :
   create field
   put "my text" into fld 1
   set the textfont of fld 1 to "myfont.ttf'
   export snapshot from fld 1 to file "File1.png" as PNG
Therefore I need to "load" ttf fonts somehow.

Best
jbv

On Sat, March 3, 2018 4:10 pm, Tom Glod via use-livecode wrote:

> LC server generates html code to display text..... so you need to use
> inline CSS, external CSS to generate the text you want using HTML
>
> On Fri, Mar 2, 2018 at 5:14 AM, jbv via use-livecode <
> [hidden email]> 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
>>
>>
>> _______________________________________________
>> use-livecode mailing list [hidden email] Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
That would work perfectly in desktop....but on server...... its different
for some reason.

You are displaying field and exporting from a browser window correct?

On Sat, Mar 3, 2018 at 10:19 AM, jbv via use-livecode <
[hidden email]> wrote:

> Hello
> Thanks for the reply, but that's not what I need.
> For instance, here's what I want to do :
>    create field
>    put "my text" into fld 1
>    set the textfont of fld 1 to "myfont.ttf'
>    export snapshot from fld 1 to file "File1.png" as PNG
> Therefore I need to "load" ttf fonts somehow.
>
> Best
> jbv
>
> On Sat, March 3, 2018 4:10 pm, Tom Glod via use-livecode wrote:
> > LC server generates html code to display text..... so you need to use
> > inline CSS, external CSS to generate the text you want using HTML
> >
> > On Fri, Mar 2, 2018 at 5:14 AM, jbv via use-livecode <
> > [hidden email]> 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
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list [hidden email] Please visit
> this
> >> url to subscribe, unsubscribe and manage your subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list [hidden email] Please visit
> this
> > url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
so doesn't html output need font css to display correctly?

On Sat, Mar 3, 2018 at 11:29 AM, Tom Glod <[hidden email]> wrote:

> That would work perfectly in desktop....but on server...... its different
> for some reason.
>
> You are displaying field and exporting from a browser window correct?
>
> On Sat, Mar 3, 2018 at 10:19 AM, jbv via use-livecode <
> [hidden email]> wrote:
>
>> Hello
>> Thanks for the reply, but that's not what I need.
>> For instance, here's what I want to do :
>>    create field
>>    put "my text" into fld 1
>>    set the textfont of fld 1 to "myfont.ttf'
>>    export snapshot from fld 1 to file "File1.png" as PNG
>> Therefore I need to "load" ttf fonts somehow.
>>
>> Best
>> jbv
>>
>> On Sat, March 3, 2018 4:10 pm, Tom Glod via use-livecode wrote:
>> > LC server generates html code to display text..... so you need to use
>> > inline CSS, external CSS to generate the text you want using HTML
>> >
>> > On Fri, Mar 2, 2018 at 5:14 AM, jbv via use-livecode <
>> > [hidden email]> 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
>> >>
>> >>
>> >> _______________________________________________
>> >> use-livecode mailing list [hidden email] Please visit
>> this
>> >> url to subscribe, unsubscribe and manage your subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> >>
>> > _______________________________________________
>> > use-livecode mailing list [hidden email] Please visit
>> this
>> > url to subscribe, unsubscribe and manage your subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>> >
>> >
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
On Sat, March 3, 2018 5:29 pm, Tom Glod via use-livecode wrote:
> That would work perfectly in desktop....but on server...... its different
>  for some reason.
>
> You are displaying field and exporting from a browser window correct?
>
>

Actually no : I want to layout text, images, and graphics
server-side, in the same way as what can be done with php
librairies such as gd2 or image magik.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
ooohhhhhh....i see.  I'm not sure about the limitations of LC Server and
outputting to a 'visible stack'...but if its not possible with LC
Server...then you can run an LC Desktop Standalone to create the image you
need ...and then pass it on to the server,  Its likely to be fast enough
with very little overhead.

But if this needs to scale..then I'm not sure.

Anyone else?


On Sat, Mar 3, 2018 at 12:22 PM, jbv via use-livecode <
[hidden email]> wrote:

> On Sat, March 3, 2018 5:29 pm, Tom Glod via use-livecode wrote:
> > That would work perfectly in desktop....but on server...... its different
> >  for some reason.
> >
> > You are displaying field and exporting from a browser window correct?
> >
> >
>
> Actually no : I want to layout text, images, and graphics
> server-side, in the same way as what can be done with php
> librairies such as gd2 or image magik.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
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 <
[hidden email]> 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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
On 03/05/2018 08:59 AM, Mike Bonner via use-livecode wrote:
> 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 may need clarification. Getting the fontnames works always but the
list returned when doing it from a served page doesn't include the fonts
in ~/.fonts while running the same script from the command line using
ssh does show those fonts. I don't know why and didn't investigate any
further.

Warren

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
In reply to this post by Trevor DeVore via use-livecode
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 <
> [hidden email]> 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 [hidden email] Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
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 <
[hidden email]> 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 <
> > [hidden email]> 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 [hidden email] Please visit
> this
> >> url to subscribe, unsubscribe and manage your subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list [hidden email] Please visit
> this
> > url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
When using
  load font file "nameofyourfont.ttf"
the result contains
  Handler: can't find handler (file)

It looks like "load" is accepted only in the form "load URL"...

On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:

> 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 <
> [hidden email]> 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 <
>>> [hidden email]> 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 [hidden email] Please visit
>>>>
>> this
>>>> url to subscribe, unsubscribe and manage your subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> use-livecode mailing list [hidden email] Please visit
>> this
>>> url to subscribe, unsubscribe and manage your subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>
>>>
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list [hidden email] Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
My apologies.. Had a brain fritz, it should be "start using font file.."
load url would just load whatever url into cache and not font it up.

On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
[hidden email]> wrote:

> When using
>   load font file "nameofyourfont.ttf"
> the result contains
>   Handler: can't find handler (file)
>
> It looks like "load" is accepted only in the form "load URL"...
>
> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:
> > 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 <
> > [hidden email]> 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 <
> >>> [hidden email]> 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 [hidden email] Please visit
> >>>>
> >> this
> >>>> url to subscribe, unsubscribe and manage your subscription
> >>>> preferences:
> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>
> >>>>
> >>>>
> >>> _______________________________________________
> >>> use-livecode mailing list [hidden email] Please visit
> >> this
> >>> url to subscribe, unsubscribe and manage your subscription
> >>> preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list [hidden email] Please visit
> this
> >> url to subscribe, unsubscribe and manage your subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list [hidden email] Please visit
> this
> > url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
"start using font file.." is the first option that I tried, but
unfortunately it returns "can't load font file"...
The ttf file is on the server next to my script, and I have also
tried with the full absolute path for that ttf file.
Could you please make a test on your own on-rev account with any
ttf file (different from the default fonts in fontnames) and let us
know of it works ?

Thanks in advance.

On Tue, March 6, 2018 3:03 pm, Mike Bonner via use-livecode wrote:

> My apologies.. Had a brain fritz, it should be "start using font file.."
> load url would just load whatever url into cache and not font it up.
>
> On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
> [hidden email]> wrote:
>
>> When using
>> load font file "nameofyourfont.ttf" the result contains Handler: can't
>> find handler (file)
>>
>> It looks like "load" is accepted only in the form "load URL"...
>>
>>
>> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:
>>
>>> 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 <
>>> [hidden email]> 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 <
>>>>>  [hidden email]> 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 [hidden email] Please
>>>>>> visit
>>>>>>
>>>> this
>>>>>> url to subscribe, unsubscribe and manage your subscription
>>>>>> preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list [hidden email] Please
>>>>> visit
>>>> this
>>>>> url to subscribe, unsubscribe and manage your subscription
>>>>> preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list [hidden email] Please visit
>>>>
>> this
>>>> url to subscribe, unsubscribe and manage your subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> use-livecode mailing list [hidden email] Please visit
>> this
>>> url to subscribe, unsubscribe and manage your subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>
>>>
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list [hidden email] Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
Sure, i'll dig up a font file and try.

On Tue, Mar 6, 2018 at 7:37 AM, jbv via use-livecode <
[hidden email]> wrote:

> "start using font file.." is the first option that I tried, but
> unfortunately it returns "can't load font file"...
> The ttf file is on the server next to my script, and I have also
> tried with the full absolute path for that ttf file.
> Could you please make a test on your own on-rev account with any
> ttf file (different from the default fonts in fontnames) and let us
> know of it works ?
>
> Thanks in advance.
>
> On Tue, March 6, 2018 3:03 pm, Mike Bonner via use-livecode wrote:
> > My apologies.. Had a brain fritz, it should be "start using font file.."
> > load url would just load whatever url into cache and not font it up.
> >
> > On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
> > [hidden email]> wrote:
> >
> >> When using
> >> load font file "nameofyourfont.ttf" the result contains Handler: can't
> >> find handler (file)
> >>
> >> It looks like "load" is accepted only in the form "load URL"...
> >>
> >>
> >> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:
> >>
> >>> 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 <
> >>> [hidden email]> 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 <
> >>>>>  [hidden email]> 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 [hidden email] Please
> >>>>>> visit
> >>>>>>
> >>>> this
> >>>>>> url to subscribe, unsubscribe and manage your subscription
> >>>>>> preferences:
> >>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> _______________________________________________
> >>>>> use-livecode mailing list [hidden email] Please
> >>>>> visit
> >>>> this
> >>>>> url to subscribe, unsubscribe and manage your subscription
> >>>>> preferences:
> >>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> use-livecode mailing list [hidden email] Please visit
> >>>>
> >> this
> >>>> url to subscribe, unsubscribe and manage your subscription
> >>>> preferences:
> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>
> >>>>
> >>>>
> >>> _______________________________________________
> >>> use-livecode mailing list [hidden email] Please visit
> >> this
> >>> url to subscribe, unsubscribe and manage your subscription
> >>> preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list [hidden email] Please visit
> this
> >> url to subscribe, unsubscribe and manage your subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list [hidden email] Please visit
> this
> > url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
Well, it looks like fontconfig is installed in on-rev, but neither
/home/<you>/.fonts or /home/<you>/.local/share/fonts are being updated
automatically.  I tried to run fc-cache -f -v /home/<me>/.fonts and the
font is indeed found, but I don't think I have all the required support
directories, so there is no writable place to actually store the cache
data. The command fails because of this.  If it were me, I'd contact on-rev
and see if they could help set things up to actually look at a fonts
directory in your account and add any fonts there.  All the software seems
to be installed to do this, I just don't know enough about fontconfig to
force it from the user side. (It should be possible, but again I don't know
enough about fontconfig to know what to do yet)

As for start using font file.. Yep, it fails every time with an error
message that is just a bit lacking.  Getting on-rev/fontconfig set up to
handle this for you sounds like the way to go.

On Tue, Mar 6, 2018 at 7:41 AM, Mike Bonner <[hidden email]> wrote:

> Sure, i'll dig up a font file and try.
>
> On Tue, Mar 6, 2018 at 7:37 AM, jbv via use-livecode <
> [hidden email]> wrote:
>
>> "start using font file.." is the first option that I tried, but
>> unfortunately it returns "can't load font file"...
>> The ttf file is on the server next to my script, and I have also
>> tried with the full absolute path for that ttf file.
>> Could you please make a test on your own on-rev account with any
>> ttf file (different from the default fonts in fontnames) and let us
>> know of it works ?
>>
>> Thanks in advance.
>>
>> On Tue, March 6, 2018 3:03 pm, Mike Bonner via use-livecode wrote:
>> > My apologies.. Had a brain fritz, it should be "start using font file.."
>> > load url would just load whatever url into cache and not font it up.
>> >
>> > On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
>> > [hidden email]> wrote:
>> >
>> >> When using
>> >> load font file "nameofyourfont.ttf" the result contains Handler: can't
>> >> find handler (file)
>> >>
>> >> It looks like "load" is accepted only in the form "load URL"...
>> >>
>> >>
>> >> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:
>> >>
>> >>> 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 <
>> >>> [hidden email]> 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 <
>> >>>>>  [hidden email]> 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 [hidden email] Please
>> >>>>>> visit
>> >>>>>>
>> >>>> this
>> >>>>>> url to subscribe, unsubscribe and manage your subscription
>> >>>>>> preferences:
>> >>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>> _______________________________________________
>> >>>>> use-livecode mailing list [hidden email] Please
>> >>>>> visit
>> >>>> this
>> >>>>> url to subscribe, unsubscribe and manage your subscription
>> >>>>> preferences:
>> >>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> use-livecode mailing list [hidden email] Please visit
>> >>>>
>> >> this
>> >>>> url to subscribe, unsubscribe and manage your subscription
>> >>>> preferences:
>> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>>>
>> >>>>
>> >>>>
>> >>> _______________________________________________
>> >>> use-livecode mailing list [hidden email] Please visit
>> >> this
>> >>> url to subscribe, unsubscribe and manage your subscription
>> >>> preferences:
>> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> use-livecode mailing list [hidden email] Please visit
>> this
>> >> url to subscribe, unsubscribe and manage your subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> >>
>> > _______________________________________________
>> > use-livecode mailing list [hidden email] Please visit
>> this
>> > url to subscribe, unsubscribe and manage your subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>> >
>> >
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC server and fonts

Trevor DeVore via use-livecode
Mike,
Thanks for your help. Yes, I will contact on-rev support and I will
let you know how it goes.
Best.

On Tue, March 6, 2018 5:33 pm, Mike Bonner via use-livecode wrote:

> Well, it looks like fontconfig is installed in on-rev, but neither
> /home/<you>/.fonts or /home/<you>/.local/share/fonts are being updated
> automatically.  I tried to run fc-cache -f -v /home/<me>/.fonts and the
> font is indeed found, but I don't think I have all the required support
> directories, so there is no writable place to actually store the cache
> data. The command fails because of this.  If it were me, I'd contact
> on-rev and see if they could help set things up to actually look at a
> fonts directory in your account and add any fonts there.  All the software
> seems to be installed to do this, I just don't know enough about
> fontconfig to force it from the user side. (It should be possible, but
> again I don't know enough about fontconfig to know what to do yet)
>
> As for start using font file.. Yep, it fails every time with an error
> message that is just a bit lacking.  Getting on-rev/fontconfig set up to
> handle this for you sounds like the way to go.
>
> On Tue, Mar 6, 2018 at 7:41 AM, Mike Bonner <[hidden email]> wrote:
>
>
>> Sure, i'll dig up a font file and try.
>>
>>
>> On Tue, Mar 6, 2018 at 7:37 AM, jbv via use-livecode <
>> [hidden email]> wrote:
>>
>>> "start using font file.." is the first option that I tried, but
>>> unfortunately it returns "can't load font file"... The ttf file is on
>>> the server next to my script, and I have also tried with the full
>>> absolute path for that ttf file. Could you please make a test on your
>>> own on-rev account with any ttf file (different from the default fonts
>>> in fontnames) and let us know of it works ?
>>>
>>> Thanks in advance.
>>>
>>>
>>> On Tue, March 6, 2018 3:03 pm, Mike Bonner via use-livecode wrote:
>>>
>>>> My apologies.. Had a brain fritz, it should be "start using font
>>>> file.." load url would just load whatever url into cache and not
>>>> font it up.
>>>>
>>>> On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
>>>> [hidden email]> wrote:
>>>>
>>>>> When using
>>>>> load font file "nameofyourfont.ttf" the result contains Handler:
>>>>> can't find handler (file)
>>>>>
>>>>> It looks like "load" is accepted only in the form "load URL"...
>>>>>
>>>>>
>>>>>
>>>>> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode
>>>>> wrote:
>>>>>
>>>>>
>>>>>> 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 <
>>>>>> [hidden email]> 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 < [hidden email]> 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 [hidden email]
>>>>>>>>> Please
>>>>>>>>> visit
>>>>>>>>>
>>>>>>> this
>>>>>>>>> url to subscribe, unsubscribe and manage your
>>>>>>>>> subscription preferences:
>>>>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> use-livecode mailing list [hidden email]
>>>>>>>> Please
>>>>>>>> visit
>>>>>>> this
>>>>>>>> url to subscribe, unsubscribe and manage your subscription
>>>>>>>> preferences:
>>>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> use-livecode mailing list [hidden email] Please
>>>>>>> visit
>>>>>>>
>>>>> this
>>>>>>> url to subscribe, unsubscribe and manage your subscription
>>>>>>> preferences:
>>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> _______________________________________________
>>>>>> use-livecode mailing list [hidden email] Please
>>>>>> visit
>>>>> this
>>>>>> url to subscribe, unsubscribe and manage your subscription
>>>>>> preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list [hidden email] Please
>>>>> visit
>>> this
>>>>> url to subscribe, unsubscribe and manage your subscription
>>>>> preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list [hidden email] Please visit
>>>>
>>> this
>>>> url to subscribe, unsubscribe and manage your subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list [hidden email] Please visit
>>> this url to subscribe, unsubscribe and manage your subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>
>>
>>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode