Wednesday, July 26, 2023

Tweaks and Ajustments to 5×10 and 7×13 Bitmap Fonts

Oof, that took me a while, but I think that I'm much more satisfied with what I have now than before.

Continuing what I began back in the day for the 5×10 bitmap font, with a more recent set up with the 7×13 bitmap font, comes a new iteration of both bitmapped fonts.

The gist for this iterative update is about following fixing the fonts to fit some of the readability requirements that Atkinson Hyperlegible and Intel One Mono Typeface have stipulated.

``But MT, you're trying to do readability adjustments, on fonts that are so small that everyone (who isn't you) who sees it complains about it?''

Yeah... shut up. (=

Without ado, I'll just unceremoniously put in the 5×10 font here:
And here is the 7×13 one:
And of course, after doing this for a while, it is only now that I realise that the mapping of the grid to the glyphs displayed [under CP-1252] is wrong---all the ``funny'' whitespace/undefined glyphs remain undisplayed.

🤦

I'm keeping the original versions as uploaded above just so that it is easier to visually/automatically do a comparison between the new and old forms.

So anyway, here's the corrected versions for 5×10:
And here's the corrected version for 7×13:
The main changes on the ASCII portion of the fonts is is about fixing how the 8 looks to make it more distinct from B, and adjusting how { and } looks so that they are super distinct from the other three types of enclosing parentheses/brackets/``angle'' brackets. There were also some alignment problems earlier that I corrected in this round. I also did a sweep on the upper-ASCII portions, just to make sure that they are sort-of consistent and less broken (see character 0xf7 for the 5×10 font, and characters 0xa9, 0xae for the 7×13 font).

Overall, I'm quite pleased with the result. The next step is figuring out how to generate the associated fonts so that they are usable in Xfce.

Till the next update.

Friday, July 21, 2023

A Day Off? A Day Off!

It's a Friday! And I'm on leave! It is therefore a most excellent Friday!

Curbing my exuberance a little, I'm only on leave because of the planning ahead by past-me---July has no gazetted public holidays, and thus I decided to just take some paid time off to create a random long weekend. It's not just for July, there were a couple of other months where this was going to be a problem, and a similar set up was made.

After all, what's the point of amassing paid time off when I have no intention of travelling overseas for quite a while yet?

But back to today. I had the best run for Gunfire Reborn yet, reaching about the half-way point in the third of four acts. This run saw me use a weapon that operated like a shotgun, and it got me thinking about why I was more successful with this run as compared to all the others that failed much earlier.

I think it has got to do with my personal reflex coordination between my left-hand keyboard movement and right hand mouse-aiming. Shotguns in most games involved a shoot-and-scoot method---fire the weapon, and as one was undergoing the [long] reload animation, strafe to the side to dodge attacks until the reload is complete, then aim and repeat. It was something that I learnt/got comfortable with from the old days of Doom and Doom 2, where the shotgun/super shotgun ruled supreme, complete with the Alt-key strafing when one used the default keyboard-only configuration (arrow keys controlled movement, there was no vertical looking, and holding alt-left/alt-right strafed left and right respectively, like the modern day use of A/D keys under the WASD-scheme).

For rapid-fire weapons like rifles/chainguns/pistols, circle strafing was needed. This required good relative motion coordination between the strafing movement from the left hand, while keeping the reticle aimed at the target at all times. The room for error in terms of dodging attacks was much tighter, since one was not maximising the distance that one could dodge through moving orthogonal to the shot fired by the enemy, but was instead moving on a curved route that far shortened the effective orthogonal distance.

I think I'm bad at that. Moreover, shotgun-type weapons were much more effective in dealing with a large group of mobs---literally fire into the throng, and strafe-left/right to dodge, with aim mostly optional. Single shot/rapid fire guns still require good aiming and thus some kind of lock-on, and as a result, requires a much higher reaction time than what I'm used to.

Ah well.

Gunfire Reborn scratches that itch of a first-person shooter rogue-like. I mean, I played Ziggurat but found the maps too square/limiting, wanted to complete Rogue Shooter: The FPS Roguelike, but that game was effectively abandonware. I do have Tower of Guns hiding around somewhere, but have no real reason why I didn't play it.

But to be fair, I only learnt of Gunfire Reborn from this years SGDQ run. It looked fun, was sufficiently fast paced (quick to start, short enough runs), and yet without the kind of boxing-in claustrophobia from allied games like The Binding of Isaac: Rebirth.

Some time back, I accidentally started Firewatch that I had installed on Eileen-III via the GOG Galaxy launcher. I was naturally quite confused, but just went ``eh fuck it'' and played it. The game was not particularly long, but it had lovely scenery that was antithetical to what The Long Dark had (think forest in summer compared to the Canadian tundra). And yes, I have The Long Dark, and love what it represented, having watched quite a few playthroughs by Zisteau, including his latest advanced tutorial series, but that's a sidetrack.

Firewatch. I didn't know what I was expecting, but for the 3--5 hours of gameplay, I found myself having a kind of fun that I have missed for quite a while. I know it's a ``walking simulator'', but really, sometimes all I want is just a relatively relaxing game to help me walk away from the walls that define what what my current life is like. And Firewatch does that wonderfully. No regrets for that discovery that I had accidentally ran that game some how.

In some ways, due to Firewatch, I've also started on Shadow of the Tomb Raider, the last of the trilogy of the modern Tomb Raider series. The thing about the new reboot (it's been about 10 years since the reboot) is that it was a much grittier and realistic depiction of Lara Croft. The graphics saw a big boost in quality compared to their predecessors, but this was more of a product of the times than anything, but also the shifting of the more whimsical and ``friendlier'' style of the past into something a bit more realistic. I remembered seeing my first death of Lara Croft in Tomb Raider---she was very graphically impaled. I didn't remember any of the Tomb Raider games showing death so brutally, and was fairly shocked.

