|
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
|
|
|
|
|
I love that he used to issue reward checks for $2.56 when you found errors in his works. He seems like a neat guy. I'd love to have dinner with him and pick his brain, you know?
Real programmers use butterflies
|
|
|
|
|
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;
|
|
|
|
|
|
|
Four people meet and make the following statements.
Person 1: One or more of us are lying.
Person 2: Two or more of us are lying.
Person 3: Three or more of us are lying.
Person 4: All of us are lying.
Which ones are lying?
|
|
|
|
|
3 & 4
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|
|
Person 4's statement is a contradiction.
This makes Person 1's statement true.
Which means Person 3 must be lying because the statement can no longer be true (two people would be telling the truth).
Which makes Person 2's statement true.
|
|
|
|
|
How many beds are in the room?
Are any of the people uncomfortable with sharing a bed with any of the others?
Are any OK with lying on the floor? Or on another type of surface?
|
|
|
|
|
4 is lying, because he if he was telling the truth, that would be a paradox.
Therefore, 1 is telling the truth - at least one is lying.
If 3 is telling the truth and so is 1 that's two telling teh truth, so 3 is lying as well.
Since 3 & 4 are lying, 2 is telling the truth.
So 1 & 2 are truthful, 3 & 4 are lying.
"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!
|
|
|
|
|
|
The classics are the ones we remember best!
"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!
|
|
|
|
|
That is the answer I came up with also.
|
|
|
|
|
They all have Alzheimers so everyone and no one?
Nobody told me these people were sane anyway...
|
|
|
|
|
Are we allowed to waterboard the participants to find out
Hogan
|
|
|
|
|
Well, depends on whether you want the truth or the answer you want.
But your question reminded me of this[^]
A small warning though, it's politically incorrect on several levels. So if you're sensitive, don't click.
|
|
|
|
|
In answer to your question, yes I can solve this.
|
|
|
|
|
All of them.
Person 1 is lying, because person 1 speaks first, and the statement can't be truthful.
Person 2 is lying, because person 2 speaks second, and the statement can't be truthful.
Person 3 is lying, because person 3 speaks thirdly, and the statement can't be truthful.
Person 4 is lying, because the statement can't be truthful.
|
|
|
|
|
Are they making their statements one at a time and in the order implied, or are they all talking at once. If they're all talking at once, they're women, and women lie, so they're all lying. What you have to worry about is when they all stop talking. That's when you know you're in trouble.
".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
|
|
|
|