Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread Fonts
Fri, Aug 2 2013 11:53 AMPermanent Link

Matthew Jones

The default font for controls seems to be either Arial or Segoe UI on my forms.
However, some of these aren't going to cross-platform. The normal thing to do is to
specify a list of fonts, and then family, to set this sort of thing. How is all
this handled in WebBuilder?

/Matthew Jones/
Mon, Aug 5 2013 9:58 AMPermanent Link

Dan

Fiscalsoft

On 8/2/2013 11:53 AM, (Matthew Jones) wrote:
> The default font for controls seems to be either Arial or Segoe UI on my forms.
> However, some of these aren't going to cross-platform. The normal thing to do is to
> specify a list of fonts, and then family, to set this sort of thing. How is all
> this handled in WebBuilder?
>
> /Matthew Jones/
>

Hi Matthew,
By cross-platform I assume you mean that some browsers don't properly
display your text?  This is because different browsers and computers
handle fonts differently.  Using standard fonts (as you are doing)
should mitigate this, but won't always prevent your fonts from changing.

I do think there are things you can do to fix this however.  You can
check the fonts for your controls in the JS file.  For example:

$t.tofficialsform_offlabel2.tcontrol_ffont.tfont_setname("Arial,
sans-serif");

Fonts for specific controls are in the JS file.  I'm not sure if the JS
file supports the same fallback that CSS does in the sense that you
could add multiple fonts to a section like secondary and tertiary
choices for your display, but I'd think the functions in the JS file
that make these assignments could be altered for fallback font options.

Hope this helps.

-Dan

Mon, Aug 5 2013 11:41 AMPermanent Link

Matthew Jones

> You can
> check the fonts for your controls in the JS file.  For example:
>
> $t.tofficialsform_offlabel2.tcontrol_ffont.tfont_setname("Arial,
> sans-serif");

How does this come about? Looks like the output of the javascript? Hmm, looking at
the output, it seems that the EWB code is outputting that ", sans-serif" to the
font name, so that sort of answers my question. I would though like to be able to
specify a PC and Mac specific font, and then the generic.

/Matthew Jones/
Tue, Aug 6 2013 9:31 AMPermanent Link

Dan

Fiscalsoft

On 8/5/2013 11:41 AM, (Matthew Jones) wrote:
>> You can
>> check the fonts for your controls in the JS file.  For example:
>>
>> $t.tofficialsform_offlabel2.tcontrol_ffont.tfont_setname("Arial,
>> sans-serif");
>
> How does this come about? Looks like the output of the javascript? Hmm, looking at
> the output, it seems that the EWB code is outputting that ", sans-serif" to the
> font name, so that sort of answers my question. I would though like to be able to
> specify a PC and Mac specific font, and then the generic.
>
> /Matthew Jones/
>

Matthew,

>I would though like to be able to
> specify a PC and Mac specific font, and then the generic.

I'd start with the tfont_setname function and work your from there to
the solution.  Arial ships with PCs and Macs but there is also the
possibility that a browser may display that differently as well.  If
you're able to find a solution please let me know.  Thanks

-Dan
Tue, Aug 6 2013 12:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

< The default font for controls seems to be either Arial or Segoe UI on my
forms. However, some of these aren't going to cross-platform. The normal
thing to do is to specify a list of fonts, and then family, to set this sort
of thing. How is all this handled in WebBuilder? >>

EWB automatically handles this for design-time assignments (this was added
recently and is in the release notes).  For run-time assignments, just
specify the font like you would in CSS:

Specific Font Name, Generic Font Family, etc.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Aug 7 2013 4:34 AMPermanent Link

Matthew Jones

Okay, but it would be nice, sometime, to be able to specify multiple fonts (not
just font and family). Then I can do cross-platform more easily.

/Matthew Jones/
Wed, Aug 7 2013 1:24 PMPermanent Link

Dan

Fiscalsoft

On 8/6/2013 12:06 PM, Tim Young [Elevate Software] wrote:
> Matthew,
>
> < The default font for controls seems to be either Arial or Segoe UI on
> my forms. However, some of these aren't going to cross-platform. The
> normal thing to do is to specify a list of fonts, and then family, to
> set this sort of thing. How is all this handled in WebBuilder? >>
>
> EWB automatically handles this for design-time assignments (this was
> added recently and is in the release notes).  For run-time assignments,
> just specify the font like you would in CSS:
>
> Specific Font Name, Generic Font Family, etc.
>
> Tim Young
> Elevate Software
> www.elevatesoft.com

I skimmed through the css file when I was initially researching this
post and (mistakenly I suppose now) gathered that the css file only
affected fonts associated with the theme.  If css modifications are all
that is necessary than this is something that would be much easier to
handle.  Thanks for the comments Tim, very nice to know.

Dan
Wed, Aug 14 2013 1:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Okay, but it would be nice, sometime, to be able to specify multiple
fonts (not just font and family). Then I can do cross-platform more easily.
>>

Are you talking about at design-time ?  The problem with design-time is that
EWB is having to reconcile the VCL-ness of the design-time environment with
the run-time environment, and as of now, that means using TFont and being
restricted to one font.  This will be changeable once EWB 2 is done and I've
re-done the design-time environment to be less VCL-like.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 15 2013 5:37 AMPermanent Link

Matthew Jones

> Are you talking about at design-time ?

Yes. I appreciate it isn't easy, but it sounds like you are aware of it. Having
worked with Windows fonts, and TFont, and all its lovely charms, I know it can get
to be a mess, but matching the browser more closely is the goal. Something like a
font set, perhaps in the styling, and then select the font set for a particular
TFont might work. Thus the TFont that actually shows it knows the primary font to
use, but the CSS can output the list of fonts and the more generic face.

/Matthew Jones/
Image