And here's the thing, I'm not the only one.

Brutality aside, the new Tomb Raider series does have lovely scenery at a higher fidelity than the stylised stuff of Firewatch or even The Long Dark (I'll play it soon! I promise!). And playing the latest edition (a circa 2018 game(!)) on Eileen-III is definitely a treat.

Okay, I think I've exhausted what I wanted to write. Going to grab a bit more whiskey (it's still my day off, despite having been summoned for 1.5 h to solve a small-ish PRODuction issue (sighs)), and continue on my adventure in Shadow of the Tome Raider, even as I listen/half-watch some the latest hijinks from the Hololive members.

Till the next update.

Wednesday, July 19, 2023

7×13 Font?

This entry is an extension to a theme that I started from some time ago about bitmap fonts.

So, if you recall, I recently got ahold of Eileen-III. With her 2560×1600 resolution on a 16″ screen, using the 5×10 fonts is a great way to migraine central.

I had been using Unifont adjusted to be monospace-friendly set to scale down from the default 8×16 to 7×13 just so that I can have at least 81×2=162 horizontal characters under a half-screen set up (the math works out to be 1280/162∼7.9=7 pels per character width).

It worked fine, but man it looked ugly. This is generally true for regular vector fonts when we scale it down to the point the mechnical scaling/anti-aliasing starts to destroy the font due to how there is no good way for the text renderers to correctly position pixel-equivalents at pixel scale without losing contrast. When the width of a stroke is down to the width of a single pixel, contrast starts taking on a much outsized role, and that's why some of the best small/tiny fonts are hand-crafted instead of relying on auto-scaling via math.

And in this case, the Unifont version is just ugly.
Just look at it: broken 0 and }, X and Y are suddenly spouting umlauts, and all the glyphs that are supposed to be round at the x-height have a sharp corner or two.

Since I was sick of it, I started to look at the small stash of hand-crafted bitmap fonts that I had lying around. The 6×11 font looked pretty good for the display set up that Eileen-III had, but there was just not enough spacing in it. On a lower resolution (but with comparable physical dimensions) display, a single pixel space was adequate, but for the particular display that Eileen-III had, it was just too small.

So, starting with the 6×11, I expanded it to 7×13 by adding one more column of blank pixels on the left, thus centering all the glyphs (the original 6 pel width used only the first 5 pixel columns for the glyph art work), and added two more rows of blank pixels on the top. I then tweaked some of the oddities that I missed from the 6×11 font, including adjusting how my 6 and 9 look, as well as adjusting the positions of the different types of brackets/pseudo brackets to better fit the larger cell. I also adjusted the overall shape of the glyphs to better match my 5×10 font, in the sense that they looked much closer to how I would envision a good high-resolution super-scaling of my 5×10 font to 7×13 would look like. And here it is:
There are still some things that I could tweak more still, but I think it is excellent for now.

