button width on different platforms

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

button width on different platforms

Matt Maier
I've got some buttons with text in them. On Windows (where I develop) they
look fine. On Linux the buttons are a little bit narrower so the text is
cut off.

Anyone handled a similar problem?
_______________________________________________
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: button width on different platforms

Richmond Mathewson-2
Yes; many, many times: this is even, potentially a problem on a single
platform as you have no idea as to
what fonts someone has installed in their system.

I gave up using real buttons about 12 years ago just because I was
deploying stuff across
Windows, Macintosh and Linux.

What I do, instead, is make a button up to look the way I want it
(normally on Macintosh with the Charcoal
  font, or on Xubuntu with the Ubuntu font) and then import a snapshot
of the button so I end up with an image
that will look the same regardless of which platform it is seen on.

Obviously this involves a little extra time, but in terms of aesthetics
it wins hands down as you know
that no-one is going to open up your standalone and be faced with a
"tar" or a "o nex" button.

Richmond.


On 1/4/17 9:05 pm, Matt Maier wrote:

> I've got some buttons with text in them. On Windows (where I develop) they
> look fine. On Linux the buttons are a little bit narrower so the text is
> cut off.
>
> Anyone handled a similar problem?
> _______________________________________________
> 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: button width on different platforms

Bob Sneidar-2
I was under a vague impression that you could bundle font files with the app (of course there may be licensing issues etc so this may not be viable in every case). The trick at that point would be installing the fonts. On linux and mac, I think this can be done via command line. Not sure about Windows. I will bet installer makers can do  this automagically.

Bob S


On Jan 4, 2017, at 11:11 , Richmond Mathewson <[hidden email]<mailto:[hidden email]>> wrote:

Yes; many, many times: this is even, potentially a problem on a single platform as you have no idea as to
what fonts someone has installed in their system.

_______________________________________________
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: button width on different platforms

Richard Gaskin
In reply to this post by Matt Maier
Matt Maier wrote:

 > I've got some buttons with text in them. On Windows (where I develop)
 > they look fine. On Linux the buttons are a little bit narrower so the
 > text is cut off.

Are the buttons narrower or is the font larger?

If the latter, try setting the font size of the stack.

By default LC will use the OS default font and size, which is smaller on
Windows than on most Linux distros.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
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: button width on different platforms

Warren Samples
In reply to this post by Matt Maier
On 01/04/2017 01:05 PM, Matt Maier wrote:
> I've got some buttons with text in them. On Windows (where I develop) they
> look fine. On Linux the buttons are a little bit narrower so the text is
> cut off.
>
> Anyone handled a similar problem?


Matt,

I would suggest dynamically  setting the width of the buttons to the
formattedWidth of the buttons is the most correct thing to do. You may
also set the height of the buttons the same way. You will find the
actual space needed changes with font selection.

I have suggested always setting the height of text fields the same way
but for some reason that doesn't seem to go over very well. Personally
I'm not a big fan of fixed height text fields which cut off the
contained text. This is very common to see in Linux with LiveCode things
developed on other platforms, including the IDE.

In any event, maybe the worst approach, and also the most common, is to
start dictating the font selection and size. You can never know what
reasons the user may have for using a particular font or size.

Dynamic layout is really the best way to go whenever possible. Ask a web
developer.


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: button width on different platforms

J. Landman Gay
In reply to this post by Bob Sneidar-2
On 1/4/17 1:41 PM, Bob Sneidar wrote:
> I was under a vague impression that you could bundle font files with
> the app (of course there may be licensing issues etc so this may not
> be viable in every case). The trick at that point would be installing
> the fonts.

You can ship the app with a font included, and it isn't necessary to
install it. LC allows "start using font file <font.ttf>" and it just works.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
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: button width on different platforms

Bob Sneidar-2
I did not know that! Very cool.

Bob S


> On Jan 4, 2017, at 13:28 , J. Landman Gay <[hidden email]> wrote:
>
> On 1/4/17 1:41 PM, Bob Sneidar wrote:
>> I was under a vague impression that you could bundle font files with
>> the app (of course there may be licensing issues etc so this may not
>> be viable in every case). The trick at that point would be installing
>> the fonts.
>
> You can ship the app with a font included, and it isn't necessary to install it. LC allows "start using font file <font.ttf>" and it just works.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> 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: button width on different platforms

Bob Sneidar-2
In reply to this post by Richard Gaskin
Actually I had to do that myself because the font size in a standalone was different than the font size in the IDE.

Bob S


On Jan 4, 2017, at 12:39 , Richard Gaskin <[hidden email]<mailto:[hidden email]>> wrote:

Matt Maier wrote:

> I've got some buttons with text in them. On Windows (where I develop)
> they look fine. On Linux the buttons are a little bit narrower so the
> text is cut off.

Are the buttons narrower or is the font larger?

If the latter, try setting the font size of the stack.

By default LC will use the OS default font and size, which is smaller on Windows than on most Linux distros.

--
Richard Gaskin

_______________________________________________
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: button width on different platforms

Richmond Mathewson-2
In reply to this post by J. Landman Gay
Um, well, yes: but whether the operating system that your end-user is
going to play with your font
the same way as your operating system plays with it is another potential
pitfall.

Certainly I am wondering what Windows 10 is going to do with the latest
version of my Devawriter
when I hive off a Windows standalone from LC 8.1.2:

with LC 4.5 Windows 8 really behaved extremely badly with my Devawriter
font
(which behaved "as it should" on Macintosh, Linux and Windows XP, Vista
and "7").

This was not because Devawriter went "shopping" for some font it could
find on the end-user's system,
and, as far as I can tell it had little or nothing to do with LiveCode:
but just that Windows 8 seemed to
screw up with non-standard Unicode fonts.

Richmond.

On 1/4/17 11:28 pm, J. Landman Gay wrote:

> On 1/4/17 1:41 PM, Bob Sneidar wrote:
>> I was under a vague impression that you could bundle font files with
>> the app (of course there may be licensing issues etc so this may not
>> be viable in every case). The trick at that point would be installing
>> the fonts.
>
> You can ship the app with a font included, and it isn't necessary to
> install it. LC allows "start using font file <font.ttf>" and it just
> works.
>

_______________________________________________
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: button width on different platforms

Richard Gaskin
In reply to this post by Bob Sneidar-2
Bob Sneidar wrote:

 > On Jan 4, 2017, at 12:39 , Richard Gaskin wrote:
 >
 >> Are the buttons narrower or is the font larger?
 >>
 >> If the latter, try setting the font size of the stack.
 >>
 >> By default LC will use the OS default font and size, which is
 >> smaller on Windows than on most Linux distros.
 >
 >
 > Actually I had to do that myself because the font size in a
 > standalone was different than the font size in the IDE.

If that's in v9.x please file a bug report.  The IDE should not be
imposing an unusual font size.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
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