I would like to self-host my vector maps. I am using some custom fonts and also some custom icons.
When I create a style in Mapbox Studio and export it later I will have the following two lines inside my styles file:
"sprite": "mapbox://sprites/<user>/<token>/<token>",
"glyphs": "mapbox://fonts/<user>/{fontstack}/{range}.pbf",
My question now is how do I create those files myself? I have a folder containing my .svg and my .ttf files. But how do I now get them into the format I need?
I tried https://github.com/openmaptiles/fonts for the glyphs part, but can't get that running. And then I found https://github.com/mapbox/glyph-pbf-composite but don't understand how it should work.
The easy method is to:
add the svgs and fonts into a MapBox style
open a test map in a browser
inspect the Network calls with the browser's dev tools. Find the calls to get the sprite and glyph files
open those URLs in a new browser tab and save the files that are downloaded
Otherwise if you want to generate the files without using MapBox Studio:
You'll use two utilities as outline in the instructions from https://openmaptiles.org/docs/style/mapbox-gl-style-spec/
Sprite file generation: SpriteZero CLI - https://github.com/mapbox/spritezero-cli
Glyph file generation: genfontgl - https://github.com/openmaptiles/genfontgl
Finally, when defining the path to the files you do still need the tokens in the glyphs path even though you aren't using them. So something like
"glyphs": "/data/myfonts.pbf?{fontstack}{range}",
Related
I have been trying numerous editors, from Inkscape, to online converters, to MS store apps, etc.
All I'm trying to do is find an easy way to create either transparent PNG files or SVG files for the activitybar icon inside of VS Code for an extension I'm working on.
Everything I've tried either totally warps the dimensions of what I create and seems to blow the image way up inside the activity bar, even though the files I'm saving as PNG are all 128px x 128px with 32 bit depth, same as another that ships with examples from https://github.com/Microsoft/vscode-extension-samples/tree/master/tree-view-sample
What I see in VS Code after specifying the path in the extension package.json:
What I am trying to get it to look like:
I've tried using SVG viewer plugins for VS Code as well, and sometimes the SVG's I've used don't even show up, even though an item does exist in the activity bar when I hover over the position it should be in.
Any modicum of help would be appreciated.
Recently I'm using CorelDraw to create icons for my android application, and I have a little problem. Each icon has to be exported as a png to 6 different sizes, and it is quite annoying to export each icon 6 times. Is there any way to create a macro or other automation stuff that will do for example 6 exports of a file to a dedicated location? All the export settings besides the width and height are the same.
Uses the ActiveDocument.ExportBitmap command to export something as a PNG.
Here is someone over at the corel draw community calling it.
The resolutions are passed as arguments to ExportBitmap. Make a macro that hard codes 6 sizes and exports them to slightly different filenames.
You may not find a free macro as your request on the net. You should ask it to macro developer as it's custom macro.
I got idea for this request.
Macro interface loaded :
a text box for entering png name (or auto numbering)
text boxes for prefix and suffix name (6x)
auto filled file path for each of 6
a button for execute
Select Icon, then click the button. The selected icon will exported to predefined folder with specific name.
i.e :
Prefix_Icon1_48x48.png
Prefix_Icon1_72x72.png
Prefix_Icon1_96x96.png
and so on.
If all your ison is as ONE PAGE only, the macro will available exported each icon as 6 sizes png, WITH auto filenaming function.
Yup, I think it would be as commercial macro.
I have installed doxygen and graphviz-2.38 on my windows 7. But when i generate Call graphs or Called graphs, the png file or the graphs does not open, it generates .md5 file but searches for .png files for the graphs . Please help.
Doxygen can use the "dot" tool from graphviz to generate more advanced diagrams and graphs.
If you have the "dot" tool in the path, you can set HAVE_DOT to YES in the configuration file to let doxygen use it. Among the dot options, use DOT_IMAGE_FORMAT also.
The DOT_IMAGE_FORMAT tag can be used to set the image format of the images generated by dot. Possible values are svg, png, jpg, or gif. If left blank png will be used.
Note
If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files visible in IE 9+ (other browsers do not have this requirement).
I have some Unity .asset files which contains 3D models. I want to be able to convert / export these 3D models into a more common format which will be accepted by 3D Max.
I read that I need to use a custom script since Unity doesn't support this out of the box, so I tried to set up this plugin script:
http://wiki.unity3d.com/index.php?title=ObjExporter
I created a new project called Test, copied the two CS scripts into the "My Project Name/Editor" folder, and although the custom tab in Unity shows up, it is not click-able.
Also, I had to change line 79 to:
objMaterial.textureName = AssetDatabase.GetAssetPath(mats[material].mainTexture);
From:
objMaterial.textureName = EditorUtility.GetAssetPath(mats[material].mainTexture);
As it was giving me an error.
Which version of Unity? In 3.5.7 you should see the following:
The Custom menu item should be in the main tool bar. Also included for reference is the project hierarchy, to show that the scripts are in the correct folder. I copied the scripts verbatim from the OP's link.
Is there an app that can change the order of images inside an icon?
Thanks!
What you'll need to do that is a resource editor. A google search will reveal many free ones out there. The restorator is a great one, but not free and over-priced IMO.
Any decent resource editor will allow you to see icons in the exe or dll and save them or replace them. I don't know of any that will allow you to reorder them, but just about any out there would allow you to save the icons out and then replace them back in the exe/dll in whatever order you'd like.
The only resource editor I know of that will allow you to re-order the embedded icons including png compressed vista icons is Resource Tuner Console.
You can change the image order using Pixelformer (an icon/bitmap editor). Import the icon, reorder the images as you wish, then export it back.
Using a resource editor is not an easy way to do this because you have to edit both ICON and ICON GROUP and I tried to do this with Resource Hacker and could not do it.
I found Easy Icon Maker is able to rearrange the order of the icons properly... it's the only icon editor that I found with this option, and I tried about half a dozen. The editor itself is not nearly as good as IcoFX (http://portableapps.com/apps/graphics_pictures/icofx_portable)
Why would you want to do this? Well there are certain times when Windows will use the first icon file that matches the size, but this may not be the color-depth that you want... for instance if you are on an older machine like Windows 2000 that doesn't support Alpha Channels then putting these at the beginning of your ICO file will cause Windows 2000 to try to render it so it results in black dots all over the image.