Sunday, May 17, 2009

Convert the OTF fonts to Postscript Type one (.pfb)

The conversion is lossless as the hinting remain, however you can't do this reliably for large fonts (with more than 256 characters or glyphs). Here is a sample script allowing to convert OpenType fonts to postscript Type One fonts, you will end up with a .afm and a .pfb file :

#!/usr/bin/fontforge
# Quick and dirty hack: converts a font to Postscript Type one (.pfb)
i=1

while ( i<$argc )
Print("Opening : " +$argv[i]);
if($argv[i]:e != "otf")
Print( "Skipping ... Expecting an OpenType font [.otf]" )
else
Open($argv[i])
Print("Saving : " +$argv[i]:r+".pfb");
# If the font is a cid keyed font, you may want to flatten the cid map
# To do this, uncomment the command below :
# CIDFlatten()
SetFontOrder(3)
SelectAll()
Simplify(128+32+8,1.5)
ScaleToEm(1000)
DontAutoHint()
Generate($argv[i]:r + ".pfb")
endif
i = i+1
endloop

Save this script as otf2pfb.sh and set the executable bit ( chmod +x otf2pfb.sh ). To launch this script, just do : ./otf2pfb.sh *.otf
or make otf2pfb
#!/bin/bash
for i in $@; do
fontforge -script /usr/bin/otf2pfb.sh $i
done

and make this executable
and go in terminal to font folder and type:
otf2pfb fontname.otf


For all fiels in a folder do:

otf2pfb *.otf otf


Now the only thing remaining to do is installing the Type1 fonts in the system. For this Mandriva users can use drakfont, others can use type1inst after having copyed the files in /usr/share/fonts/Type1/.

http://linux-wizard.net/index.php?id_blog=142

Install OpenOffice 3.0 in Ubuntu 8.04 and 8.10

OpenOffice 3.0 adds updated ODF format support, Microsoft Office XML format support (reading only), usability improvements, a new start center, improved annotations in Writer, and improved PDF support.

OpenOffice 3.0 on Ubuntu 8.04

You can replace Ubuntu 8.04’s now outdated version of OpenOffice, or keep both versions installed at the same time. It’s not clear whether OpenOffice 3.0 will be available in Ubuntu 8.10, so I’ve tested these instructions with it as well.

