export woff with postscript contour | how to use Sfnttool? - font-face

To make font-face kit, I use the font-face generator by font squirrel : http://www.fontsquirrel.com/fontface/generator
But this doesn't support postscript contour and it export only woff with truetype contour. Is there a website or a programm to do it?
<-- Edit -->
A guy from Typophile told me I could use sfntly ( http://code.google.com/p/sfntly/ ) but I have absolutely no idea how to use this. Anyone knowes wehe to start with that ?

Easiest method is to download the sfnt2woff tool from http://people.mozilla.com/~jkew/woff/
Once downloaded, open Terminal.app in OS X and drag sfnt2woff to the Terminal window. (This will paste the full path of the app on the command line.) It is then a simple terminal command:
/path/to/sfnt2woff -v 1.0 /path/to/font.otf
A WOFF will be created in the same directory as the font.

Related

Making Graphic Magick detect Ghostscript for reading pdf on Windows. How to change Ghostscript invocation name on WINDOWS CMD to 'gs'?

My OS is Windows 10. What I did for Ghostscript installation:
I installed Ghostscript (v9.53.3)
I added Ghostscript bin folder location to my environment PATH variable. (C:\Program Files\gs\gs9533\bin)
I restarted my machine.
After this step, my cmd is able to recognize "gswin64c" command. However, "gs" is not recognized. According to Ghostscript examples, the 'gs' command should work. What must I do to make "gs" command recognized? Should I be worried here?
Now, to my Graphics Magick Problem:
I am also using Graphic Magick v1.3.36 (GM) on my machine. My GM does not have the delegate for pdf format even after I installed Ghostscript as mentioned above. As seen in this error which shows every time I try to convert a pdf file to images using gm.
C:\program files\graphicsmagick-1.3.36-q16\gm.exe convert: No decode delegate for this image format (file1.pdf)
My suspicion is that the 'gs' command is not recognized in windows and this is causing GM to be unable to detect Ghostscript.
I would value any suggestion of how to make GM work with ghostscript on my windows machine. Thank you.
UPDATE (5th March 2021)
I found out that changing the command to gs for Ghostscript does not fix GM's pdf delegate problem -- GM still cannot detect Ghostscript!! My suspicion above is wrong.
I was struggling with "GM's pdf delegate problem" too. And I found out that GraphicsMagick uses the Ghostscript Fonts (also known as "URW Fonts") to support the standard set of Adobe Postscript fonts like "Helvetica" and "Times Roman".
Download fonts from here Ghostscript Fonts and paste downloaded folder fonts to the folder with Ghostscript files **C:Program Files\gs\gs9.27**. Here you could find more information.
After installing ghostscript and adding it's path to environment variables and checking it by running gswin64c command.
Update the delegates.mgk file present at C:\Program Files\GraphicsMagick-1.3.34-Q16
The delegates.mgk entry looks somewhat like this by default-
<delegate decode="pdf" encode="eps" mode="bi" command='"#PSDelegate#" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=#GSEPSDevice# "-sOutputFile=%o" -- "%i" -c quit' />
Note the #PSDelegate# env variable in the command, Just find and replace all the #PSDelegate# with the path gswin64c at all places. After this Graphic Magick will start delegating the tasks to Ghostscript.
Also there's a issue with Graphic Magick v1.3.36 for windows, as mentioned by one of the maintainers here
So try installing an older version.
A similar issue has been explained on this question as well.

Customize Prompt Color for Pure Theme?

I'm currently using the Pure theme for zsh, but the default blue is really dark. Is it possible to change only the blue (i.e. I don't want to install zsh-syntax-highlighting)?
As the color is set via %F{blue} inside the theme the exact color used for blue is set in your terminal (most probably).
So to change this color you need to check how to configure those colors for your terminal.
Just as an example here is a superuser answer for "How to set color terminal for iTerm2?"
change terminal profile
open terminal
cmd + , show terminal profiles
change any [ansi colors] that you didnot like
if this is not effect, you need custom your theme
custom your theme
first find the dir
echo $ZSH_CUSTOM
second build the theme file
cd ~/.oh-my-zsh/custom
mkdir themes
mate themes/xxx.zsh-theme
third fix the ~/.zshrc file change theme:
ZSH_THEME="xxx"
fourth open your xxx.zsh-theme, u can change anything.
maybe you need copy a sample: https://github.com/robbyrussell/oh-my-zsh/tree/master/themes
about color u can get information from : https://en.wikipedia.org/wiki/ANSI_escape_code

Kivy Atlas Creation On Windows