There was one negative side effect of using this 7×13 bitmap font instead of the weirdly scaled down Unifont---CJK characters under this font look much worse than that of Unifont. Unifont will scale its 16×16 CJK fonts to fit into 13×13, which looks remarkably good considering that its complexity meant that any form of approximation looked better than the approximation one saw with the simpler Latin-1 glyphs.

With this font, the CJK characters made the text renderer pull up some other fallback vector font, which again had weird (in this case, worse) scaling and contrast issues that made them illegible.

Is this a problem? Yes. Is this a big problem? Eh... not really. I don't usually need to operate on stuff with CJK when I'm using my ``optimised'' text mode---at that point I will literally pull out my full-scale Unifont set up instead (i.e. 8×16 for single characters, and 16×16 for CJK characters).

And that's it for this post. Till the next one then.

Tuesday, July 18, 2023

Hero Worship: Don't

Hero worship. One word: don't.

Inspired in part by the litany of recently reported wrong-doings by high-fliers in SIN city, combined with my own experiences lurking about the rich and the powerful, I just think that hero worship is unhealthy.

Now, I could easily invoke my beliefs as to why hero worship isn't a good idea, but I won't. Let's go via a more secular and rational route to convince instead of relying on faith.

So the thing is, when we idolise some person, we often do so in some particular context. Someone might idolise a specific musician because of that musician's musical abilities (it doesn't matter if it's some rock band person, or a more ``traditional'' classical musician). Some might idolise a particular rich person because of their wealth/business acumen, or a powerful person due to their political/authoritative prowess. We call these people our idols because they have some quality that we strongly acknowledge and enjoy.

That's generally fine and dandy. The problem comes when these start reaching into the realm of putting these completely human people on pedestals, and starting to see them as paragons beyond their field. In the eyes of the people then, these idols of theirs can do no wrong.

But here's the thing, just because someone has stellar skill/outcomes from a specific domain is no indication that they have an overall stellar skill/outlook on other domains, adjacent or not. In fact, I would go as far as to claim without rigorous proof that anyone who shows superlative achievements in one field is probably balanced by a flabbergasting flaw that can cause one to literally facepalm in absolute disbelief.

There's nothing mystical about the existence of such a balance---everyone passes time at the same rate [of one second per second]. Assuming that any outward demonstration of skill/talent is a literal product of hard work and effective practice means that there will always be a trade off between what someone excels at and what they ignore; something that the table-top role players will understand as a ``dump stat''.

There are of course exceptions in the form of truly gifted individuals who can reach prodigy-levels of achievement in a truly polymathic manner---but they are sufficiently rare that we do not need to worry about their existence.

What I'm getting at then is that for every hero, there is a dark side. We can acknowledge their achievements, but we should not lionise them beyond what we can see---a great musician may be a completely abusive spouse, and I think that it is fine to accept their great musicality, but condemn their abusiveness to their spouse, without breaking stride or running into a contradiction.

The problem with most people is that this type of nuanced thinking is just too much to bear. To many, life must be split completely into black and white. A hero must be worshipped thoroughly---their heroes can never do harm. And the prideful one being worshipped as a hero will often get high from all the accolades often enough that they truly start believing in themselves the way their fans believe in them, and thus lose their grounding.

And that is when the hero is most vulnerable to fall a fall that is as dramatic as it is traumatic.

Then again, maybe I'm just jaded. Maybe I am too cynical about the world, and see it not in the wonderfully vibrant colours the way those who hero-worship can. Maybe to me, everything is a shade of gray, with some being darker than others, while almost none are blindingly bright.

Maybe.

But I still stand by my words: hero worship---just don't.

Friday, July 14, 2023

favicon, and Some Annoying Bot

Ah Friday. Nice!

