This is sometimes needed, and calling into actual icon theme code just for it is confusing - the resulting icon does not depend on the icon theme at all.
https://bugzilla.gnome.org/show_bug.cgi?id=760536
7d717c8 icon theme: Add a way to create GtkIconInfos from files
gtk/gtkicontheme.c | 71 ++++++++++++++++++++++++++++-----------------
gtk/gtkiconthemeprivate.h | 5 ++++
2 files changed, 49 insertions(+), 27 deletions(-)
Upstream: git.gnome.org