1. Visit the download page, and select the Linux DEB download. The download should be about 150 MB. Extract the tar.gz archive.
2. OpenOffice is very complex software, and consists 47 packages. The easiest way to install them all is using the terminal. Use dpkg to install all of the packages in the DEBS subdirectory (command is one line, you will be prompted for your password):
sudo dpkg -i ~/Desktop/OOO300_m9_native_packed-1_en-US.9358/DEBS/*.deb
3. If you’re happy with OpenOffice 3.0, you can optionally remove the older Ubuntu-provided version. Note that removing the old OpenOffice will also remove the ubuntu-desktop metapackage, so don’t do this if you want to be able to upgrade Ubuntu to a new major version.
sudo apt-get remove openoffice.org openoffice.org-base openoffice.org-base-core openoffice.org-calc openoffice.org-common openoffice.org-core openoffice.org-draw openoffice.org-evolution openoffice.org-filter-mobiledev openoffice.org-gnome openoffice.org-gtk openoffice.org-help-en-us openoffice.org-impress openoffice.org-java-common openoffice.org-l10n-common openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-math openoffice.org-style-human openoffice.org-writer

4. Once the old version of OpenOffice has been removed, you will be able to install the package that provides menu items for OpenOffice 3.0:
sudo dpkg -i ~/Desktop/OOO300_m9_native_packed-1_en-US.9358/DEBS/desktop-integration/openoffice.org3.0-debian-menus_3.0-9354_all.deb


[update] If you chose to keep the old version of OpenOffice installed, you’ll have to create your own menu items. Use this command to run OpenOffice 3:
/opt/openoffice.org3/program/soffice
5. One last step is to associate the document formats to open with OpenOffice 3.0. To do this, right-click on a document file and select Open With->Open With Other Application. Then select the appropriate OpenOffice component for that file.

If you want to remove OpenOffice 3.0, here the huge command to do so:
sudo apt-get remove ooobasis3.0-base ooobasis3.0-binfilter ooobasis3.0-calc ooobasis3.0-core01 ooobasis3.0-core02 ooobasis3.0-core03 ooobasis3.0-core04 ooobasis3.0-core05 ooobasis3.0-core06 ooobasis3.0-core07 ooobasis3.0-draw ooobasis3.0-en-us ooobasis3.0-en-us-base ooobasis3.0-en-us-binfilter ooobasis3.0-en-us-calc ooobasis3.0-en-us-draw ooobasis3.0-en-us-help ooobasis3.0-en-us-impress ooobasis3.0-en-us-math ooobasis3.0-en-us-res ooobasis3.0-en-us-writer ooobasis3.0-gnome-integration ooobasis3.0-graphicfilter ooobasis3.0-images ooobasis3.0-impress ooobasis3.0-javafilter ooobasis3.0-kde-integration ooobasis3.0-math ooobasis3.0-onlineupdate ooobasis3.0-ooofonts ooobasis3.0-ooolinguistic ooobasis3.0-pyuno ooobasis3.0-testtool ooobasis3.0-writer ooobasis3.0-xsltfilter openoffice.org3 openoffice.org3-base openoffice.org3-calc openoffice.org3-dict-en openoffice.org3-dict-es openoffice.org3-dict-fr openoffice.org3-draw openoffice.org3-en-us openoffice.org3-impress openoffice.org3-math openoffice.org3-writer openoffice.org-ure

Saturday, May 16, 2009

How to Install True Type Fonts on Ubuntu

You've just installed Ubuntu, and you need some good fonts for Open Office, Gimp, or another reason. You've found some nice .ttf fonts for Windows, but you're not sure on how you can use them, or even if it's possible. Following this guide properly, it'll be as easy as copying fonts to the /fonts directory in Windows!


1. Move all your fonts to the ~/ Directory. The ~/ Directory is your home folder. So if you were logged in as cruddpuppet, the directory would be /home/cruddpuppet/ .
2. Open up the terminal. I'm assuming you've already extracted the font to the ~/ directory. Type: "cd /usr/local/share/fonts/truetype" without the quotes (the path is "/usr/share/fonts/truetype" on some distros). What this does is changes the directory to the truetype fonts directory.
3. Type in "sudo mkdir myfonts" also without quotes. Assuming you're not logged in as root, this will ask you for your password. Anything you type will not be seen, but it is there. Just type in your password, press enter, and the directory 'myfonts' will be created.
4. Type in "cd myfonts" . Then type in "sudo cp ~/fontname.ttf ." . These will get your font in the /myfonts directory.
5. In order to install the font, ownership has to belong to root, so type in "sudo chown root.root fontname.ttf" and after that "sudo mkfontdir" which makes a directory for your font.
6. Now your font is installed, but it will disappear the next time ubuntu starts up, so you just need to type "cd .." and after that "fc-cache" .

More info in installing open type fonts that are supported since Open Office 3.
OpenOffice.org will handle binary encoded Type1 fonts (".pfb" suffix) as well as text encoded Type1 fonts (".pfa" suffix). However, you still need to have the corresponding Adobe Font Metric file (AFM) installed. This file needs to have the same base name as the font file (i.e. Times.pfa plus Times.afm or Helvetica.pfb plus Helvetica.afm). It must be installed in the same directory as the font file or in a subdirectory named "afm".
http://www.openoffice.org/FAQs/fontguide.html#5

If you are not sure that you have installed the font correctly you can examine the "user/psprint/pspfontcache" file, or if you made a network installation, the "share/psprint/pspfontcache" file. This file is kind of hard to read but it states all font files that have been found during the last run of OpenOffice.org. "| grep" is your friend. Even though it is safe to remove this file please be careful not to modify it.




Installing OpenType Fonts
just to make sure... when you placed your fonts into /usr/share/fonts, did you update the font db? try the following commands exactly (these are just slightly modified instructions from that wiki page:

Code:

cd /usr/share/fonts/type1
sudo mkdir opentype
cd opentype
sudo cp /where/your/fonts/are/located/* .
sudo mkfontdir
cd ..
sudo fc-cache

that and then try restarting gnome/rebooting..

http://ubuntuforums.org/showthread.php?t=156378

Wednesday, May 13, 2009

Choose a fav app for a certain filetype

Een voorkeursprogramma kiezen voor een bestandstype

Bij elk bestandstype kunt u een voorkeursprogramma instellen. Zodat bijvoorbeeld een MP3-bestandje, direct geopend wordt door uw favoriete speler, wanneer u erop dubbelklikt. Dat doet u zo.

Stel, u wil Audacious als voorkeursspeler hebben voor uw MP3's. Als in uw persoonlijke map een mp3-muziekbestand staat, dan doet u dit:

1.

Locaties => Persoonlijke map
2. Rechtsklik muis op het MP3-bestand (Rightclick on a mp3 file)
3. Choose Properties

Kies Eigenschappen => Tabblad "Openen met"
4. Select radio button at fav app; Zet het puntje bij de speler van uw keuze, in dit voorbeeld Audacious.

Nu is Audacious voortaan uw standaardspeler voor MP3's. Let op: u kiest dus niet direct voor "openen met" als u rechtsklik met de muis hebt gedaan! Want dan is het een tijdelijke keuze. Pas als u kiest via Eigenschappen - Openen met, is het een blijvende keuze.

Saturday, May 9, 2009

How M$ hinders development of a Open Document Standard

The bad guys act like this: http://www.groklaw.net/article.php?story=2009050712493241


As for calls by Microsoft to change the leadership of the ODF Technical Committee, may I remind you of Microsoft's Windows Evangelism memo that surfaced in the Comes v. Microsoft antitrust litigation? Here's the exhibit as PDF( http://www.groklaw.net/pdf/Comes-3096.pdf). It outlines how to find and put into place a "pliable" moderator. And here's what it said:

Our mission is to establish Microsoft's platforms as the de facto standards throughout the computer industry.... Working behind the scenes to orchestrate "independent" praise of our technology, and damnation of the enemy's, is a key evangelism function during the Slog. "Independent" analyst's report should be issued, praising your technology and damning the competitors (or ignoring them). "Independent" consultants should write columns and articles, give conference presentations and moderate stacked panels, all on our behalf (and setting them up as experts in the new technology, available for just $200/hour). "Independent" academic sources should be cultivated and quoted (and research money granted). "Independent" courseware providers should start profiting from their early involvement in our technology. Every possible source of leverage should be sought and turned to our advantage.

I have mentioned before the "stacked panel". Panel discussions naturally favor alliances of relatively weak partners - our usual opposition. For example, an "unbiased" panel on OLE vs. OpenDoc would contain representatives of the backers of OLE (Microsoft) and the backers of OpenDoc (Apple, IBM, Novell, WordPerfect, OMG, etc.). Thus we find ourselves outnumbered in almost every "naturally occurring" panel debate.

The key to stacking a panel is being able to choose the moderator. Most conference organizers allow the moderator to select [the] panel, so if you can pick the moderator, you win. Since you can’t expect representatives of our competitors to speak on your behalf, you have to get the moderator to agree to having only “independent ISVs” on the panel. No one from Microsoft or any other formal backer of the competing technologies would be allowed -just ISVs who have to use this stuff in the “real world.” Sounds marvellously independent doesn’t it? In fact, it allows us to stack the panel with ISVs that back our cause. Thus, the “independent” panel ends up telling the audience that our technology beats the others hands down. Get the press to cover this panel, and you’ve got a major win on your hands.

Finding a moderator is key to setting up a stacked panel. The best sources of pliable moderators are:

-- Analysts: Analysts sell out - that's their business model. But they are very concerned that they never look like they are selling out, so that makes them very prickly to work with.

-- Consultants: These guys are your best bets as moderators. Get a well-known consultant on your side early, but don't let him publish anything blatantly pro-Microsoft. Then, get him to propose himself to the conference organizers as a moderator, whenever a panel opportunity comes up. Since he's well- known, but apparently independent, he'll be accepted – one less thing for the constantly-overworked conference organizer to worry about, right?

See also:
http://www.robweir.com/blog/2009/05/follow-up-on-excel-2007-sp2s-odf.html

Blog Archive