How can I change width of a line without changing its stroke width in inkscape? - width

I am new to inkscape and I would like to know if there is anyway to increase/change the width of a line without changing its stroke width.
I want the line to have a fill color and a narrow black stroke (preferably 2px).
Thanks

You can convert a thick-stroked curve using the Stroke to path command (in the Path menu): this won't change its aspect, but instead of being defined as a line with a given width, this will give a polygonal shape (a sort of ribbon). Then you can give this ribbon a stroke colour and thickness (Shift-click on the chosen colour).

In the Inkscape version 1.0 there are four buttons on the right side of the toolbar. The first one is responsible for enabling of scaling the stroke while changing the width of an object. Click it to disable this kind of scaling.

There's a small trick to change the width line as Inkscape doesn't provide a mechanism.
Close the current file in Inkscape
Edit your file in a normal ASCII Editor
Find your object (e.g. a spline), it will be a path ... statement
Change the "stroke-width" manually e.g. as
<path style="fill:none;stroke:#80ffff;stroke-width:0.164583px; ....
Tip: If you have a large file, you can assign your object a unique color (here 80FFFF) and you can then search that color code "80FFFF" in your ASCII Editor.

Related

How to adjust the arrow size in Sketch?

How to adjust the arrow size, not the thickness
enter image description here
Unfortunately, there is no specific setting.
I would recommend you to work with a line and an element such a triangle to have the same effect with controllable sizes.
You can also transform this combination of line and triangle in a symbol and replicate through out your artwork.

SVG Text-anchor top left

By default, the anchor for the text element in SVG is at the bottom left, but I want it to be at the top left, since I am also creating a rectangle to act as the background for the text, but it is displayed incorrectly since the text is higher than the rectangle (because rectangle anchor/offset is at the top left). Is there a way to fix this, so both text and rectangle can be drawn at same coordinates and be displayed in the same location.
The dominant-baseline property/attribute worked for me:
svg {
dominant-baseline: hanging;
}
The coordinates (x and y) you supply for text elements is used as the baseline of the text. This makes sense because if there is text with varying font sizes on the same line, you would want their baselines to line up.
There is no "automatic" way to do what you want. SVG elements are always absolutely positioned.
You will just have to move the text down a bit by making the y coordinate a bit larger.
Alternatively, you could add a dy attribute to shift the text down a bit. Or even use a transform attribute to do the same. But using either of those methods wouldn't really be simplifying the process for you.

Decreasing Polyline Stroke Width

I am trying to mimic the behavior of markers on white boards and was wondering if it I can do it with svg polylines. I know the stroke width can be set but can be it changed to vary depending on the velocity of the mouse which I can figure out or is it just a constant value for the stroke?
Or if you wanted to use SVG, instead of using a <polyline>, use a series of connected <line>s
You can't have multiple stroke widths in a single polyline element. I think canvas is probably a better fit for this task.

Glyph Sizes in FontForge SVG Importing

I created a set of svg glyphs for a font I am building, in Inkscape.
They look fine in Inkscape, and fill the full canvas. But when I import them into FontForge, they appear tiny - around 1/10th of the size they should take up.
Can anyone explain why this is happening, and what I can do to fix it?
This happens because your artboard in inkscape has many more units than the font's cartesian grid space.
Open Inkscape
From the File menu, select Document Properties.
Set units to pixels (px) and document dimensions to 1000 x 1000, click OK
Set a horizontal guide at 200px
Draw a glyph – the hardest part! :-)
Save the drawing as an SVG
Open FontForge
From the File menu, select Import, chose SVG, find your drawing, click OK
Inkscape now has a template, 'FontForge Glyph' that should make this more convenient.
There are some bugs in the FontForge.This is a way to solve it.

Creating a variable-width stroke in Cairo

stroke() in Cairo applies a stroke of a single specified width to a line path.
I'd like to draw a path with a varying width (thinner when the user was drawing faster, thicker when slower). Is this possible in Cairo?
Use cairo_set_line_width to set it and "split" the path in more than one piece. Unluckly as you noticed cairo_set_line_width is the width for the whole current path (since it sets the attribute as if you are choosing a pen to draw that path):
cairo_set_line_width
«As with the other stroke parameters, the current line width is examined by cairo_stroke(), cairo_stroke_extents(), and cairo_stroke_to_path(), but does not have any effect during path construction.»

Resources