EEULAA Inclusion by adding an OpenType Table

From Fontlab Wiki

One suggestion about how to add the Electronic EULA Abstract (EEULAA) to fonts is to create a new OpenType table with standard fields. Emil Yakupov has created a (Windows) demo application which creates such a table and inserts it into a font and reads such tables from fonts. Here is the table description:

The table contains the principal positions of the EEULA abstract in simplified (machine readable) form. Each position of the EEULA abstract is represented by an identifier, bit value, numeric value and optional text (Unicode).


General structure of the EEULA abstract table (table tag "EULA"):

struct HEADER

struct DATA_FIELD[]

struct STRING_FIELD[]

(Variable) Storage for the actual string data.


Structure

HEADER {

DWORD dwVersion;

USHORT wNumFields;

USHORT wOffsetToStrings;

}

dwVersion – version number (current is 1.0)

wNumFields – number of DATA_FIELD records

wOffsetToStrings – offset to beginning of text data (Variable) from beginning of table EULA


Structure

DATA_FIELD {

 WORD      wFiled_id;
 USHORT  wBitValue;
 SHORT     wNumValue;
 USHORT  wNumOfStrings;
 USHORT  wStringStructOffset;

}

wField_id – section identifier, low byte – section id, high byte – subsection id.

wBitValue – see Table 2 for meanings

wNumValue – Numeric value (e.g. number of CPUs).

Negative value –1 means “unlimited”.

wNumOfStrings – number of text structures STRING_ID_REC

wStringOffest – offset to corresponding structure STRING_ID_REC.


struct STRING_ID_REC {

USHORT wLangId;

USHORT wStringLength;

USHORT wOffsetToString;

};

lang_id – language id

string_length – string length

wOffsetToString – offset to text string from beginning of text data in table (Variable). Absolute address can be calculated as HEADER.wOffsetToStrings + STRING_ID_REC.wOffsetToString


Table 1. EULA positions and posible values


Type subtypewFiled_id Bit value wBitValue Number valuewNumValue

Number ofUsers 0001h 0100h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number of Workstations 0001h 0200h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number ofCPUs 0001h 0300h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number ofDevices 0001h 0400h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number ofOutput Devices 0001h 0500h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number ofPrinters 0001h 0600h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number ofComputers 0001h 0700h EULA_BVAL_NO /EULA_BVAL_YES -1…32000

Number ofServers 0001h 0800h EULA_BVAL_NO /EULA_BVAL_YES -1…32000


Sharing with service bureaus 0003h … EULA_BVAL_NO / EULA_BVAL_YES / EULA_BVAL_CONDITION …


Embedding:All_None_Custom 0004h 0100h EULA_BVAL_NOTDEF / EULA_BVAL_YES/ EULA_BVAL_NO …

Embedding:UserOnly 0200h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:InHouse 0300h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:ServiceBureau 0400h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:Intranet 0500h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:eBook_eNewsletter 0600h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:OEMsoftware 0700h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:WEB 0800h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:External Non-commercial 0900h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …

Embedding:External commercial 0A00h EULA_BVAL_NO / EULA_BVAL_PRINTPREVIEW / EULA_BVAL_INSTALLABLE / EULA_BVAL_EDITABLE …


Font Modification:Format/Platform conversion 0005h 0100h EULA_BVAL_NO / EULA_BVAL_YES / EULA_BVAL_CONDITION …

Font Modification:Font Editing 0200h EULA_BVAL_NO / EULA_BVAL_YES / EULA_BVAL_CONDITION …


License Transferable 0006h … EULA_BVAL_NO / EULA_BVAL_YES / EULA_BVAL_CONDITION …


Table 2. Bit field values

  1. define EULA_BVAL_NOTDEF 0x0000
  1. define EULA_BVAL_NO 0x0001
  1. define EULA_BVAL_YES 0x0002
  1. define EULA_BVAL_CONDITION 0x0004
  1. define EULA_BVAL_CONSENT_REQ 0x0008
  1. define EULA_BVAL_LICENSE_REQ 0x0010
  1. define EULA_BVAL_PRINTPREVIEW 0x0020
  1. define EULA_BVAL_INSTALLABLE 0x0040
  1. define EULA_BVAL_EDITABLE 0x0080