Click here to Skip to main content
15,912,507 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: WSO CCC OTD 2021-07-13 We have a winner! Pin
DerekT-P12-Jul-21 23:18
professionalDerekT-P12-Jul-21 23:18 
GeneralRe: WSO CCC OTD 2021-07-13 We have a winner! Pin
OriginalGriff12-Jul-21 23:23
mveOriginalGriff12-Jul-21 23:23 
QuestionLaying out text is *really* difficult Pin
honey the codewitch12-Jul-21 15:06
mvahoney the codewitch12-Jul-21 15:06 
AnswerRe: Laying out text is *really* difficult Pin
Peter_in_278012-Jul-21 16:14
professionalPeter_in_278012-Jul-21 16:14 
GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch12-Jul-21 17:45
mvahoney the codewitch12-Jul-21 17:45 
AnswerRe: Laying out text is *really* difficult Pin
David O'Neil12-Jul-21 16:15
professionalDavid O'Neil12-Jul-21 16:15 
GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch12-Jul-21 17:47
mvahoney the codewitch12-Jul-21 17:47 
AnswerRe: Laying out text is *really* difficult Pin
Jörgen Andersson12-Jul-21 22:04
professionalJörgen Andersson12-Jul-21 22:04 
Memories of type setting. you make me feel seriously old here. Laugh | :laugh:

The first problem is that there really is no bounding rectangle in old fashioned type setting. Well there is of sorts, but I don't know anything about True Type so you need to fill in the gaps for me.
Anyway, there are plenty of lines.
First you have the base line which is what it sounds like, all letters without descenders stand on the baseline.
Above that you have the mean line. A small 'x' with serifs stand between the baseline and the mean line and the distance between them is the x-height.
Above the mean line is the cap line. A capital 'X' with serifs stand between the baseline and the cap line and the distance between those is the cap-height.
The problem here is that not all letters end with serifs at the top, many letters are pointy and ends in an 'Apex' instead, which is slightly above the cap line. This is called the ascender line.
Ascender is the name for that bar that's pointing upwards from letters like 'b' and 'd' for example
But this isn't all of course, capital letters with diacritics such as 'É' reaches the Ascent line. This is probably the top of the "box".
Below the base line you have the descender line and the descent line following the same principles as cap and ascender lines (there are no diacritics below the letters that I'm aware of). The descent line should be the bottom of the "box".

Ok, enough of boring technicalities. Now comes speculation.
If I were to design a "true type" printing system I would put the Y=0 at the base line, since it makes most sense from a typographical point.
But computers didn't start with true type fonts, they started out with monospaced fixed fonts that didn't scale, built from a box with 8*12 pixels. With the coordinates starting at the lower left corner of that box.
Fixed fonts don't fiddle around with as many lines. There are the base, mean, and cap lines and a descender line at the bottom at most.
I suppose that when they created the true type fonts they had to keep Y=0 at roughly the same place as on fixed fonts for backwards compatibility reasons. Which would be the descender line, so when they added the descent line to the system it had to get negative coordinates to make sense.
Wrong is evil and must be defeated. - Jeff Ello

GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch12-Jul-21 23:30
mvahoney the codewitch12-Jul-21 23:30 
GeneralRe: Laying out text is *really* difficult Pin
Jörgen Andersson12-Jul-21 23:52
professionalJörgen Andersson12-Jul-21 23:52 
GeneralRe: Laying out text is *really* difficult Pin
honey the codewitch13-Jul-21 0:24
mvahoney the codewitch13-Jul-21 0:24 
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 
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 

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.