extension legend
From Wiki
Holy Diver (talk | contribs) (identifier) |
|||
Line 30: | Line 30: | ||
#The second part is a number between 0 and 1000 that specifies the weight (or boldness) of the typeface. Sword of Moonlight uses 1000 or maximum boldness for its MS Mincho fonts. | #The second part is a number between 0 and 1000 that specifies the weight (or boldness) of the typeface. Sword of Moonlight uses 1000 or maximum boldness for its MS Mincho fonts. | ||
#The third part is the name of a font. The name is embedded in a font file. Usually a file has more than one name per font stored in the file. For non-English non-Unicode fonts there is often an [[ANSI]] name using the native language of the font as well as an [[ASCII]] name. Names are sometimes permitted to be incomplete also. The name can be placed in double (") or single (') quotes to resolve ambiguities just in case, however it is probably unnecessary to do so, even if the name has spaces in it. | #The third part is the name of a font. The name is embedded in a font file. Usually a file has more than one name per font stored in the file. For non-English non-Unicode fonts there is often an [[ANSI]] name using the native language of the font as well as an [[ASCII]] name. Names are sometimes permitted to be incomplete also. The name can be placed in double (") or single (') quotes to resolve ambiguities just in case, however it is probably unnecessary to do so, even if the name has spaces in it. | ||
− | #The fourth part maps the typeface to one or more Unicode character ranges. It looks like ''U+0000-007F''. In this example the typeface is mapped to characters 0 through 127 or the ASCII character range. | + | #The fourth part maps the typeface to one or more Unicode character ranges. It looks like ''U+0000-007F''. In this example the typeface is mapped to characters 0 through 127 or the ASCII character range. |
+ | *{{anchor|id|identifier}}An "identifier" is a number that uses [[SomEx/list_of_numbers#id]] to encode one or more integer identifiers. Base 256 identifiers are commonly used to encode 24-bit/8-bits-per-component True Color values. These differ from extensions that accept a "hexadecimal colour code" in that the color cannot contain an "alpha" opacity component, and that its value can be changed in real-time; for instance by a game's internal logic. For example, ''id(255,0,0)'' expresses a pure red color. Note that all three numbers must be present, as the base is not explicitly expressed in this example. Refer to [[SomEx/list_of_numbers#id|id]]. | ||
</onlyinclude> | </onlyinclude> |
Revision as of 23:13, 21 September 2015
! |
Transcluded by Sword of Moonlight Extension Library / list of extensions. |
- An asterisk (*) indicates an extension is undocumented (within this page)
- A "binary statement" means a representation of 1 or 0. It may be the Arabic numerals 1 or 0, yes or no, on or off, and some additional semantical operations not elaborated upon here.
- A "string of text" means anything in your wildest imagination you can type into a text editor.
- A "language and country code pair" is an ISO-639 language code and ISO-3166 country code pair. For example Sword of Moonlight's pair is ja_JP for Japanese in Japan.
- As of 1.1.2.1 a "number" has a special meaning. Refer to SomEx/list_of_numbers and #Number. Additionally a number must be able to be reevaluated continuously. Meaning it can change at any time. It is a 32bit floating point value subject to calculations. Each extension places an upper and lower limit on its accepted values, and has a default behavior in case the number is a not-a-number value. Extensions can be further subdivided into the following older categories:
- A "real number" is Arabic digits with an optional decimal point. So named because they are the foil to "imaginary" numbers, even though there is nothing particularly real about a partial number. C style scientific notation will also probably work, but is not recommended.
- A "whole number" is Arabic digits no more no less. It can't represent a half of something for example.
- A positive real or whole number excludes negative numbers (elusive evil twin anti-numbers).
- A few extensions have been reclassified as numerals or numeric codes as they are not subject to continuous reevaluation.
- As for "hexadecimal", refer to Hexadecimal. Numerals a~f must be lowercase. Note: that these values no longer meet the requirements of #numbers.
- A "hexadecimal colour code" is a hexadecimal value (must be lowercase) which can include between 1 and 8 digits. Depending upon how many digits are provided the colour will be interpreted differently. Examples follow.
1 digit colour is one of 16 predefined brushes. The brushes are the same as a Microsoft Window's cmd.exe console.
2 digit colour is 4bit opacity + brush. Opacity ranges from 0 (fully transparent) to f (fully opaque).
3 digit colour is a 4bit RGB colour. Each colour plane ranges from 0 (black) to f (saturated).
4 digit colour is 4bit opacity + 4bit RGB colour.
5 digit colour is not allowed.
6 digit colour is an 8bit RGB colour. Each colour plane ranges from 00 (black) to ff (saturated).
7 digit colour is not allowed.
8 digit colour is 8bit opacity + 8bit RGB colour. Opacity ranges from 00 (fully transparent) to ff (fully opaque).
- A "keyboard key" is a context insensitive Direct Input Key code. Extended codes also exist; including ANALOG, JUMP, CORKSCREW, DASH, DUCK, and JOG. Extended codes must first be assigned to one or more of the #Keymap, #Keypad, #Button, or #Joypad extensions. The codes can be a 2 digit hexadecimal number or the ASCII identifier with the DIK_ part not included.
- A "keyboard macro" is a context sensitive combination and or sequence of #keyboard keys as described above. A complex macro syntax has not been forthcoming. Consequently only context-free single code macros can be described by the INI file for the time being. A keyboard macro can also be an alias. Refer to the #Action section for details.
- A "pseudo button" is a whole number greater than zero (0) representing the buttons on a human interface device or a virtual button when the number exceeds the number of buttons on a device. Game controllers use the Direct Input numbering shown in the Windows Control Panel. Non-button features, analog sticks and point-of-view hats for instance, are assigned pseudo buttons. Pseudo buttons are assigned keyboard macros.
- A "synthetic font" is a description of a hybrid font constructed out of one or more typefaces assigned to one or more Unicode character ranges. At present when there are multiple typefaces they must be separated by commas. A typeface has four parts separated by spaces. Each part is optional.
- The first part is a scale factor in the form of a percentage. It must be a positive whole number including a percent sign, ie. 120% scales the typeface by 120 percent.
- The second part is a number between 0 and 1000 that specifies the weight (or boldness) of the typeface. Sword of Moonlight uses 1000 or maximum boldness for its MS Mincho fonts.
- The third part is the name of a font. The name is embedded in a font file. Usually a file has more than one name per font stored in the file. For non-English non-Unicode fonts there is often an ANSI name using the native language of the font as well as an ASCII name. Names are sometimes permitted to be incomplete also. The name can be placed in double (") or single (') quotes to resolve ambiguities just in case, however it is probably unnecessary to do so, even if the name has spaces in it.
- The fourth part maps the typeface to one or more Unicode character ranges. It looks like U+0000-007F. In this example the typeface is mapped to characters 0 through 127 or the ASCII character range.
- An "identifier" is a number that uses SomEx/list_of_numbers#id to encode one or more integer identifiers. Base 256 identifiers are commonly used to encode 24-bit/8-bits-per-component True Color values. These differ from extensions that accept a "hexadecimal colour code" in that the color cannot contain an "alpha" opacity component, and that its value can be changed in real-time; for instance by a game's internal logic. For example, id(255,0,0) expresses a pure red color. Note that all three numbers must be present, as the base is not explicitly expressed in this example. Refer to id.