Seems like Kivy APIs are steered towards Linux systems more than anything. Has anyone success created a kivy atlas on windows using the command prompt?
If so, how is it done?
Full working code please.
Actually this manual works on Windows. You need to use console (press Win+R, type cmd and press Enter).
cd to your project folder and use the following command (with your image filenames and sizes, obviously). And it's dir on Windows, not ls, but otherwise it's the same.
python -m kivy.atlas myatlas 256x256 img1.png img2.png
This simplest way under Windows for me was the following...
Create a script with a string template of the Json code which constructs the atlas.
ImgSize = 512x512
AtlasT = """
{
"run.png": {
%s
}
}
"""
You would then create a loop, that will loop through all directories you specify, gathering all the images and formatting the template.
Save the atlas at the end. All mathematics are calculated by the script based on the size of the images.
If you use the linux terminal command as per the docs, you'll get an error. Just enter this into windows commmand line window - python - m, and hit enter. You'll get an error saying python is not recognized as an external or internal command or something like that.
Linux Ubuntu is far different from Windows. It seems like Linux is always aware of what you install so if you address something by name like, python, you'll get feed back. That's not the same under Windows. In order to use python on windows you really have to point to python.exe.
Don't bother using the kivy docs atlas command line in windows. Windows won't understand kivy.atlas either. It's not Linux!

use external editor in Octave on OSX

I want to use Sublime Text as my default editor for Octave, but cant get it to work.
The location of my Sublime Text app is in the /Applications/ folder as usually.
For example putting EDITOR (“/Applications/SublimeText.app”) results in the following error:
parse error near line 1 of file /Users/czapla/.octaverc
syntax error
>>> EDITOR (“/Applications/SublimeText.app”)
^
error: source: error sourcing file '/Users/czapla/.octaverc'`
FYI: Yes SublimeText, this is name of the application, no spaces in between, I changed it to avoid having to escape spaces - I wasnt sure how that would be handled by Octave.
Any ideas?
Thanks!
You don't mention what different things you tried to place in your .octaverc file. The following should work EDITOR ("path_to_your_sublime_aplication"). It doesn't need to be the full path, whatever works to call it from the command line should suffice. For example, EDITOR ("gedit") works fine on my system.
Also, it is important to set this before calling any function that makes use of it. The variable is persistent during an Octave session after being accessed the first time (and defaults to emacs).
I am using Sublime Text 3 on OS X
Octave programs are running perfectly. So you can try the below mentioned steps
Open Sublime
Goto Tools --> Build System --> New Build System...
Paste this code
{
"cmd": ["/usr/local/octave/3.8.0/bin/octave-3.8.0", "$file"],
"selector": "source.m"
}
Save it as Octave.sublime-build
Now use Octave as your build system
Use ⌘ + B to run your code.
Enjoy!

Create Hybrid Mac and Windows ISO with custom main folder settings

I'm trying to create an hybrid CD able to autorun on Windows machines and auto-open the main folder with a custom background on Mac OSX.
The CD has to start an application in flash showing also some PDF files.
Here the scheme of the CD files and folders:
application.exe <-- the app for windows
autorun.inf <-- the autorun file for windows
application.app <-- the app for mac osx
/documents <-- the folder which contains the PDF files for both the applications
/background <-- the folder which contains the background image for Mac OSX
Following this answer I was able to set a background folder image for mac and create the first hybrid ISO with this command:
hdiutil makehybrid -o [image.iso] [my_project_folder] -iso -hfs -hide-iso [file to hide on windows] -hide-hfs [file to hide on mac]
Unfortunately with this command I wasn't able to hide more than one file; I need at least 2 (.exe and .inf) for mac.
And even if the background results correctly set to my original folder when I open the ISO it seems to lost it and other settings like the window and icons dimensions.
Update:
The correct syntax for hdiutil command to hide multiple files is the following:
hdiutil makehybrid -o image.iso source_folder -iso -hfs -hide-iso cd_folder/application.app -hide-hfs "{cd_folder/application.exe,cd_folder/autorun.inf}"
Unfortunately the folder background image, window dimensions and icon positioning still desappear in the iso file.
It is possible to re-set them again but every time the iso is ejected and re-mounted OSX seems to forget my preferences...
Solution:
After several attempts I have finally found the cause: the read and write mount command hdiutil attach -readwrite myCD.iso does't work on Mountain Lion
Therefore the OS doesn't save / remember my preferences.
I have noticed this behaviour also trying to create the hybrid image with Toast; when I have tried to mount myCD.toast and change the icon position it wasn't allowed (and I realized the problem).
Hence I replicate the process with my old Snow Leopard and everything worked perfectly! Also creating the hybrid CD with Toast is really easier and fully customizable.
What I do is make a read-write disk image, set up background image, icon size, and so on, unmount the image, and make sure it restores properly on remount. To get a designated folder to open when the image mounts, I use the bless command. Once the read-write image works as I want, I make the hybrid image using the read-write image as the source. I've made a set of AppleScript programs to simplify the process.

Resources