Favicons---not so nice. Just look at how bloody complicated this mess is! For those who are somehow too lazy to click through to the Wikipedia page, allow me to quickly summarise why this is a bloody mess:
  • The original de facto standard made use of a proprietary-esque Microsoft icon file format;
  • The favicon was quickly co-opted for use as the default logo/emblem for the page when added to the Android screen as a bookmark;
  • Apple has, of course, its own version of what it wants to do that is incompatible with the Android interpretation;
  • Microsoft has their own weirdness in the form of tiles, with even more obscure dimensions that are unrelated to the published dimensions of the constructed image;
  • And of course Apple needs to top it up with more nonsense with their new standard for ``pinned tabs'', which switches up from:
    1. Raster representation to vector representation; and
    2. Full colour to pure monochrome with a single colour shade
Like, seriously.

Here, check out the FAQ of a tool that attempts to handle all these. I'm not even kidding.

``MT, why do you care about favicons?''

Well, I do run my own domain, and as part of my regular maintenance checks, I was seeing evidence that favicons of all other flavours were being requested when I wasn't doing it.

That little rabbit hole revealed the depth of the insanity, and while there was a tool that allegedly could tame the whole shebang with only a small upload of the source, I didn't want to do that.

Who knows what people can/will do with the stuff that was uploaded for processing?

And so, I spent some time working on my own fixes to get my personal domain to match up as much of the requirements of the ``modern day'' favicon nonsense. In doing so, I learnt even more about ImageMagick, among which included the ability to create the proprietary ico format, and that at some point their default invocation changed from convert (which clashed with a Microsoft Windows tool that changed a disk's file system by naming convention) to magick.

Apart from ``fixing'' the favicon, I did some other tweaks. The more astute will realise that I have switched from the Inconsolata font to something new---the Intel One Mono Typeface. My main draw to this font over the old Inconsolata was on how it was designed with input from users with poor vision, the same reason why I decided to use the Atkinson Hyperlegible as my primary font in the first place.

Readability and unambiguity of the glyphs are very important to me. I hate wasting time trying to make out if something is 1Iil, or B8, or aGbgrpqu. This is doubly so for when I'm looking at code fragments. The Intel One Mono Typeface scratches this itch for the monospace font-face, and I set it up accordingly for my main domain.

I'm a little too tired to try and set it up for this [or any of the other] blogs, which may be more impactful when compared to my domain, because I use more monospace text here than there.

Yeah, I know I'm starting to sound trite. I can't help it---it's fast reaching stupid o'clock. And I've spent a better part of this week trying to recover from some non-specific and undiagnosed illness.

The last thing left to say is my observation that there is some badly written bot that has been crawling this blog for nearly a month. It's bloody irritating and annoyinng, and I hope they either fix their bot, or just to leave me alone.

So much pain.

And that's about it for now, I suppose. Bed time for me.

Wednesday, July 05, 2023

So Long CentOS, and Thanks For All the Fish!

So, I managed my own unnamed and generally unreferenced Linux server running CentOS (the astute might recall me talking about this little server and the whys of its existence from this old post). It had been alive since 2016 since I made that switch over, and was doing its job perfectly well on the CentOS 7 Linux distribution.

That is, until Red Hat basically told all of us CentOS users to go pound sand and be their beta testers, the same way Microsoft is making Windows 10+ as a continuously beta-tested platform.

It was not ideal for my situation. I wouldn't have minded too much in shifting up to the CentOS Stream build, if not for the fact that the upgrade path required going through CentOS 8 first, which ironically had reached its end-of-life in 2021-12-31, even as CentOS 7 was reaching its end-of-life in 2024-06-some day.

🤦

And so, I went back to the old faithful.

No, not Slackware, but good old Debian.

``But MT, why Debian? You've not used that sucker in years/at all, and isn't Ubuntu like the more updated downstream version?''

Well... yes. All that is true. But I don't need this little server to run the latest geegaws like Docker containers, GPU computations, or even a damn GUI desktop---it just needs to run Apache Subversion, and run it well.

That's literally it. And Debian is the granddaddy of being the most rocksteady Linux distribution out there, so what more can I ask for, after this confusing debacle that surrounds CentOS?

It took me a while to bring my old configuration over, but it was finally done, mostly without much incident. Running Debian 12 had the side effect of finally bringing my subversion server version up to 1.14.2, which gave me a chance to update the longest running repository of mine to a more compact and performant format. I also took the opportunity to switch over from the old RSA keys for HTTPS to something based on elliptic curves, with the key benefit of shrinking the key size by 16× without losing actual effective security.

All in all, it was not as harrowing as I thought it would be, and I was glad.

I've updated all the local repository references to point to this new server, and have decommissioned the original CentOS 7 one. Here's to a less painful maintenance process for the future.

Till the next update.

Sunday, July 02, 2023

It's July Already?

Woah, the second of July is upon us. As at noon-ish, literal halfway point of 2023.

Not sure how/what to feel about this. On the one hand, we're getting closer the end of the year, and with it perhaps we will get to cast the dark shadows that came from the COVID-19 pandemic away from our collective trauma, to redevelop a new sense of optimism.

That new sense of optimism is important in this time and age. The doom-saying has been on overdrive for the past three to five years, and it really does show, at least for me.

I cannot seem to live the day without getting blasted with information on global warming, some new development in the spats that come from geo-political posturing/brinkmanship, ever-increasing threats to the livelihood of the vast majority of the white-collar workers through ``AI'', uncontrollable price increases ``due to inflation'', and all the associated over-corrective behaviours that some of these events trigger.

No wonder I'm feeling down more than half the time.

I personally cannot tell how some people can maintain their optimism. Everything just looks so... bleak. The ``Me! Me! Me!'' world that we have today is just such a cavernous echo chamber that there are many times where I cannot even hear myself think.

One might say that I can always walk away. And the truth is, I have been doing so.

Of the few [online] communities that I have been a part of, I've more or less walked away from them all. Some I left because the members became too militant and extreme in their desperation of defining their own safe space, which often times end up creating a similar toxic environment as the one they are acutely hurting from. Some I left because the nature of the community has changed---from an indie passion-project where I could interact nearly personally with and willing to support with whatever I have, to a complete commercial entity that only cares about their shareholders, who incidentally prefer using an unpaid-for third-party ``community'' environment that I didn't agree with.

But these are all about the past---thinking about them isn't bad per se, but if all they are giving are these bad vibes, I really shouldn't be thinking about them, if possible.

(sigh)

With the next half of the year coming up, what should I be looking forward to?

Well, there's always NaNoWriMo in November. It'll be the fifteenth year I'm a part of it (URL will point to the correct place some time in November 2023, so don't fret). The community there was always fractured along the axes of old-bird versus newbie, professional writers versus amateur writers, the non-students versus the students. It's... not a bad thing, but just something to take note of. I'm an old-bird amateur writer who is not a student, and am probably one of the few old-birds that have not done fiction writing professionally (i.e. getting paid to publish).

