Click here to Skip to main content
15,899,124 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Laying out text is *really* difficult Pin
Jörgen Andersson13-Jul-21 1:40
professionalJörgen Andersson13-Jul-21 1:40 
GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch13-Jul-21 1:40
mvahoney the codewitch13-Jul-21 1:40 
GeneralRe: Laying out text is *really* difficult Pin
Jörgen Andersson13-Jul-21 1:44
professionalJörgen Andersson13-Jul-21 1:44 
GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch13-Jul-21 1:45
mvahoney the codewitch13-Jul-21 1:45 
GeneralRe: Laying out text is *really* difficult Pin
Jörgen Andersson13-Jul-21 2:22
professionalJörgen Andersson13-Jul-21 2:22 
AnswerRe: Laying out text is *really* difficult Pin
Maximilien12-Jul-21 23:29
Maximilien12-Jul-21 23:29 
GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch12-Jul-21 23:47
mvahoney the codewitch12-Jul-21 23:47 
AnswerRe: Laying out text is *really* difficult Pin
Gary R. Wheeler13-Jul-21 7:09
Gary R. Wheeler13-Jul-21 7:09 
Text layout, especially when rendering a font technology like TrueType, can be as complicated as you like. As you've discovered, you can have overhangs and underhangs in all four cardinal directions. Kerning (character spacing) can range from a single constant value to a function of the identity of the two characters and the font size. Some of the font technologies even include pre-rendered bitmaps for small sizes that have a better appearance than rendering the outline.

Since you are rendering text on small displays, a simple model to start would be best. You can then smarten it up as needed. From experience, I can tell you that typographical correctness doesn't work well with displays unless they are fairly large and high resolution. Lower resolution, smaller displays look nicer with simpler constant spacing, as the calculation rounding isn't nearly as apparent.
Software Zen: delete this;

GeneralWorld's deepest pool with underwater exploration. Pin
Slacker00712-Jul-21 9:04
professionalSlacker00712-Jul-21 9:04 
GeneralRe: World's deepest pool with underwater exploration. Pin
RickZeeland12-Jul-21 9:49
mveRickZeeland12-Jul-21 9:49 
GeneralCan you solve this? Pin
Jörgen Andersson12-Jul-21 8:30
professionalJörgen Andersson12-Jul-21 8:30 
GeneralRe: Can you solve this? Pin
Matthew Dennis12-Jul-21 8:36
sysadminMatthew Dennis12-Jul-21 8:36 
GeneralRe: Can you solve this? Pin
Jon McKee12-Jul-21 9:06
professionalJon McKee12-Jul-21 9:06 
GeneralRe: Can you solve this? Pin
PIEBALDconsult12-Jul-21 9:17
mvePIEBALDconsult12-Jul-21 9:17 
GeneralRe: Can you solve this? Pin
OriginalGriff12-Jul-21 9:21
mveOriginalGriff12-Jul-21 9:21 
GeneralRe: Can you solve this? Pin
Slacker00712-Jul-21 9:32
professionalSlacker00712-Jul-21 9:32 
GeneralRe: Can you solve this? Pin
OriginalGriff12-Jul-21 9:36
mveOriginalGriff12-Jul-21 9:36 
GeneralRe: Can you solve this? Pin
Member 1488449213-Jul-21 11:34
Member 1488449213-Jul-21 11:34 
GeneralRe: Can you solve this? Pin
Kenneth Haugland12-Jul-21 9:27
mvaKenneth Haugland12-Jul-21 9:27 
GeneralRe: Can you solve this? Pin
snorkie13-Jul-21 2:33
professionalsnorkie13-Jul-21 2:33 
GeneralRe: Can you solve this? Pin
Jörgen Andersson13-Jul-21 2:41
professionalJörgen Andersson13-Jul-21 2:41 
GeneralRe: Can you solve this? Pin
John Stewien13-Jul-21 2:47
John Stewien13-Jul-21 2:47 
GeneralRe: Can you solve this? Pin
KateAshman13-Jul-21 3:02
KateAshman13-Jul-21 3:02 
GeneralRe: Can you solve this? Pin
#realJSOP13-Jul-21 5:37
professional#realJSOP13-Jul-21 5:37 
GeneralRe: Can you solve this? Pin
Member 1409260513-Jul-21 22:43
Member 1409260513-Jul-21 22:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   449 votes