Books with Illuminated Capitals

From The DarkMod Wiki
Jump to navigationJump to search

2025 review by Geep. The mechanics are due to early work by Fidcal, Springheel, and others.

Introduction

Pages of important books from medieval monasteries were often visually embellished, with decorative borders and "illuminated capitals" beginning chapters or major sections. In its simplest form, an "illuminated capital" is an enlarged drop capital, typically with font attributes that sets it off from the remaining text. TDM can do this. (More elaborate versions - essentially a miniature painting with an embedded capital letter - are beyond the scope here.)

Standard Prefabs and Related Assets

If in DR you right-click "insert prefabs", and navigate to readables/books/open/, you'll find:

  • static/book_open_static_ornate_gothic_bamberg.pfb
  • mobile/book_open_mobile_ornate_gothic_bamberg.pfb

These two are the only core-distributed prefabs with related .gui's and .xd outlines that support illustrated capitals off the shelf. As the name suggests, the Bamberg font is used, for both capitals and body text.

Visual Appearance

An example work of scripture, based on "book_open_static_ornate_gothic_bamberg.pfb".

If you click-enlarge the figure at right, you'll see that Bamberg is a slow read, with upper-case particularly difficult. But what is faith without struggle?

Drilling in, the GUI has generated these font attributes:

  • The body text color is a translucent dark blue (RGBA = 0 0 0.2 0.75) with a 0.31 textscale.
  • For the illuminated capital, the base color is a near-opaque medium red (0.5 0 0 0.9) with a textscale of 1.25 on left, 1.24 on right (differs because right is nearer book gutter?)

Under the latter are two other layers (HiLite and Shadow). Both layers will render the same character(s) as the base layer, with the same textscale, but offset from the base in opposite diagonal directions -

  • HiLite is a transparent bright orange (1 1 0 0.6)
  • Shadow is a transparent black (0 0 0 0.6)

A parchment background with decorative border around each half-page comes from "guis/assets/readables/books/book_background_ornate01" (actually, _left & _right mirrored variants).

Beginning Your Own Book

See Readables Prefabs for a fuller, general explanation of what we're doing here.

If you instantiate either of the foregoing ...ornate_gothic_bamberg prefabs in your FM map, you'll see this entity spawnarg:

xdata_contents      book_ornate_gothic_bamberg

Looking up the corresponding "book_ornate_gothic_bamberg" section in tdm_prefabs01.pk4/xdata/prefabs.xd, you'll see it offers this outline (of which only page 1 is shown here):

book_ornate_gothic_bamberg
{
    precache

"num_pages"   : "1"

"page1_left_capital" : ""
"page1_left_body" :
{
""
}

"page1_right_capital" : ""
"page1_right_body" :
{
""
}
...

"gui_page1"   : "guis/readables/books/book_ornate_gothic_bamberg.gui"
...

"snd_page_turn" : "readable_page_turn"
}

Observe that unlike most readable GUIs, the one invoked here, "book_ornate_gothic_bamberg.gui", by design provides no handling of title text. So there is no "page1_left_title" or "page1_right_title". Instead, it substitutes "page1_left_capital" and "page1_right_capital".

Following the usual procedure, you place a copy of the "book_ornate_gothic_bamberg" outline into your <mymap>.xd file, and rename the outline to something unique and meaningful, e.g., "pulpit_tome". Then begin fleshing out the contents.

Deciding about Illuminated Capitals

An illuminated capital should start a sentence and be upper-case, e.g., "A". For any given "half-page" (i.e., left or right), here are some suggestions:

  • You don't have to provide an illuminated capital; the "page...capital" field can be left empty with "", or deleted entirely.
  • It is easy to make the first letter on the half-page an illuminated capital (i.e., against top-left margins).
  • But there are other layout possibilities, at the expense of aggravating fiddling to make body text correspond -
    • move it further down with linebreaks (e.g., "\nA").
    • put more than one (e.g., "\nA\n\nB").
    • move it away from the left margin (e.g., "<multiple spaces>A"); seldom worth the hassle.

Specifying Your Text and Layout - An Example

Here is the .xd content used to generate the figure above. This example text and its layout derive from a book found in the "Tears of St. Lucia" FM. Body text is defined for page 1 left, page 1 right, and (not shown in the figure) page 2 left. Page 1 left begins with "And". The first letter was made illuminated:

"page1_left_capital" : "A"

and the "page1_left_body" text adjusted to accommodate it:

  • the first line is left blank (for pleasing vertical spacing).
  • the second line starts with about 14-15 spaces, then continues the word (e.g., "nd") and the remainder of the sentence that will fit WITHOUT WORD WRAP.
  • the third line also starts with about 14-15 spaces, and continues the sentence/paragraph; word wrap is fine now.
  • any further lines are clear of the illuminated capital.
pulpit_tome
{
    precache
"num_pages"   : "2"
"page1_left_capital" : "A"
"page1_left_body" :
{ 
""
"               nd the prophet"
"              Amos did walk in the mountains for forty days, and his disciples with him. And the disciples asked of him many questions, and waited to hear the voice of God in his words."
"\nAnd one day the disciples did argue amongst themselves. \"Who can expect a greater reward in the heavenly city? "
}
"page1_right_body" :
{
"He who toils in the field, or he who commissions great works to be built?\""
"\nAnd Amos did say, \"I say unto you, the Lord God doth give Man hands that he might build. The richest merchant that doth pay for a great cathedral, yet lifts not his hand to build, shalt not be lifted in the sight of the Lord. What shall he say, when he doth stand before the"
}
"page2_left_body" :
{
"throne of the King of Kings, when he is asked, 'Where are thy works?'"
""
"\"Yet the poorest beggar, who piously hews a tree or turns mud into brick, he hath made himself a hammer of God. And to him shalt be given many rooms in the palaces of the Master Builder.\""
""
" The Scriptures of Amos"
}
"page2_right_body" :
{
""
}
"gui_page1"   : "guis/readables/books/book_ornate_gothic_bamberg.gui"
"gui_page2"   : "guis/readables/books/book_ornate_gothic_bamberg.gui"
"snd_page_turn" : "readable_page_turn"
}

Non-Standard Assets

As mentioned, the foregoing text and its layout derive from the "Tears of St. Lucia" FM, specifically the book called "pulpitscriptures" in "stlucia.xd". Screenshots of this Pulpit Scriptures bookwere taken by datiswous during 2023 maintenance. Note that the body text is different than the figure above. That's because Pulpit Scriptures relies on a historic GUI, now considered FM-specific. It differs from our standard "book_ornate_gothic_bamberg.gui" mainly in that:

  • The body text font is Gothica2, not Bamberg (but the illuminated capitals are Bamberg). Thus, within the historic GUI, the font is surprisingly not the same for the illuminated capitals and body text. Gothica2 is a bit easier to read than Bamberg, particularly upper case letters.
  • The change in body text font implies minor text layout differences.
  • page<n>_title is still present in the .xd entry (but left empty).

If you want to use this for your FM too, the historic GUI is found at "stlucia/book_ornate_gothic_gothica2.gui". Importantly, that is the same name, "book_ornate_gothic_gothica2.gui", as a modern standard GUI that does NOT support illuminated capitals. So if you use the historic GUI, you might want to copy it to your FM under a different name.

More broadly, if you customize your own illuminated-capital GUI, Fidcal recommendsusing the same textscale for base capital, hilite, and shadow. This keeps the layers in alignment if the capital is moved down the page.

See Also