How do I embed my own fonts in a WinForms app?

This is what worked for me in VS 2013, without having to use an unsafe block. Embed the resource Double-click Resources.resx, and in the toolbar for the designer click Add Resource/Add Existing File and select your .ttf file In your solution explorer, right-click your .ttf file (now in a Resources folder) and go to Properties. … Read more

Embedding small plots inside subplots in matplotlib

I wrote a function very similar to plt.axes. You could use it for plotting yours sub-subplots. There is an example… import matplotlib.pyplot as plt import numpy as np #def add_subplot_axes(ax,rect,facecolor=”w”): # matplotlib 2.0+ def add_subplot_axes(ax,rect,axisbg=’w’): fig = plt.gcf() box = ax.get_position() width = box.width height = box.height inax_position = ax.transAxes.transform(rect[0:2]) transFigure = fig.transFigure.inverted() infig_position = … Read more

Embed SVG in SVG?

Use the image element and reference your SVG file. For fun, save the following as recursion.svg: <svg width=”100%” height=”100%” viewBox=”-100 -100 200 200″ version=”1.1″ xmlns=”http://www.w3.org/2000/svg”> <circle cx=”-50″ cy=”-50″ r=”30″ style=”fill:red” /> <image x=”10″ y=”20″ width=”80″ height=”80″ href=”recursion.svg” /> </svg>