|
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
|
|
|
|
|
There might be more than 1 solution, I don't know. But one valid solution is:
Statement TRUE FALSE
One or more of us are lying. x
Two or more of us are lying. x
Three or more of us are lying. x
All of us are lying. x
I solved this with brute force, as there are only 16 possible combinations. But you can also approach this heuristically: If two or more are lying, then one or more are lying all the more. Same goes for 3 => 2 and all => 3. So the answer can only consist of one or more TRUEs followed by one or more FALSEs. So, this is the only valid answer. Aside from: "Who cares?" But obviously at least I do.
|
|
|
|
|
|
I run Windows in Bootcamp on Macs, and have for years. Because of this (I assume) I get more than my fair share of niggles while running Windows. I don't see it as a technical issue, more a political one, given that Windows runs on anything, anywhere, as long as it's Intel.
The niggle that gets me the most, though, is a weird one: Windows keeps forgetting my desktop background colour. What makes this even weirder is my background is the default blue. However, when Explorer locks up after resuming from sleep, or I have an external monitor plugged in via USB-C and the display goes to sleep, or a cloud passes in front of the sun (I dunno - it's a bit of a precious petal, this Windows) then after restarting Explorer I get a black screen.
Not the default blue.
Not the colour I may have changed to.
But black.
And it's constant. And it's happened for years.
I know that Windows is actually remarkably resilient given the demands on it, especially that of backwards compatibility, but having something as dumb as not being able to store and restore the background colour of the desktop rocks my faith in strange ways.
cheers
Chris Maunder
|
|
|
|
|
|
have you looked at the OS event logs? might be something there.
|
|
|
|
|
But not after a restart I guess?
Try to restart Explorer.exe when it happens, if that fixes the problem, we can narrow down the problem a bit.
And make sure you launch folder windows in separate process.
|
|
|
|
|
Restarting Explorer is what often triggers the Black Screen Of Despair.
I just can't help thinking there's something like this in Explorer:
void main()
{
LoadUpLibrariesNStuff();
GetUserPreferences();
SetDesktopBackgroundFromThePreferencesWeLiterallyJustLoadedUp();
RandomlyRearrangeDesktopIcons();
...
}
cheers
Chris Maunder
|
|
|
|
|
Well, that implies something is not right with your explorer installation.
The first thing I would check though, as a continuation of Garys suggestion, is whether you have disabled Windows Telemetry? Either by group policy or by disabling some files.
|
|
|
|