| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/inkscape/extensions/__pycache__/ |
Upload File : |
o
0�a�: � @ s� d Z ddlZddlZddlmZ ddlZddlmZmZmZm Z ddlm
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZ G dd� dej�ZedkrVe� �� dS dS ) aT
Hershey Text 3.0.5, 2021-05-17
Copyright 2021, Windell H. Oskay, www.evilmadscientist.com
Major revisions in Hershey Text 3.0:
1. Migrate font format to use SVG fonts.
- SVG fonts support unicode, meaning that we can use a full range of
characters. We are no longer limited to the ASCII range that the
historical Hershey font formats used.
- Arbitrary curves are supported within glyphs; we are no longer limited to
the straight line segments used in the historical Hershey format.
- The set of fonts can now be expanded.
2. Add a mechanism for adding your own SVG fonts, either within the
folder containing the default fonts, or from an external file or directory.
This is particularly important for installations where one does not
have access to edit the contents of the Inkscape extensions directory.
3. Support font mapping: If a given font face is used for a given block of
text, check first to see if a matching SVG font is present. If not,
substitute with the default (selected) stroke font from the list of
included fonts.
4. Instead of entering text (one line at a time) in the extension,
this script now converts text (either all text, or all selected text)
in the document, replacing it in place. While not every possible
method of formatting text is supported, many are.
� N)�deepcopy)� Transform�Style�units�AbortExtension)�load_svg�Group�TextElement�FlowPara�SVGfont�FontFace�FlowSpan�Glyph�MissingGlyph�Tspan�FlowRoot� Rectangle�Use�PathElement�Defsc s� e Zd ZdZ� fdd�ZdZdZdd� Zdd � Zd
d� Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zg d&�g d'�gd(fd)d*�Zd+d,� Z� ZS )-�Hersheyz0
An extension for use with Inkscape 1.0
c s
t t| ��� | jjddddd� | jjdddd d� | jjd
ddd
d� | jjdtjdddd� | jjddddd� | jjddddd� t� | _d| _ d | _
d | _d| _d| _
d| _t� | _g | _d| _d| _g | _g | _g | _g | _g | _g | _d| _d| _d| _d S )Nz--tab�mode�renderz-The active tab or mode when Apply was pressed)�dest�default�helpz
--fontface�fontface�HersheySans1z-The selected font face when Apply was pressedz--otherfont� otherfont� z'Optional other font name or path to usez
--preserve�
preserve_textFzPreserve original text)�typer r r z--action� util_mode�samplezThe utility option selectedz--text�sample_textzText to use for font tablegY�
SUU�?r T� )�superr �__init__�
arg_parser�add_argument�inkex�Boolean�dict�font_file_list�font_load_fail�
svg_height� svg_width�output_generated�warn_unflow�
warn_textpath� font_dict�nodes_to_delete�vb_scale_factor�text_string�
text_families�text_heights�
text_spacings�text_aligns�text_x�text_y�line_number�new_line�render_width)�self�� __class__� �)/usr/share/inkscape/extensions/hershey.pyr'