-
Notifications
You must be signed in to change notification settings - Fork 1
/
fun_story.txt
93 lines (72 loc) · 4.07 KB
/
fun_story.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Today is 2011-04-16.
I was browsing "~/fonts/" directory, where I store any fonts I download. I
don't install them system-wide, instead I drop them at this directory, and
whenever needed I add this directory to my "~/.fonts.conf".
If anyone cares, here is my "~/.fonts.conf" file:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- It will be recursively scanned for fonts -->
<dir>~/fonts</dir>
</fontconfig>
Anyway, as I said, I was browsing my fonts directory, when I noticed I also
had several "font thumbnail" files. I mean, for each font I had PNG images
with the same name as the font, containing the well-known test phrase "The
Quick Brown Fox Jumped Over The Lazy Dog".
For a moment, I wondered what program generated those thumbnails. I even
thought those thumbnails were downloaded from the same site as the fonts, but
obviously this was not the case, as I had downloaded fonts from various
different websites.
Then I also noticed I had a "preview.html" file in that directory. Opening it
in browser showed a nice table with font names at the left, and those
thumbnail images at the right. Cool! What program generated this? I want to
find this program again!
Looking at the generated HTML source-code, I couldn't find any mention of the
program, but I found some HTML comments with errors about "SDL_ttf" and about
trying to concatenate "str" with "list". Well, these are some important clues:
now I know the program that generated this was written in Python, and it used
SDL_ttf (and thus, pygame).
After a quick "locate" command, I found the source code for this program. The
directory was "fontpreviewer", and it had 4 files:
describe.py
describe.pyc
license_TTFQuery-1.0.0.txt
main.py
I looked at the "main.py" source and found some comments about the program
requirements, but nothing about the program origin or author. I kept reading
the source code, and noticed it was very well organized, and the tricky parts
were well documented.
Who wrote this? Where is the website? I want to find it again, and I want to
get a new version, if possible!
I tried copy-pasting a few portions of the source code comments and even the
help message into Google, hoping to find the program origin. No luck.
Maybe ten minutes have already passed, and I still can't find the origin of
this program. Then, a wild thought passed over my mind: "did I write this
program?"
I mean... I don't remember writing this program, but since it's found nowhere
else in the world, maybe I've actually written it.
No... It can't be... The program seems so well written... I can't believe I
wrote it.
But... Looking at the source code... The style kinda matches like my style,
even though my current style is a bit different from this program. And the
CSS style generated by this program... The table borders look like what I'd
do, if I ever would write a program like this. That's too much coincidence...
And look at the HTML headers... "HTML 4 Strict" doctype at the first line,
followed by "<html>" and "<head>" together at the second line, followed by a
"<meta>" with Content-Type and the charset at the third line. That's the kind
of thing I do, or that I used to do. (nowadays I use HTML 5 doctype, and I
split html and head elements on different lines)
I can't believe... It looks like I've indeed written this program, but I don't
remember doing so!
And finally I open "describe.py" file, which is copied from TTFQuery project.
And I find one comment:
# Modified by Denilson: removed this import.
Yeah, that's me. I've really written this program (only the "main.py", of
course), but any memory of writing it has been magically wiped from my brain!
The file modification dates from 2007-08-08, the same date from those
thumbnail images I mentioned earlier. I've indeed written this, then used this
once, and completely forgot about its existence. It was written about 2 years
before I started using Mercurial (which was on 2009-07-17).
Almost 4 years later, it's time to release this nice little tool to the world,
as it might be useful to other people besides me. I might even be nice and
update this tool.