FANDOM


Following describes Advanced Comic Book Format specifications. Current released version is 1.1, proposed changes for version 1.2 are highlighted./new in 1.2/

Body section contains the definition of individual comic book pages, text layers and frames inside those pages.

Body element itself has one optional attribute bgcolor, which defines background color for the whole comic book. This property is inherited by <page> and <frame> elements unless they override it. Color is defined as six-digit hexadecimal number (#RRGGBB). Default color is black (#000000).

  <body bgcolor=“#000000“>
    <page bgcolor="#ffffff">
      <title lang=“en“>How it All Began</title>
      <image href="page01.jpg">
      <text-layer lang=“en“>
        <text-area points=“10,10 50,10 10,100 50,100“>
          <p>...</p>
        </text-area>
      </text-layer>
      <frame points="10,10 20,10, 10,50 20,50" bgcolor="#0c080a"/>
      <jump page=10 points="10,10 10,20 20,20 10,20"/>
    </page>
  </body>

Page Edit

Page represents one comic book page. Each page contains some background image over which a text layer is drawn. Frames are used to divide the page into smaller parts - this is usefull for presenting comic books on smaller resolution displays (you can zoom in from page level to frame level).

Occurence: mandatory, at least one page must be inside document body

Page has an optional attribute bgcolor which defines background color for particular comic book page. Color is defined as six-digit hexadecimal number (#RRGGBB). If not defined bgcolor is inherited from <body> element.

Another optional attribute is transition which defines the type of page transition/animation from previous page to this one. Following transition types are allowed (default value is fade which can be overridden in viewer application settings):

  • fade (old page fades out into background, then new page fades in)
  • blend (new page blends in the image while old page blends out)
  • scroll_right (screen scrolls to the right to a new page; reversed behavior applies when moving to previous page)
  • scroll_down (screen scrolls down to a new page; reversed behavior applies when moving to previous page)
  • none (no transition animation happens)
    <page bgcolor="#ffffff" transition="blend">
      ...
    </page>

Title Edit

Title is used to define beginning of chapters, sections of the comic book and can be used by viewer application to create table of contents.

Occurence: optional

Title has one optional attribute lang. Which defines language used and related text-layer. If no lang attribute is defined, english („en“) is assumed.

  <title lang=“en“>How it All Began</title>

Image Edit

Contains reference to background image for particular comic book page.

Occurence: mandatory, occurs only once

There are several kind of references that can be used for the href attribute:

  • reference to another element inside the document (i.e. Reference to <binary> element containing image converted to BASE64):
  <image href=“#page1.jpg“/>
  • reference to file on disk:
  <image href=“file:///path/to/file/page1.jpg“/>
  <image href=“file://C:\path\to\file\page1.jpg“/>
  <image href=“/path/to/file/page1.jpg“/>
  <image href=“page1.jpg“/>
  • reference to file in archive:
  <image href=“zip:path/to/file.zip!/path/to/file/page1.jpg“/>
  • URL address containing the image:
  <image href=“http://fictionbook-lib.org/DB/Images/12.jpg“/>

Text-layer Edit

Defines the text layer that is drawn over the background image.

Occurence: optional, each page can contain more text layers containing different text translations. If no text-layer is defined inside the page, just background image is rendered.

Can have an attribute lang which defines language used. The value is ISO 639-1 language code[4].

Other optional attribute bgcolor defines the default background for text-areas that are childs of this element.

  <text-layer lang="en">...</text-layer>
  <text-layer lang="sk" bgcolor="#aabbcc">...</text-layer>

Text-area Edit

Text-area defines an area into which text is drawn over the background image.

Occurence: mandatory

Has a mandatory attribute points which is a space delimited list of points that define the boundaries of the text area. Each point is defined by a pair of x,y values that represent coordinates of the background image (in pixels).

Another optional attribute is bgcolor, which defines the background color of text-area. This can be used when translated text-layers are drawn over background image that already contains lettering. When not defined this attribute is inherited from parent <text-layer> element.

Third optional attribute is text-rotation that defines rotation of the text inside the text-area in degrees between 0 and 360.

Fourth optional attribute is type, which defines the type of the text area. Based on this type attribute, application by default decides the text alignment and font used. Following types are allowed:

  • speech (character is speaking, text is centered)
  • commentary (accompanying commentary, text is aligned to left)
  • formal (text alignment is - justify)
  • letter (rendered in handwriting font)
  • code (rendered in monospace font)
  • heading (e.g. chapter title)
  • audio (speech emanating from an audio device, e.g., television or radio speaker, telephone, walkie-talkie, etc.)
  • thought
  • sign (any kind of sign/writing, text is centered)

When no type is defined, it defaults to speech.

Fifth optional attribute is called inverted. Defines wheather text is rendered with inverted color. Can be true or false, default is false.

Sixth optional attribute is called transparent. Defines wheather text-area background is drawn over the background image. Can be true or false, default is false.

  <text-area points="10,10 10,100 30,10 30,100" type=“commentary“ inverted=“true“ bgcolor=“#000000“ text-rotation=“85“ transparent="false">
    ...
  </text-area>

Text-area has one mandatory child element p.

P Edit

Defines a paragraph inside the text-area.

Occurence: mandatory, there can be muliple parapgraphs inside a text-area.

P element can have several child elements that define text sematics, links and in-line formatting. All these elements are optional.

  <p>
    <strong>...</strong>
    <emphasis>...</emphasis>
    <strikethrough>...</strikethrough>
    <sub>...</sub>
    <sup>...</sup>
    <a href=““>...</a>
  </p>

Strong Edit

Supposed to be used when some character is screaming, crying etc. Usually displayed in bold lettering.

Occurrence: optional

Emphasis Edit

Supposed to express emphasis over some word(s). Usually displayed with cursive font or bold cursive.

Occurrence: optional

Commentary /deprecated/Edit

Note: This element is deprecated. Use type attribute on <text-area> element to set text alignment instead.

Used when some commentary is accompanying the story. Usually uses different text style and text alignment as common character speech.

Occurrence: optional

Strikethrough Edit

Striked-through text.

Occurrence: optional

Sub Edit

Text rendered as subscript.

Occurrence: optional

Sup Edit

Text rendered as superscript.

Occurrence: optional

Code /deprecated/Edit

Note: This element is deprecated. Use type attribute on <text-area> element to render text with monospace font.

Text is rendered as computer code. Usually uses monospace font. Used when robot character is speaking for example.

Occurrence: optional

Inverted /deprecated/Edit

Note: This element is deprecated. Use inverted attribute on <text-area> element to render text with inverted color instead.

Text is rendered with inverted color. For example if the common text in the comic book is written with black on white background, there might be places where white font over dark background must be used for the text to be visible. Usually used in comics when some dark character is speaking.

Occurrence: optional

A Edit

Link. Can refer to the place inside particular ACBF document (e.g. References section) or to an external website.

Occurrence: optional

Has one mandatory attribute href.

Frame Edit

Frame divides a page into smaller parts.

Occurrence: optional, if no frames are defined, zooming on frame level is not possible

Frame element has one mandatory attribute points which is a space delimited list of points that define the boundaries of particular frame. Each point is defined by a pair of x,y values that represent coordinates referring to the background image (in pixels).

When on frame level frames are displayed in the order how they appear in the document. Frames can overlap each other.

Frame has one optional attribute bgcolor. If zoomed on frame level this frame usually does not fit the whole screen therefore backgound color is defined. Color is defined as six-digit hexadecimal number (#RRGGBB). If not defined bgcolor is inherited from <page> element.

 <frame points="850,75  958,137 958,262 850,325" bgcolor="#0c080a"/>

Jump Edit

Clickable object (area) on a comic book page which navigates the reader to a certain page. It can be used for a choose your own adventure type of comic books.

Occurrence: optional

Element has mandatory attribute page which contains an integer number of page to which the reader will be navigated. First <page> element in the ACBF document represents the page number one, second one page number two etc.

Another mandatory attribute is points which is a space delimited list of points that define the boundaries of this object. Each point is defined by a pair of x,y values that represent coordinates referring to the background image (in pixels).

 <jump page=10 points="10,10 10,20 20,20 10,20"/>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.