|
Three Dog Night's Joy to the World is my goto ear worm.
|
|
|
|
|
Talk like an egyption
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
AndyChisholm wrote: What music do you get stuck in your head from time to time? Whatever was playing last in my car. I take an anti-depressant as a migraine prevention measure. One of the common side effects of SSRI's (selective serotonin re-uptake inhibitors) are changes in short-term memory. Today it's been parts of tracks from a jazz duo named the Braxton Brothers' latest album.
Software Zen: delete this;
|
|
|
|
|
Foreign consulate without third Kiss? (8)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Well, it's the right number of letters ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OSCULATE
Foreign - anagram indicator
Consulate without third = consulate
anagram of OSCULATE = kiss
|
|
|
|
|
Absolutely correct, you are up tomorrow!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hadn't come across "foreign" as an anagram indicator before...
|
|
|
|
|
There are a heck of a lot: 1001 Anagram indicators[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I guess I'll never look down on typesetting as a profession. There's way more to it than I ever expected going into this.
I've laid out code to print "Hello World!" using a truetype font and all is well and good except that the letters can extend outside of their bounding positions. This means a font's glyph, when drawn starting at point (0,0) may extend to (-4,-3) for example. This makes positioning text kind of ... not so straightforward.
What I do with the overhang? Do I allow you to draw outside the destination rectangle? That creates a number of issues. I think I need margins. I hate that I need margins, but I think i need margins.
What if you can layout text within a bounding rectangle, and within that bounding rectangle there are margins? Your text starts at where the margins indicate but parts of the individual glyphs may extend into the margins depending on the font.
Does that make sense to people here? Can any of you think of a better way to handle the problem?
Did how I describe it even make sense?
Edit: I've forgone margins in lieu of a simple offset. The margins will be handled at a higher level.
Thanks all for being my rubber duck (again)
Real programmers use butterflies
modified 13-Jul-21 3:44am.
|
|
|
|
|
honey the codewitch wrote: What if you can layout text within a bounding rectangle, and within that bounding rectangle there are margins? Your text starts at where the margins indicate but parts of the individual glyphs may extend into the margins depending on the font.
Yes, that makes a lot of sense.
Nostalgia... In the (good|bad) old days, metal slugs (sorts) for hand setting very occasionally overlapped the implicit bounding box (the shank). Made them a right PITA to handle, as well as being fragile. Usually in large sizes for headlines, etc, and fancy typefaces.
[edit] The word Kerning[^] slipped through the sieve that is my memory. (Wikipedia article has a picture.) [/edit]
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
modified 12-Jul-21 23:24pm.
|
|
|
|
|
I user kerning tables to advance the text cursor horizontally but there's no equivalent adjuster for vertical spacing in a TTF that I'm aware of, though you have things like ascent and descent.
Real programmers use butterflies
|
|
|
|
|
|
Thanks! I'll give it a look. Right now I'm trying to figure out why my vertical spacing isn't working right. meh
Real programmers use butterflies
|
|
|
|
|
Memories of type setting. you make me feel seriously old here.
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.
|
|
|
|
|
In TTF, you can render to the baseline by adding the value of the font's vertical ascent property to the y value on your screen.
The bounding box thing is the trouble. I've found that non-commercial fonts vary widely in what they report as their ascents and total heights or scales and there's little I can do about that. I have provided a way to offset the rendering so that the overhangs will render to margins. That solves the issue except you need to fiddle to get things pixel perfect - just like you would with CSS. It's unfortunate but I suppose it's just par for the course due to the polarity mismatch between rendering on a screen and printing on paper.
Real programmers use butterflies
|
|
|
|
|
Do you have a reference for what properties there are on true type?
|
|
|
|
|
Sort of. More like I have some grotty public domain code for reference.
It's fine, because I figured it out. I had it right. It was the font file's metrics that were wrong. That's what you get with free fonts I guess.
Real programmers use butterflies
|
|
|
|
|
|
I know but it reads like stereo instructions.
Real programmers use butterflies
|
|
|
|
|
I know right, it assumes you already know all about it.
|
|
|
|
|
My eyes kind of glaze over at documentation anyway. A line of code is worth its weight in words.
Real programmers use butterflies
|
|
|
|
|
|
Donald Knuth enters the chat.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|