There are couple of engineered long weekends here and there through careful set up of my leave, so that's always nice. I'm steadily building back my stamina and strength in cycling, and am slowly incorporating cycling back into my set of activities. Nothing hardcore with the road cycles and what-not---just me, my Brompton from November 2017, and wherever I can go, depending on the time of day/week. So some longer trips during the off-peak periods from the engineered long weekends are going to be a part of what's happening.

We're probably going to get a couple of [small] performances coming in for TGCO, which is always a treat---I've always felt it weird if a performing arts group... doesn't perform. Aside from TGCO, I'm starting to prepare my way towards being a more regular musician (with Aurelia) for worship as a part of the music ministry of PPCC.

Aside from all that, more reading, I suppose, and more games to be played on Eileen-III. Nothing on the horizon for the dating front, because honestly, I don't have a good feeling about dating and getting in a relationship. At my age, it feels like... the pros of being with someone are no longer as superlative as the cons. When young, one's future is much more vague, making it easier to meld/remodel it according to the shared expectations of one's partner.

When one gets older and more set in their ways, there is almost no room for negotiations---the keyword being ``almost''. So... the odds aren't good.

As I might have mentioned before, when it's my time to go, it'll be my time, and I'll just... go. I don't expect to be remembered, so it's okay to be alone in the end.

I just kinda pity whomever is going to do the final clean up because I probably won't be able to settle things properly before my time's up. Sorry in advance to whomever that is.

Anyway, I ran out of momentum with what to write. Just wanted to rant a little at the half-year mark for 2023, before I become completely dejected at the prospects of life in general.

Till the next update.