OpenModelica svg icon for blocks - svg

The svg icon of a block is not displayed. Here's how I set it:
I switch to Icon view
Click on Bitmap
Draw a rectangle
In Bitmap properties I select the svg file through Browse (the option for svgs exists). The svg file is in the same folder as the .mo file.
Click Ok and the svg icon is not displayed - I get nothing (like a white icon - I can only see the corners of the bitmap rectangle). The svg file was created in Inkscape and saved as Plain svg.
Is this svg icon option not implemented yet but will be in the near future? or am I doing something wrong?

The svg option was there by mistake. The supported formats for bitmap are PNG, BMP and JPEG. I have fixed it now in r18662.
Adeel.

Related

SVG exported from Inkscape are rendered with different font

I have opened a pdf with Inkscape and exported it in Plain SVG. However, when I open it in any browser the text is rendered with a different font.
This happens because the font-family property in the SVG file might be set to a font that is not installed on the system. In my case it was DejaVuSans.
You should open the SVG file in a text editor and replace all font-family:DejaVuSans with for example font-family:Arial.

Embed svg icon as external file link in adobe illustrator

I would like to link icons into svg as external source.
The reason is that I change this images on client side with javascript.
If icons are jpg or png or similar, I can click "Link" checkbox when place external file. But my icons are in svg format. And checxbox is disabled when I would like to place the svg as external link. I need to have icons as svg since I change also color on the client side(beside different icon).
How can I embed svg icon as external file?
I didn't find a way to do this with adobe illustrator. The workaround is to link to some jpg and then open svg file in notepad and replace external jpg link to external svg link. This way it works.

resizing chrome theme image to fit screen size

is there a way to make the background image of chrome theme resize with the height of the window? If so, can I also make the image resize with the height until it hist a certain ratio, and then resize with the width of the window?
It's not possible. Chromium source code doesn't have any stretching/sizing modes as you can see: theme_properties.h, theme_properties.cc and theme_service.cc
I've tried specifying an SVG image with width="100%" height="100%" for the background but it wasn't rendered, looks like only raster images can be used (WEBP, JPG, PNG, etc).
I tried use jpeg format, it resized itself, without anything added to manifest.json

Embedding a zoom box in an SVG image

I'd like to make my SVG images interactive, with a zoom box that can be moved around by hovering or clicking the mouse in certain areas. Can this be done in a single SVG file, so that I can embed this interactive SVG image in a pdf?
You mean like this? Zoom and Pan

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.

Resources