Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
78f7994976 | |||
8c7557e45d | |||
e51afb851c | |||
8661a5ca62 | |||
a83d494d45 | |||
d3aae9b262 | |||
b96550ab24 | |||
c6cad702bc |
@ -128,15 +128,15 @@ local function place_entities(pos)
|
||||
|
||||
for entity_name, props in pairs(ndef.display_entities) do
|
||||
local depth = clip_pos_prop(props.depth)
|
||||
local height = clip_pos_prop(props.height)
|
||||
local right = clip_pos_prop(props.right)
|
||||
local top = clip_pos_prop(props.top)
|
||||
if not objrefs[entity_name] then
|
||||
objrefs[entity_name] = minetest.add_entity(pos, entity_name)
|
||||
end
|
||||
|
||||
objrefs[entity_name]:setpos({
|
||||
x = pos.x - values.dx * depth + values.rx * right,
|
||||
y = pos.y + height,
|
||||
y = pos.y - top,
|
||||
z = pos.z - values.dz * depth + values.rz * right})
|
||||
|
||||
objrefs[entity_name]:setyaw(values.yaw)
|
||||
@ -268,4 +268,4 @@ minetest.register_lbm({
|
||||
})
|
||||
|
||||
-- Compatibility
|
||||
display_lib = display_api
|
||||
display_lib = display_api
|
||||
|
133
font_api/API.md
@ -4,65 +4,52 @@ This document describes Font Lib API. Font Lib creates textures for font display
|
||||
## Settings
|
||||
### default_font
|
||||
Name of the font to be used when no font is given. The font should be registered.
|
||||
|
||||
If no default\_font given or if default\_font given but not registered, the first registered font will be used as default.
|
||||
|
||||
## Provided methods
|
||||
### get\_text\_size
|
||||
**font\_lib.get\_text\_size(font\_name, text)**
|
||||
|
||||
Computes size for a given font and text
|
||||
### font_api.get_default_font_name()
|
||||
Returns de default font name.
|
||||
|
||||
**font\_name**: Font name of registered font to use
|
||||
**text**: Text to be rendered
|
||||
**Returns**: rendered text width, height
|
||||
### font_api.register_font(font_name, font_def)
|
||||
Register a new font.
|
||||
**font_name**: Name of the font to register. If registering different sizes of the same font, add size in the font name (e.g. times_10, times_12...).
|
||||
**font_def**: Font definition table (see **Font definition table** below).
|
||||
|
||||
### make\_line\_texture
|
||||
**font\_lib.make\_line\_texture(font\_name, text, width, x, y)**
|
||||
### font_api.on_display_update(pos, objref)
|
||||
Standard on_display_update entity callback.
|
||||
|
||||
Builds texture part for a text line
|
||||
**pos**: Node position
|
||||
|
||||
**font\_name**: Font name of registered font to use
|
||||
**text**: Text to be rendered
|
||||
**texturew**: Width of the texture (extra text is not rendered)
|
||||
**x**: Starting x position in texture
|
||||
**y**: Vertical position of the line in texture
|
||||
**Returns**: Texture string
|
||||
**objref**: Object reference of entity
|
||||
|
||||
### make\_multiline\_texture
|
||||
**font\_lib.make\_multiline\_texture(font\_name, text, width, height, maxlines, halign, valign, color)**
|
||||
Node should have a corresponding display_entity with size, resolution and maxlines fields and optionally halign, valign and color fields.
|
||||
|
||||
Builds texture for a multiline colored text
|
||||
### Font definition table
|
||||
Font definition table used by **font_api.register_font** and **font\_api.Font:new** may/can contain following elements:
|
||||
|
||||
**font\_name**: Font name of registered font to use
|
||||
**text**: Text to be rendered
|
||||
**texturew**: Width of the texture (extra text will be truncated)
|
||||
**textureh**: Height of the texture
|
||||
**maxlines**: Maximum number of lines
|
||||
**halign**: Horizontal text align ("left", "right" or "center") (optional)
|
||||
**valign**: Vertical text align ("top", "bottom" or "center") (optional)
|
||||
**color**: Color of the text (optional)
|
||||
**Returns**: Texture string
|
||||
* **height** (required): Font height in pixels (all font textures should have the same height) .
|
||||
* **widths** (required): Array of character widths in pixels, indexed by UTF codepoints.
|
||||
* **margintop** (optional): Margin (in texture pixels) added on top of each char texture.
|
||||
* **marginbottom** (optional): Margin (in texture pixels) added at bottom of each char texture.
|
||||
* **linespacing** (optional): Spacing (in texture pixels) between each lines.
|
||||
|
||||
### register\_font
|
||||
**font\_lib.register_font(font\_name, height, widths)**
|
||||
|
||||
Registers a new font in font_api.
|
||||
|
||||
**font\_name**: Name of the font to register (this name will be used to address the font later)
|
||||
If registering different sizes of the same font, add size in the font name (e.g. times\_10, times\_12...).
|
||||
**height**: Font height in pixels (all font textures should have the same height)
|
||||
**widths** : Array of character widths in pixels, indexed by UTF codepoints
|
||||
**margintop**, **marginbottom** and **linespacing** can be negative numbers (default 0) and are to be used to adjust various font styles to each other.
|
||||
|
||||
Font must have a char 0 which will be used to display any unknown char.
|
||||
|
||||
All textures corresponding to the indexes in **widths** array should be present in textures directory with a name matching the pattern :
|
||||
All textures corresponding to the indexes in widths array should be present in textures directory with a name matching the pattern :
|
||||
|
||||
**font\_<font\_name>_<utf\_code>.png**
|
||||
> font\_**{font_name}**_**{utf_code}**.png
|
||||
|
||||
**<font\_name>**: Name of the font as given in the first argument
|
||||
**<utf\_code>**: UTF code of the char in 4 hexadecimal digits
|
||||
**{font\_name}**: Name of the font as given in the first argument
|
||||
|
||||
To ease that declaration, a shell is provided to build a <font\_name>.lua file from the texture files (see provided tools).
|
||||
**{utf\_code}**: UTF code of the char in 4 hexadecimal digits
|
||||
|
||||
Example : font_courrier_0041.png is for the "A" char in the "courrier" font.
|
||||
|
||||
To ease that declaration (specially to build the **widths** array), a shell is provided to build a {font\_name}.lua file from the texture files (see provided tools).
|
||||
|
||||
## Provided tools
|
||||
|
||||
@ -78,23 +65,23 @@ This script works much better with pixels font, providing the correct height. Th
|
||||
|
||||
__Syntax__
|
||||
|
||||
**make\_font\_texture.sh <fontfile> <fontname> <fontsize>**
|
||||
**make\_font\_texture.sh {fontfile} {fontname} {fontsize}**
|
||||
|
||||
**<fontfile>**: A TTF font file to use to create textures.
|
||||
**<fontname>**: The font name to be used in font_api (should be simple, with no spaces).
|
||||
**<fontsize>**: Font height to be rendered.
|
||||
**{fontfile}**: A TTF font file to use to create textures.
|
||||
**{fontname}**: The font name to be used in font_api (should be simple, with no spaces).
|
||||
**{fontsize}**: Font height to be rendered.
|
||||
|
||||
### make_font_lua.sh
|
||||
|
||||
This script analyses textures in textures directory and creates a font\_<font\_name>.lua files with a call to register_font with images information. Launch it from your future font mod directory.
|
||||
This script analyses textures in textures directory and creates a font\_{font\_name}.lua files with a call to register_font with images information. Launch it from your future font mod directory.
|
||||
|
||||
Once the font\_<font\_name>.lua created, it can be included by a init.lua file or directly renamed to init.lua if you are creating a simple font mod.
|
||||
Once the font\_{font\_name}.lua created, it can be included by a init.lua file or directly renamed to init.lua if you are creating a simple font mod.
|
||||
|
||||
__Syntax__
|
||||
|
||||
**make\_font_lua.sh <fontname>**
|
||||
**make\_font_lua.sh {fontname}**
|
||||
|
||||
**<fontname>**: The font name to be used in font_api (same as given to make\_font\_texture.sh)
|
||||
**{fontname}**: The font name to be used in font_api (same as given to make\_font\_texture.sh)
|
||||
|
||||
### An exemple generating a font mod
|
||||
|
||||
@ -104,7 +91,55 @@ __Syntax__
|
||||
/<path_to_font_api>/tools/make_font_lua.sh myfont
|
||||
mv font_myfont.lua init.lua
|
||||
|
||||
## Font class
|
||||
A font usable with font API. This class is supposed to be for internal use but who knows.
|
||||
|
||||
### font\_api.Font:new(def)
|
||||
Create a new font object.
|
||||
|
||||
**def** is a table containing font definition. See **Font definition table** above.
|
||||
|
||||
### font:get_char_width(char)
|
||||
Returns the width of char **char** in texture pixels.
|
||||
|
||||
**char**: Unicode codepoint of char.
|
||||
|
||||
### font:get_height(nb_of_lines)
|
||||
Returns line(s) height. Takes care of top and bottom margins and line spacing.
|
||||
|
||||
**nb_of_lines**: Number of lines in the text.
|
||||
|
||||
### font:get_width(line)
|
||||
|
||||
Returns the width of a text line. Beware, if line contains any new line char, they are ignored.
|
||||
|
||||
**line**: Line of text which the width will be computed.
|
||||
|
||||
### font:make_line_texture(line, texturew, x, y)
|
||||
Create a texture for a text line.
|
||||
|
||||
**line**: Line of text to be rendered in texture.
|
||||
|
||||
**texturew**: Width of the texture (extra text is not rendered).
|
||||
|
||||
**x**: Starting x position in texture.
|
||||
|
||||
**y**: Vertical position of the line in texture.
|
||||
|
||||
### font:make_text_texture(text, texturew, textureh, maxlines, halign, valign, color)
|
||||
Builds texture for a multiline colored text.
|
||||
|
||||
**text**: Text to be rendered.
|
||||
|
||||
**texturew**: Width of the texture (extra text will be truncated).
|
||||
|
||||
**textureh**: Height of the texture.
|
||||
|
||||
**maxlines**: Maximum number of lines.
|
||||
|
||||
**halign**: Horizontal text align ("left"/"center"/"right") (optional).
|
||||
|
||||
**valign**: Vertical text align ("top"/"center"/"bottom") (optional).
|
||||
|
||||
**color**: Color of the text (optional).
|
||||
|
||||
|
463
font_api/doc/font.svg
Normal file
@ -0,0 +1,463 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="120mm"
|
||||
height="110mm"
|
||||
viewBox="0 0 120 110"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
|
||||
sodipodi:docname="font.svg">
|
||||
<defs
|
||||
id="defs2">
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="marker7159"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path7157"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="marker7071"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path7069"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.4,0,0,0.4,4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mend"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path886"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mstart"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path883"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.4,0,0,0.4,4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path880"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path877"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-3"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-6"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-7"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-5"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-9"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-2"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-7"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-9-9"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-1-3"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-2-6"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-7-0"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-1"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-2"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-9"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-3"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-94"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-7"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-8"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-4"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-151.37352"
|
||||
inkscape:cy="445.54867"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="g8201"
|
||||
showgrid="true"
|
||||
inkscape:lockguides="true"
|
||||
inkscape:window-width="1877"
|
||||
inkscape:window-height="1052"
|
||||
inkscape:window-x="1409"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid826"
|
||||
spacingx="1"
|
||||
units="mm"
|
||||
spacingy="1" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-187)">
|
||||
<g
|
||||
id="g7357"
|
||||
transform="translate(65,-15)"
|
||||
style="opacity:0.5">
|
||||
<rect
|
||||
y="202"
|
||||
x="170"
|
||||
height="70"
|
||||
width="70"
|
||||
id="rect828-9"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:0.25098039;fill-rule:nonzero;stroke:#999999;stroke-width:0.30550504;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
d="m 220,252 h 10 v 10 h -10 z m -50,0 h 10 v 10 h -10 z m 5,-10 h 50 v 10 h -50 z m 4.99998,-10 h 10 v 10 h -10 z M 210,232 h 10 v 10 h -10 z m -5,-10 h 10 v 10 h -10 z m -20,0 h 10 v 10 h -10 z m 5,-10.00002 h 20 v 10 H 190 Z M 195,202 h 10 v 10 h -10 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32659864;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect854-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g8201"
|
||||
transform="translate(0,190)">
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499998, 1.05999994;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect1594"
|
||||
width="120"
|
||||
height="109.99999"
|
||||
x="0"
|
||||
y="-3" />
|
||||
<g
|
||||
transform="translate(-75,-120)"
|
||||
id="g7361">
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#0000ff;fill-opacity:0.25098039;fill-rule:nonzero;stroke:#0000ff;stroke-width:0.30550504;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect828"
|
||||
width="70"
|
||||
height="70"
|
||||
x="100"
|
||||
y="137" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect854"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#0000ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32659864;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 150,187 h 10 v 10 h -10 z m -50,0 h 10 v 10 h -10 z m 5,-10 h 50 v 10 h -50 z m 4.99999,-10 h 10 v 10 h -10 z M 140,167 h 10 v 10 h -10 z m -5,-10 h 10 v 10 h -10 z m -20,0 h 10 v 10 h -10 z m 5,-10.00002 h 20 v 10 H 120 Z M 125,137 h 10 v 10 h -10 z" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875"
|
||||
d="M 19.999999,17 V 87"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)" />
|
||||
<text
|
||||
inkscape:transform-center-y="5.2916667"
|
||||
inkscape:transform-center-x="1.889881"
|
||||
transform="rotate(-90)"
|
||||
id="text1193"
|
||||
y="17.496948"
|
||||
x="-52.43602"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="17.496948"
|
||||
x="-52.43602"
|
||||
id="tspan1191"
|
||||
sodipodi:role="line">Texture Height</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-3"
|
||||
d="M 95,97 H 25"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart-3);marker-end:url(#Arrow1Lend-7)" />
|
||||
<text
|
||||
inkscape:transform-center-y="-1.8898824"
|
||||
inkscape:transform-center-x="5.2916602"
|
||||
id="text1193-5"
|
||||
y="101.69528"
|
||||
x="60.176346"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="101.69528"
|
||||
x="60.176346"
|
||||
id="tspan1191-6"
|
||||
sodipodi:role="line">Texture Width</tspan></text>
|
||||
<rect
|
||||
y="7"
|
||||
x="25"
|
||||
height="85"
|
||||
width="70"
|
||||
id="rect828-2"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ff00ff;stroke-width:0.33665016;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-0"
|
||||
d="M 20,7 V 17"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker7071);marker-end:url(#marker7159)" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-0-6"
|
||||
d="m 20,87 v 5"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend)" />
|
||||
<text
|
||||
inkscape:transform-center-y="-1.8898824"
|
||||
inkscape:transform-center-x="5.2916678"
|
||||
id="text1193-2"
|
||||
y="10.614426"
|
||||
x="17.348068"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="10.614426"
|
||||
x="17.348068"
|
||||
id="tspan1191-61"
|
||||
sodipodi:role="line">Margin</tspan><tspan
|
||||
id="tspan8103"
|
||||
style="text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="15.575363"
|
||||
x="17.348068"
|
||||
sodipodi:role="line">Top</tspan></text>
|
||||
<text
|
||||
inkscape:transform-center-y="-1.8898824"
|
||||
inkscape:transform-center-x="5.2916678"
|
||||
id="text1193-2-8"
|
||||
y="88.4991"
|
||||
x="17.240334"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="88.4991"
|
||||
x="18.503822"
|
||||
id="tspan1191-61-7"
|
||||
sodipodi:role="line">Margin </tspan><tspan
|
||||
id="tspan8105"
|
||||
style="text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="93.460037"
|
||||
x="17.240334"
|
||||
sodipodi:role="line">Bottom</tspan></text>
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-1"
|
||||
d="M 100,7 V 92"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart-1);marker-end:url(#Arrow1Lend-9)" />
|
||||
<text
|
||||
inkscape:transform-center-y="5.2916667"
|
||||
inkscape:transform-center-x="1.889881"
|
||||
transform="rotate(-90)"
|
||||
id="text1193-0"
|
||||
y="104.35954"
|
||||
x="-49.646301"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="104.35954"
|
||||
x="-49.646301"
|
||||
id="tspan1191-3"
|
||||
sodipodi:role="line">Line Height</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 20 KiB |
544
font_api/doc/lines.svg
Normal file
@ -0,0 +1,544 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="120mm"
|
||||
height="225mm"
|
||||
viewBox="0 0 120 225"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
|
||||
sodipodi:docname="lines.svg">
|
||||
<defs
|
||||
id="defs2">
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="marker7159"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path7157"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="marker7071"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path7069"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.4,0,0,0.4,4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mend"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path886"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mstart"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path883"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.4,0,0,0.4,4,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path880"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
id="path877"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-3"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-6"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-7"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-5"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-9"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-2"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-7"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-9-9"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-1-3"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-2-6"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-7-0"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-1"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-2"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-9"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-3"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-94"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-7"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-8"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-4"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-1-2"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-2-0"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-9-6"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-3-1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart-1-5"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877-2-4"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend-9-7"
|
||||
style="overflow:visible"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path880-3-6"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="577.84911"
|
||||
inkscape:cy="466.83879"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:lockguides="true"
|
||||
inkscape:window-width="1877"
|
||||
inkscape:window-height="1052"
|
||||
inkscape:window-x="1409"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid826"
|
||||
spacingx="1"
|
||||
units="mm"
|
||||
spacingy="1" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-72)">
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499998, 1.05999993999999997;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect890"
|
||||
width="120"
|
||||
height="224.99998"
|
||||
x="0"
|
||||
y="72" />
|
||||
<g
|
||||
id="g10629"
|
||||
transform="translate(-5,-54.999998)">
|
||||
<g
|
||||
id="g8263">
|
||||
<g
|
||||
transform="translate(-40,39.999996)"
|
||||
id="g8268">
|
||||
<rect
|
||||
y="102"
|
||||
x="60"
|
||||
height="70"
|
||||
width="70"
|
||||
id="rect828-9"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:0.25098039;fill-rule:nonzero;stroke:#999999;stroke-width:0.30550504;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
d="m 110,152 h 10 v 10 h -10 z m -50,0 h 10 v 10 H 60 Z m 5,-10 h 50 v 10 H 65 Z m 4.99998,-10 h 10 v 10 h -10 z M 100,132 h 10 v 10 h -10 z m -5,-10 h 10 v 10 H 95 Z m -20,0 h 10 v 10 H 75 Z m 5,-10.00002 h 20 v 10 H 80 Z M 85,102 h 10 v 10 H 85 Z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32659864;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect854-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
y="92"
|
||||
x="60"
|
||||
height="85.000008"
|
||||
width="70"
|
||||
id="rect828-2-6"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:0.33665016;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-40,170)"
|
||||
id="g8268-1">
|
||||
<rect
|
||||
y="102"
|
||||
x="60"
|
||||
height="70"
|
||||
width="70"
|
||||
id="rect828-9-0"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:0.25098039;fill-rule:nonzero;stroke:#999999;stroke-width:0.30550504;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
d="m 110,152 h 10 v 10 h -10 z m -50,0 h 10 v 10 H 60 Z m 5,-10 h 50 v 10 H 65 Z m 4.99998,-10 h 10 v 10 h -10 z M 100,132 h 10 v 10 h -10 z m -5,-10 h 10 v 10 H 95 Z m -20,0 h 10 v 10 H 75 Z m 5,-10.00002 h 20 v 10 H 80 Z M 85,102 h 10 v 10 H 85 Z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32659864;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect854-2-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
y="92"
|
||||
x="60"
|
||||
height="85.000008"
|
||||
width="70"
|
||||
id="rect828-2-6-3"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:0.33665016;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-75,70)"
|
||||
id="g7361">
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#0000ff;fill-opacity:0.25098039;fill-rule:nonzero;stroke:#0000ff;stroke-width:0.30550504;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect828"
|
||||
width="70"
|
||||
height="70"
|
||||
x="100"
|
||||
y="137" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect854"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#0000ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32659864;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 150,187 h 10 v 10 h -10 z m -50,0 h 10 v 10 h -10 z m 5,-10 h 50 v 10 h -50 z m 4.99999,-10 h 10 v 10 h -10 z M 140,167 h 10 v 10 h -10 z m -5,-10 h 10 v 10 h -10 z m -20,0 h 10 v 10 h -10 z m 5,-10.00002 h 20 v 10 H 120 Z M 125,137 h 10 v 10 h -10 z" />
|
||||
</g>
|
||||
<rect
|
||||
y="197"
|
||||
x="25"
|
||||
height="85"
|
||||
width="70"
|
||||
id="rect828-2"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.98000004;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ff00ff;stroke-width:0.33665016;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-1"
|
||||
d="m 100,197 v 85"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart-1);marker-end:url(#Arrow1Lend-9)" />
|
||||
<text
|
||||
inkscape:transform-center-y="5.2916667"
|
||||
inkscape:transform-center-x="1.889881"
|
||||
transform="rotate(-90)"
|
||||
id="text1193-0"
|
||||
y="104.35954"
|
||||
x="-239.6463"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="104.35954"
|
||||
x="-239.6463"
|
||||
id="tspan1191-3"
|
||||
sodipodi:role="line">Line Height</tspan></text>
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-1-5"
|
||||
d="m 15,197 v 20"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart-1-2);marker-end:url(#Arrow1Lend-9-6)" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path875-1-56"
|
||||
d="M 110,132 V 347"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart-1-5);marker-end:url(#Arrow1Lend-9-7)" />
|
||||
<text
|
||||
inkscape:transform-center-y="5.2916667"
|
||||
inkscape:transform-center-x="1.889881"
|
||||
transform="rotate(-90)"
|
||||
id="text1193-0-9"
|
||||
y="115.82679"
|
||||
x="-239.6463"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="115.82679"
|
||||
x="-239.6463"
|
||||
id="tspan1191-3-3"
|
||||
sodipodi:role="line">Text Height</tspan></text>
|
||||
<text
|
||||
inkscape:transform-center-y="5.2916667"
|
||||
inkscape:transform-center-x="1.889881"
|
||||
transform="rotate(-90)"
|
||||
id="text1193-0-7"
|
||||
y="11.713711"
|
||||
x="-206.76294"
|
||||
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke-width:0.26458332px"
|
||||
y="11.713711"
|
||||
x="-206.76294"
|
||||
id="tspan1191-3-4"
|
||||
sodipodi:role="line">Line Spacing</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10512"
|
||||
d="M 25,197 H 15 v 0"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 1.05999996;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10512-5"
|
||||
d="M 25,217 H 15 v 0"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 1.05999996;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10512-2"
|
||||
d="M 110,132 H 90"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 1.05999996;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10512-2-5"
|
||||
d="M 110,347 H 90"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 1.05999997;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10512-2-5-4"
|
||||
d="M 100,282 H 95"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 1.05999998;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10512-2-5-4-7"
|
||||
d="M 100,197 H 95"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 1.05999999;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 25 KiB |
267
font_api/font.lua
Normal file
@ -0,0 +1,267 @@
|
||||
--[[
|
||||
font_api mod for Minetest - Library to add font display capability
|
||||
to display_api mod.
|
||||
(c) Pierre-Yves Rollo
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
-- Local functions
|
||||
------------------
|
||||
|
||||
-- Table deep copy
|
||||
|
||||
local function deep_copy(input)
|
||||
local output = {}
|
||||
local key, value
|
||||
for key, value in pairs(input) do
|
||||
if type(value) == 'table' then
|
||||
output[key] = deep_copy(value)
|
||||
else
|
||||
output[key] = value
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
-- Returns next char, managing ascii and unicode plane 0 (0000-FFFF).
|
||||
|
||||
local function get_next_char(text, pos)
|
||||
|
||||
local msb = text:byte(pos)
|
||||
-- 1 byte char, ascii equivalent codepoints
|
||||
if msb < 0x80 then
|
||||
return msb, pos + 1
|
||||
end
|
||||
|
||||
-- 4 bytes char not managed (Only 16 bits codepoints are managed)
|
||||
if msb >= 0xF0 then
|
||||
return 0, pos + 4
|
||||
end
|
||||
|
||||
-- 3 bytes char
|
||||
if msb >= 0xE0 then
|
||||
return (msb - 0xE0) * 0x1000
|
||||
+ text:byte(pos + 1) % 0x40 * 0x40
|
||||
+ text:byte(pos + 2) % 0x40,
|
||||
pos + 3
|
||||
end
|
||||
|
||||
-- 2 bytes char (little endian)
|
||||
if msb >= 0xC2 then
|
||||
return (msb - 0xC2) * 0x40 + text:byte(pos + 1),
|
||||
pos + 2
|
||||
end
|
||||
|
||||
-- Not an UTF char
|
||||
return 0, pos + 1
|
||||
end
|
||||
|
||||
-- Split multiline text into array of lines, with <maxlines> maximum lines.
|
||||
|
||||
local function split_lines(text, maxlines)
|
||||
local splits = text:split("\n")
|
||||
if maxlines then
|
||||
local lines = {}
|
||||
for num = 1,maxlines do
|
||||
lines[num] = splits[num]
|
||||
end
|
||||
return lines
|
||||
else
|
||||
return splits
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--- Font class
|
||||
|
||||
font_api.Font = {}
|
||||
|
||||
function font_api.Font:new(def)
|
||||
|
||||
if type(def) ~= "table" then
|
||||
minetest.log("error", "Font definition must be a table.")
|
||||
return nil
|
||||
end
|
||||
|
||||
if def.height == nil or def.height <= 0 then
|
||||
minetest.log("error", "Font definition must have a positive height.")
|
||||
return nil
|
||||
end
|
||||
|
||||
if type(def.widths) ~= "table" then
|
||||
minetest.log("error", "Font definition must have a widths array.")
|
||||
return nil
|
||||
end
|
||||
|
||||
if def.widths[0] == nil then
|
||||
minetest.log("error",
|
||||
"Font must have a char with codepoint 0 (=unknown char).")
|
||||
return nil
|
||||
end
|
||||
|
||||
local font = deep_copy(def)
|
||||
setmetatable(font, self)
|
||||
self.__index = self
|
||||
return font
|
||||
end
|
||||
|
||||
--- Returns the width of a given char
|
||||
-- @param char : codepoint of the char
|
||||
-- @return Char width
|
||||
|
||||
function font_api.Font:get_char_width(char)
|
||||
-- Replace chars with no texture by the NULL(0) char
|
||||
if self.widths[char] ~= nil then
|
||||
return self.widths[char]
|
||||
else
|
||||
return self.widths[0]
|
||||
end
|
||||
end
|
||||
|
||||
--- Text height for multiline text including margins and line spacing
|
||||
-- @param nb_of_lines : number of text lines (default 1)
|
||||
-- @return Text height
|
||||
|
||||
function font_api.Font:get_height(nb_of_lines)
|
||||
if nb_of_lines == nil then nb_of_lines = 1 end
|
||||
|
||||
if nb_of_lines > 0 then
|
||||
return
|
||||
(
|
||||
(self.height or 0) +
|
||||
(self.margintop or 0) +
|
||||
(self.marginbottom or 0)
|
||||
) * nb_of_lines +
|
||||
(self.linespacing or 0) * (nb_of_lines -1)
|
||||
else
|
||||
return nb_of_lines == 0 and 0 or nil
|
||||
end
|
||||
end
|
||||
|
||||
--- Computes text width for a given text (ignores new lines)
|
||||
-- @param line Line of text which the width will be computed.
|
||||
-- @return Text width
|
||||
|
||||
function font_api.Font:get_width(line)
|
||||
|
||||
local char
|
||||
local width = 0
|
||||
local pos = 1
|
||||
|
||||
-- TODO: Use iterator
|
||||
while pos <= #line do
|
||||
char, pos = get_next_char(line, pos)
|
||||
width = width + self:get_char_width(char)
|
||||
end
|
||||
|
||||
return width
|
||||
end
|
||||
|
||||
--- Builds texture part for a text line
|
||||
-- @param line Text line to be rendered
|
||||
-- @param texturew Width of the texture (extra text is not rendered)
|
||||
-- @param x Starting x position in texture
|
||||
-- @param y Vertical position of the line in texture
|
||||
-- @return Texture string
|
||||
|
||||
function font_api.Font:make_line_texture(line, texturew, x, y)
|
||||
local texture = ""
|
||||
local char
|
||||
local pos = 1
|
||||
|
||||
-- TODO: Use iterator
|
||||
while pos <= #line do
|
||||
char, pos = get_next_char(line, pos)
|
||||
|
||||
-- Replace chars with no texture by the NULL(0) char
|
||||
if self.widths[char] == nil
|
||||
or char == 88
|
||||
then
|
||||
print(string.format("["..font_api.name
|
||||
.."] Missing char %d (%04x)",char,char))
|
||||
char = 0
|
||||
end
|
||||
|
||||
-- Add image only if it is visible (at least partly)
|
||||
if x + self.widths[char] >= 0 and x <= texturew then
|
||||
texture = texture..
|
||||
string.format(":%d,%d=font_%s_%04x.png",
|
||||
x, y, self.name, char)
|
||||
end
|
||||
x = x + self.widths[char]
|
||||
end
|
||||
|
||||
return texture
|
||||
end
|
||||
|
||||
--- Builds texture for a multiline colored text
|
||||
-- @param text Text to be rendered
|
||||
-- @param texturew Width of the texture (extra text will be truncated)
|
||||
-- @param textureh Height of the texture
|
||||
-- @param maxlines Maximum number of lines
|
||||
-- @param halign Horizontal text align ("left"/"center"/"right") (optional)
|
||||
-- @param valign Vertical text align ("top"/"center"/"bottom") (optional)
|
||||
-- @param color Color of the text (optional)
|
||||
-- @return Texture string
|
||||
|
||||
function font_api.Font:make_text_texture(text, texturew, textureh, maxlines,
|
||||
halign, valign, color)
|
||||
local texture = ""
|
||||
local lines = {}
|
||||
local textheight = 0
|
||||
local y
|
||||
|
||||
-- Split text into lines (limited to maxlines fist lines)
|
||||
for num, line in pairs(split_lines(text, maxlines)) do
|
||||
lines[num] = { text = line, width = self:get_width(line) }
|
||||
end
|
||||
|
||||
textheight = self:get_height(#lines)
|
||||
|
||||
if #lines then
|
||||
if valign == "top" then
|
||||
y = 0
|
||||
elseif valign == "bottom" then
|
||||
y = textureh - textheight
|
||||
else
|
||||
y = (textureh - textheight) / 2
|
||||
end
|
||||
end
|
||||
|
||||
y = y + (self.margintop or 0)
|
||||
|
||||
for _, line in pairs(lines) do
|
||||
if halign == "left" then
|
||||
texture = texture..
|
||||
self:make_line_texture(line.text, texturew,
|
||||
0, y)
|
||||
elseif halign == "right" then
|
||||
texture = texture..
|
||||
self:make_line_texture(line.text, texturew,
|
||||
texturew - line.width, y)
|
||||
else
|
||||
texture = texture..
|
||||
self:make_line_texture(line.text, texturew,
|
||||
(texturew - line.width) / 2, y)
|
||||
end
|
||||
|
||||
y = y + self:get_height() + (self.linespacing or 0)
|
||||
end
|
||||
|
||||
texture = string.format("[combine:%dx%d", texturew, textureh)..texture
|
||||
if color then texture = texture.."^[colorize:"..color end
|
||||
return texture
|
||||
end
|
||||
|
@ -23,293 +23,12 @@
|
||||
font_api = {}
|
||||
font_api.name = minetest.get_current_modname()
|
||||
font_api.path = minetest.get_modpath(font_api.name)
|
||||
font_api.registered_fonts = {}
|
||||
|
||||
-- Local variables
|
||||
------------------
|
||||
-- Inclusions
|
||||
-------------
|
||||
|
||||
local default_font = false
|
||||
|
||||
-- Local functions
|
||||
------------------
|
||||
|
||||
-- Split multiline text into array of lines, with <maxlines> maximum lines.
|
||||
|
||||
local function split_lines(text, maxlines)
|
||||
local splits = text:split("\n")
|
||||
if maxlines then
|
||||
local lines = {}
|
||||
for num = 1,maxlines do
|
||||
lines[num] = splits[num]
|
||||
end
|
||||
return lines
|
||||
else
|
||||
return splits
|
||||
end
|
||||
end
|
||||
|
||||
-- Gets a default (settings or fist font)
|
||||
|
||||
local function get_default_font()
|
||||
-- First call
|
||||
if default_font == false then
|
||||
default_font = nil
|
||||
|
||||
-- First, try with settings
|
||||
local settings_font = minetest.settings:get("default_font")
|
||||
|
||||
if settings_font ~= nil and settings_font ~= "" then
|
||||
default_font = font_api.registered_fonts[settings_font]
|
||||
|
||||
if default_font == nil then
|
||||
minetest.log("warning", "Default font in settings (\""..
|
||||
settings_font.."\") is not registered.")
|
||||
end
|
||||
end
|
||||
|
||||
-- If failed, choose first font
|
||||
if default_font == nil then
|
||||
for _, font in pairs(font_api.registered_fonts) do
|
||||
default_font = font
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- Error, no font registered
|
||||
if default_font == nil then
|
||||
minetest.log("error",
|
||||
"No font registred, unable to choose a default font.")
|
||||
end
|
||||
end
|
||||
|
||||
return default_font
|
||||
end
|
||||
|
||||
-- Returns font properties to be used according to font_name
|
||||
|
||||
local function get_font(font_name)
|
||||
local font = font_api.registered_fonts[font_name]
|
||||
|
||||
if font == nil then
|
||||
local message
|
||||
|
||||
if font_name == nil then
|
||||
message = "No font given"
|
||||
else
|
||||
message = "Font \""..font_name.."\" unregistered"
|
||||
end
|
||||
|
||||
font = get_default_font()
|
||||
|
||||
if font ~= nil then
|
||||
minetest.log("info", message..", using font \""..font.name.."\".")
|
||||
end
|
||||
end
|
||||
|
||||
return font
|
||||
end
|
||||
|
||||
-- Returns next char, managing ascii and unicode plane 0 (0000-FFFF).
|
||||
|
||||
local function get_next_char(text, pos)
|
||||
|
||||
local msb = text:byte(pos)
|
||||
-- 1 byte char, ascii equivalent codepoints
|
||||
if msb < 0x80 then
|
||||
return msb, pos + 1
|
||||
end
|
||||
|
||||
-- 4 bytes char not managed (Only 16 bits codepoints are managed)
|
||||
if msb >= 0xF0 then
|
||||
return 0, pos + 4
|
||||
end
|
||||
|
||||
-- 3 bytes char
|
||||
if msb >= 0xE0 then
|
||||
return (msb - 0xE0) * 0x1000
|
||||
+ text:byte(pos + 1) % 0x40 * 0x40
|
||||
+ text:byte(pos + 2) % 0x40,
|
||||
pos + 3
|
||||
end
|
||||
|
||||
-- 2 bytes char (little endian)
|
||||
if msb >= 0xC2 then
|
||||
return (msb - 0xC2) * 0x40 + text:byte(pos + 1),
|
||||
pos + 2
|
||||
end
|
||||
|
||||
-- Not an UTF char
|
||||
return 0, pos + 1
|
||||
end
|
||||
|
||||
-- API functions
|
||||
----------------
|
||||
|
||||
-- Computes text size for a given font and text (ignores new lines)
|
||||
-- @param font_name Font to be used
|
||||
-- @param text Text to be rendered
|
||||
-- @return Rendered text (width, height)
|
||||
|
||||
function font_api.get_text_size(font_name, text)
|
||||
local char
|
||||
local width = 0
|
||||
local pos = 1
|
||||
local font = get_font(font_name)
|
||||
|
||||
if font == nil then
|
||||
return 0, 0
|
||||
else
|
||||
while pos <= #text do
|
||||
char, pos = get_next_char(text, pos)
|
||||
-- Replace chars with no texture by the NULL(0) char
|
||||
if font.widths[char] ~= nil then
|
||||
width = width + font.widths[char]
|
||||
else
|
||||
width = width + font.widths[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return width, font.height
|
||||
end
|
||||
|
||||
--- Builds texture part for a text line
|
||||
-- @param font_name Font to be used
|
||||
-- @param text Text to be rendered
|
||||
-- @param width Width of the texture (extra text is not rendered)
|
||||
-- @param x Starting x position in texture
|
||||
-- @param y Vertical position of the line in texture
|
||||
-- @return Texture string
|
||||
|
||||
function font_api.make_line_texture(font_name, text, width, x, y)
|
||||
local texture = ""
|
||||
local char
|
||||
local pos = 1
|
||||
local font = get_font(font_name)
|
||||
|
||||
if font ~= nil then
|
||||
while pos <= #text do
|
||||
char, pos = get_next_char(text, pos)
|
||||
|
||||
-- Replace chars with no texture by the NULL(0) char
|
||||
if font.widths[char] == nil then
|
||||
print(string.format("["..font_api.name
|
||||
.."] Missing char %d (%04x)",char,char))
|
||||
char = 0
|
||||
end
|
||||
|
||||
-- Add image only if it is visible (at least partly)
|
||||
if x + font.widths[char] >= 0 and x <= width then
|
||||
texture = texture..
|
||||
string.format(":%d,%d=font_%s_%04x.png",
|
||||
x, y, font.name, char)
|
||||
end
|
||||
x = x + font.widths[char]
|
||||
end
|
||||
end
|
||||
|
||||
return texture
|
||||
end
|
||||
|
||||
--- Builds texture for a multiline colored text
|
||||
-- @param font_name Font to be used
|
||||
-- @param text Text to be rendered
|
||||
-- @param texturew Width of the texture (extra text will be truncated)
|
||||
-- @param textureh Height of the texture
|
||||
-- @param maxlines Maximum number of lines
|
||||
-- @param halign Horizontal text align ("left"/"center"/"right") (optional)
|
||||
-- @param valign Vertical text align ("top"/"center"/"bottom") (optional)
|
||||
-- @param color Color of the text (optional)
|
||||
-- @return Texture string
|
||||
|
||||
function font_api.make_multiline_texture(font_name, text, width, height,
|
||||
maxlines, halign, valign, color)
|
||||
local texture = ""
|
||||
local lines = {}
|
||||
local textheight = 0
|
||||
local y, w, h
|
||||
|
||||
for num, line in pairs(split_lines(text, maxlines)) do
|
||||
w, h = font_api.get_text_size(font_name, line)
|
||||
lines[num] = { text = line, width = w, height = h, }
|
||||
textheight = textheight + h
|
||||
end
|
||||
|
||||
if #lines then
|
||||
if valign == "top" then
|
||||
y = 0
|
||||
elseif valign == "bottom" then
|
||||
y = height - textheight
|
||||
else
|
||||
y = (height - textheight) / 2
|
||||
end
|
||||
end
|
||||
|
||||
for _, line in pairs(lines) do
|
||||
if halign == "left" then
|
||||
texture = texture..
|
||||
font_api.make_line_texture(font_name, line.text, width,
|
||||
0, y)
|
||||
elseif halign == "right" then
|
||||
texture = texture..
|
||||
font_api.make_line_texture(font_name, line.text, width,
|
||||
width - line.width, y)
|
||||
else
|
||||
texture = texture..
|
||||
font_api.make_line_texture(font_name, line.text, width,
|
||||
(width - line.width) / 2, y)
|
||||
end
|
||||
y = y + line.height
|
||||
end
|
||||
|
||||
texture = string.format("[combine:%dx%d", width, height)..texture
|
||||
if color then texture = texture.."^[colorize:"..color end
|
||||
return texture
|
||||
end
|
||||
|
||||
--- Register a new font
|
||||
-- Textures corresponding to the font should be named after following patern :
|
||||
-- font_<name>_<code>.png
|
||||
-- <name> : name of the font
|
||||
-- <code> : 4 digit hexadecimal unicode of the char
|
||||
-- @param font_name Name of the font to register
|
||||
-- If registering different sizes of the same font, add size in the font name
|
||||
-- (e.g. times_10, times_12...).
|
||||
-- @param height Font height in pixels
|
||||
-- @param widths Array of character widths in pixels, indexed by UTF codepoints
|
||||
|
||||
function font_api.register_font(font_name, height, widths)
|
||||
|
||||
if font_api.registered_fonts[font_name] ~= nil then
|
||||
minetest.log("error", "Font \""..font_name.."\" already registered.")
|
||||
return
|
||||
end
|
||||
|
||||
if height == nil or height <= 0 then
|
||||
minetest.log("error", "Font \""..font_name..
|
||||
"\" must have a positive height.")
|
||||
return
|
||||
end
|
||||
|
||||
if type(widths) ~= "table" then
|
||||
minetest.log("error", "Font \""..font_name..
|
||||
"\" must have a widths array.")
|
||||
return
|
||||
end
|
||||
|
||||
if widths[0] == nil then
|
||||
minetest.log("error", "Font \""..font_name..
|
||||
"\" must have a char with codepoint 0 (=unknown char).")
|
||||
return
|
||||
end
|
||||
|
||||
font_api.registered_fonts[font_name] =
|
||||
{ name = font_name, height = height, widths = widths }
|
||||
|
||||
-- Force to choose again default font
|
||||
-- (allows use of fonts registered after start)
|
||||
default_font = false
|
||||
end
|
||||
dofile(font_api.path.."/font.lua")
|
||||
dofile(font_api.path.."/registry.lua")
|
||||
|
||||
--- Standard on_display_update entity callback.
|
||||
-- Node should have a corresponding display_entity with size, resolution and
|
||||
@ -325,13 +44,15 @@ function font_api.on_display_update(pos, objref)
|
||||
|
||||
if entity and ndef.display_entities[entity.name] then
|
||||
local def = ndef.display_entities[entity.name]
|
||||
local font = get_font(def.font_name)
|
||||
local font = font_api.get_font(meta:get_string("font") or def.font_name)
|
||||
|
||||
objref:set_properties({
|
||||
textures={font_api.make_multiline_texture(
|
||||
def.font_name, text,
|
||||
def.size.x * def.resolution.x * font.height,
|
||||
def.size.y * def.resolution.y * font.height,
|
||||
local maxlines = def.maxlines or 1 -- TODO:How to do w/o maxlines ?
|
||||
|
||||
objref:set_properties({
|
||||
textures={font:make_text_texture(text,
|
||||
font:get_height(maxlines) * def.size.x / def.size.y
|
||||
/ (def.aspect_ratio or 1),
|
||||
font:get_height(maxlines),
|
||||
def.maxlines, def.halign, def.valign, def.color)},
|
||||
visual_size = def.size
|
||||
})
|
||||
|
151
font_api/registry.lua
Normal file
@ -0,0 +1,151 @@
|
||||
--[[
|
||||
font_api mod for Minetest - Library to add font display capability
|
||||
to display_api mod.
|
||||
(c) Pierre-Yves Rollo
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
-- Global variables
|
||||
-------------------
|
||||
|
||||
font_api.registered_fonts = {}
|
||||
font_api.registered_fonts_number = 0
|
||||
|
||||
-- Local variables
|
||||
------------------
|
||||
|
||||
local default_font = false
|
||||
|
||||
-- Local functions
|
||||
------------------
|
||||
|
||||
-- Gets a default (settings or fist font)
|
||||
local function get_default_font()
|
||||
-- First call
|
||||
if default_font == false then
|
||||
default_font = nil
|
||||
|
||||
-- First, try with settings
|
||||
local settings_font = minetest.settings:get("default_font")
|
||||
|
||||
if settings_font ~= nil and settings_font ~= "" then
|
||||
default_font = font_api.registered_fonts[settings_font]
|
||||
|
||||
if default_font == nil then
|
||||
minetest.log("warning", "Default font in settings (\""..
|
||||
settings_font.."\") is not registered.")
|
||||
end
|
||||
end
|
||||
|
||||
-- If failed, choose first font
|
||||
if default_font == nil then
|
||||
for _, font in pairs(font_api.registered_fonts) do
|
||||
default_font = font
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- Error, no font registered
|
||||
if default_font == nil then
|
||||
minetest.log("error",
|
||||
"No font registred, unable to choose a default font.")
|
||||
end
|
||||
end
|
||||
|
||||
return default_font
|
||||
end
|
||||
|
||||
--- Returns font object to be used according to font_name
|
||||
-- @param font_name: Name of the font
|
||||
-- @return Font object if font found (or default font)
|
||||
|
||||
function font_api.get_font(font_name)
|
||||
local font = font_api.registered_fonts[font_name]
|
||||
|
||||
if font == nil then
|
||||
local message
|
||||
|
||||
if font_name == nil then
|
||||
message = "No font given"
|
||||
else
|
||||
message = "Font \""..font_name.."\" unregistered"
|
||||
end
|
||||
|
||||
font = get_default_font()
|
||||
|
||||
if font ~= nil then
|
||||
minetest.log("info", message..", using font \""..font.name.."\".")
|
||||
end
|
||||
end
|
||||
|
||||
return font
|
||||
end
|
||||
|
||||
-- API functions
|
||||
----------------
|
||||
|
||||
--- Returns de default font name
|
||||
-- @return Default font name
|
||||
|
||||
function font_api.get_default_font_name()
|
||||
return get_default_font().name
|
||||
end
|
||||
|
||||
--- Register a new font
|
||||
-- Textures corresponding to the font should be named after following patern :
|
||||
-- font_<name>_<code>.png
|
||||
-- <name> : name of the font
|
||||
-- <code> : 4 digit hexadecimal unicode of the char
|
||||
-- @param font_name Name of the font to register
|
||||
-- If registering different sizes of the same font, add size in the font name
|
||||
-- (e.g. times_10, times_12...).
|
||||
-- @param def font definition. A associative array with following keys :
|
||||
-- @key height (mandatory) Height in pixels of all font textures
|
||||
-- @key widths (mandatory) Array of character widths in pixels, indexed by
|
||||
-- UTF codepoints
|
||||
-- @key margintop (optional) Margin (in texture pixels) added on top of each
|
||||
-- char texture.
|
||||
-- @key marginbottom (optional) dded at bottom of each char texture.
|
||||
-- @key linespacing (optional) Spacing (in texture pixels) between each lines.
|
||||
-- margintop, marginbottom and linespacing can be negative numbers (default 0)
|
||||
-- and are to be used to adjust various font styles to each other.
|
||||
|
||||
-- TODO: Add something to remove common accent if not defined in font
|
||||
|
||||
function font_api.register_font(font_name, font_def)
|
||||
|
||||
if font_api.registered_fonts[font_name] ~= nil then
|
||||
minetest.log("error", "Font \""..font_name.."\" already registered.")
|
||||
return
|
||||
end
|
||||
|
||||
local font = font_api.Font:new(font_def)
|
||||
|
||||
if font == nil then
|
||||
minetest.log("error", "Unable to register font \""..font_name.."\".")
|
||||
return
|
||||
end
|
||||
|
||||
font.name = font_name
|
||||
font_api.registered_fonts[font_name] = font
|
||||
font_api.registered_fonts_number = font_api.registered_fonts_number + 1
|
||||
|
||||
-- Force to choose again default font
|
||||
-- (allows use of fonts registered after start)
|
||||
default_font = false
|
||||
|
||||
minetest.log("action", "New font registered in font_api: "..font_name..".")
|
||||
end
|
||||
|
@ -3,6 +3,17 @@
|
||||
scriptname=$(basename $0)
|
||||
identify="identify"
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 fontname"
|
||||
echo "fontname: The name of the font. Must correspond to existing texture/font_<fontname>_????.png files"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
font_name=$1
|
||||
|
||||
for f in textures/font_${font_name}_????.png
|
||||
@ -41,8 +52,12 @@ $luafile generated by $scriptname $(LANG=en_US date)
|
||||
|
||||
font_api.register_font(
|
||||
'$font_name',
|
||||
$font_height,
|
||||
{ $font_widths }
|
||||
{
|
||||
height = $font_height,
|
||||
widths = {
|
||||
$font_widths
|
||||
},
|
||||
}
|
||||
);
|
||||
" > font_$font_name.lua
|
||||
|
||||
|
@ -67,7 +67,7 @@ generate() {
|
||||
mkdir textures
|
||||
|
||||
# Reads all available code points in the font.
|
||||
codepoints=$(ttx -o - $fontfile | grep "<map code=" | cut -d \" -f 2)
|
||||
codepoints=$(ttx -o - "$fontfile" | grep "<map code=" | cut -d \" -f 2)
|
||||
|
||||
# Mandatory chars
|
||||
generate 0020 007f
|
||||
|
@ -1,20 +0,0 @@
|
||||
KREATIVE SOFTWARE RELAY FONTS FREE USE LICENSE
|
||||
version 1.2f
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or entity (the "User") obtaining a copy of the included font files (the "Software") produced by Kreative Software, to utilize, display, embed, or redistribute the Software, subject to the following conditions:
|
||||
|
||||
1. The User may not sell copies of the Software for a fee.
|
||||
|
||||
1a. The User may give away copies of the Software free of charge provided this license and any documentation is included verbatim and credit is given to Kreative Korporation or Kreative Software.
|
||||
|
||||
2. The User may not modify, reverse-engineer, or create any derivative works of the Software.
|
||||
|
||||
3. Any Software carrying the following font names or variations thereof is not covered by this license and may not be used under the terms of this license: Jewel Hill, Miss Diode n Friends, This is Beckie's font!
|
||||
|
||||
3a. Any Software carrying a font name ending with the string "Pro CE" is not covered by this license and may not be used under the terms of this license.
|
||||
|
||||
4. This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
5. Kreative Software reserves the right to change this license at any time without notice.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE SOFTWARE OR FROM OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,166 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
@ -1,12 +0,0 @@
|
||||
# Font Epilepsy
|
||||
|
||||
Font mod for font_api mod.
|
||||
|
||||
**Font**: EpilepsySansBold by Kreative Software under KREATIVE SOFTWARE RELAY FONTS FREE USE LICENSE version 1.2f.
|
||||
|
||||
**Dependancies**:font_api
|
||||
|
||||
**License**: LPGL for the cod, KREATIVE SOFTWARE RELAY FONTS FREE USE LICENSE version 1.2f for the font (see FONT LICENSE.txt)
|
||||
|
||||
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
|
||||
|
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 315 B |
Before Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 302 B |