Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (790)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (864)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  pixels and fonts, Windows & Mac OS the same?  (Read 576 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2019-02-08 02:49:37 »

When I take GUI code developed on my Windows system and run it on a Mac, the spacing of the text in the GUI controls gets off, usually appearing to be too large for the space provided.

It seems to me (on casual experiments) that if I lower the font size by 1 (e.g., from 12 to 11), then the text will fit inside controls rendered on the Mac. Are there different ratios between the number of pixels for font sizes on Mac vs Windows?

music and music apps: http://adonax.com
Offline FabulousFellini
« Reply #1 - Posted 2019-02-08 03:25:36 »

I'm not sure about pixel sizes, but that was a big pain while developing Dodger Dog.  Windows, Mac, and Linux all seem to be different.  I'm going to make pings for my new game for text to combat that situation.

-FabulousFellini
www.fabulousfellini.com
Offline princec

« JGO Spiffy Duke »


Medals: 1085
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2019-02-08 09:21:51 »

It seems to me (on casual experiments) that if I lower the font size by 1 (e.g., from 12 to 11), then the text will fit inside controls rendered on the Mac. Are there different ratios between the number of pixels for font sizes on Mac vs Windows?
Yes. Mac used historically a different DPI for font size -> pixel mapping. Not sure what the situation is with 4K these days but I imagine it's stayed the same, just doubled on both platforms.

Cas Smiley

Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (2843 views)
2018-11-16 13:46:03

hadezbladez (1026 views)
2018-11-16 13:41:33

hadezbladez (2810 views)
2018-11-16 13:35:35

hadezbladez (551 views)
2018-11-16 13:32:03

EgonOlsen (3822 views)
2018-06-10 19:43:48

EgonOlsen (4235 views)
2018-06-10 19:43:44

EgonOlsen (2543 views)
2018-06-10 19:43:20

DesertCoockie (3355 views)
2018-05-13 18:23:11

nelsongames (3469 views)
2018-04-24 18:15:36

nelsongames (4467 views)
2018-04-24 18:14:32
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!