Re: Stylesheets and object resizing issues Mac/Win

2020-03-13 Thread Keisuke Miyako via 4D_Tech
I guess the right thing to do is to leave some room for the print maker,
forms should not be designed so precisely if there are meant to be 
cross-platform.

what I can say ("been there, done that") is that you should probably not fight 
against the feature,
for example, by adding extra points to the font size for one platform
in the hopes that it will somehow offset the balance.
it won't.

On Mar 12, 2020, at 11:25, Greg Loya via 4D_Tech 
<4d_tech@lists.4d.com> wrote:

A form used by Print Form has a print marker area of 11 pixels.  Within this 
area is a variable with height 11 pixels (on the Mac) and a stylesheet using 
Times New Roman 9 for both Mac and PC.

Opening the same structure on PC, the variable now has a height of 13 with 2 
pixels below the marker line, causing the bottom of the text to be cutoff.  
(The inverse happens as well - sizing a variable to 11 on a PC and opening on a 
Mac automatically causes it to shrink to 8 pixels)

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Stylesheets and object resizing issues Mac/Win

2020-03-13 Thread Keisuke Miyako via 4D_Tech
what you describe is a historic (and imperfect) behaviour of the stylesheets 
feature.

there is no workaround, and you should not expect any fixes ever,
because undoing will screw up every form created in the last 15 years.
(it started with v2004.2 or thereabouts)

basically, what happens is that a 133% or 75% scaling is applied to the object 
height,
to account for the DPI difference (96 for Windows and 72 for Mac).

but font size in 4D is an integer so there will be some rounding.
worse, if you move a form from Mac to Windows, then Windows back to Mac,
the heights will change permanently because of rounding twice.

it is unfortunate, but to answer your question,

- use automatic stylesheets for the UI don't use anything else, ever
- for printing, where fonts are important, create 1 form per platform

about removing stylesheets and setting the font by code,
it kind of works, it could be a solution.
but you need to think about code maintenance.

4D values compatibility, bad features die hard.
that said, stylesheets are replaced by CSS in project mode,
which suggests that it is know to have more flaws than merits.

On Mar 12, 2020, at 11:25, Greg Loya via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
I'm not sure why having a stylesheet changes the behavior for automatic 
resizing.  How are people dealing with this?

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Stylesheets and object resizing issues Mac/Win

2020-03-12 Thread Greg Loya via 4D_Tech
I am hoping someone has a solution to the following issue we are seeing: 

A form used by Print Form has a print marker area of 11 pixels.  Within this 
area is a variable with height 11 pixels (on the Mac) and a stylesheet using 
Times New Roman 9 for both Mac and PC. 

Opening the same structure on PC, the variable now has a height of 13 with 2 
pixels below the marker line, causing the bottom of the text to be cutoff.  
(The inverse happens as well - sizing a variable to 11 on a PC and opening on a 
Mac automatically causes it to shrink to 8 pixels)

If the same variable has no stylesheet but same font Times New Roman 9 
assigned, then the variable is not resized when opened on a PC and is not 
cutoff when printed.
 
An interesting thing to note is that even if the variable itself is too short 
to accommodate the font (say it is on the form at 6 pixels), it will PRINT the 
text in its entirety with no cutoff as long as the variable is entirely above 
the print marker.  But as soon as any part of the same variable with the same 
font extends below the marker, it starts printing cut off. 

I'm not sure why having a stylesheet changes the behavior for automatic 
resizing.  How are people dealing with this?

__
Greg Loya
Senior Software Engineer
CyberWolf Inc.
gl...@cyberwolf.com 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**