Showing posts with label fonts. Show all posts
Showing posts with label fonts. Show all posts

Wednesday, February 20, 2013

Installing fonts for Z Notation symbols

Created: 7th February 2013M / 26 Rabiulawal 1434H, Th. [Ubuntu 12.04 Precise Pangolin]
Published: 20th February 2013M / 9 Rabiulakhir 1434H, We.
Updated: -


Assalamualaikum warahmatullah. My husband wanted to use the Z Notation domain antirestriction symbol, see Pic 1, in his assignment.

Pic 1 - Domain antirestriction symbol of the Z Notation using the Code2000 font as displayed here:
Unicode Character 'Z NOTATION DOMAIN ANTIRESTRICTION' (U+2A64)
http://www.fileformat.info/info/unicode/char/2a64/index.htm


I was unable to do a thorough search in the list of fonts in LibreOffice Writer because the Special Character dialog hang for unknown reasons. Up to that point there was no similar symbol to be found. I shutdown his laptop then moved-on to my laptop to do an online search.

Scrolling through the list of symbols here:
Unicode Characters in the 'Symbol, Math' Category
http://www.fileformat.info/info/unicode/category/Sm/list.htm
... I finally found the symbol. See Pic 2.

Pic 2 - List of math symbols, before installing the necessary font. In the rightmost column are images of the symbol. In the column next to the images are the symbols as displayed by the browser.



Part A: Test your browser

To check whether or not your brower supports the symbol in Pic 1, simply click this link:
Browser Test Page for Unicode Character 'Z NOTATION DOMAIN ANTIRESTRICTION' (U+2A64)
http://www.fileformat.info/info/unicode/char/2a64/browsertest.htm

The unsupported symbol will look pixeled like in Pic 3 while the supported symbol will look smooth like in Pic 4; that is unless the symbol is originally created to have a pixeled-look like the GNU Unifont in Pic 6.

Pic 3 means:
"You don't have the font in your system so the symbol is not displayed correctly in the browser."

Pic 4 means:
"You have the font in your system so the symbol is displayed correctly in the browser."

Proceed if you need to install the font.

Pic 3 - Unsupported. Pixeled. From the FileFormat.Info website.


Pic 4 - Supported. Smooth. From the FileFormat.Info website.



Part B: Local fonts check

To check the fonts in your system that supports the symbol in Pic 1, see Pic 5, simply click this link:
Local Font List
http://www.fileformat.info/info/unicode/font/fontlist.htm?text=⩤+-+Unicode+Character+'Z+NOTATION+DOMAIN+ANTIRESTRICTION'+(U%2B2A64)

Pic 5 - Checking local fonts, after installing a font that supports the symbol in Pic 1.


Prior to this post, no fonts in my system can display the symbol correctly. So a font that supports this symbol needs to be installed.



Part C: List of fonts that supports the Z Notation characters

Click the View All text-link to preview the symbols in the list of fonts installed on the FileFormat.Info server that supports the Z Notation symbols, see Pic 6, here:
Z NOTATION DOMAIN ANTIRESTRICTION (U+2A64) Font Support
http://www.fileformat.info/info/unicode/char/2a64/fontsupport.htm

Pic 6 - Among the fonts that support the Z Notation symbols. From the FileFormat.Info website.


Among the fonts that supports the Z Notation characters are:
  • Code2000
  • EversonMono
  • EversonMono-Oblique
  • GNU Unifont
  • LastResort
  • Quivira
  • STIXGeneral-Regular
  • Symbola
  • Unicode BMP Fallback SIL

Note that only the bolded fonts are available in Ubuntu Software Center.



Part D: Installing a font that supports the Z Notation characters

In Part C, I chose to use the STIXGeneral-Regular font.


1. Run Ubuntu Software Center.


2. In the search field, type-in the search term, see Pic 7:
stix
The search results will auto-filter.

Pic 7 - Refer to Step 2. Searching for the package.


3. Click the...
Scientic and Technical Information eXchange fonts
fonts-stix
... package. See Pic 7.

Then choose either:


A. Click the Install button (see Pic 7) to install right-away.


or


B. Click the More Info button (see Pic 7) to read more about the package and click the Install button later. See Pic 8.

Pic 8 - Refer to Step 3.B. More information about the STIX (Scientic and Technical Information eXchange) font package.


4. The Authenticate dialog will pop-up. See Pic 9.

Enter the password in the Password: field then click the Authenticate button.

Allow the installation process to take place.

Pic 9 - Refer to Step 4. Authenticating the installation.


5. After the installation process is completed, either:
- test your browser, refer to Part A; or
- try the local font check, refer to Part B, (the STIXGeneral font is used in Pic 5); or
- try-out the newly-installed font in LibreOffice Writer.



Alhamdulillah. Wassalam.

Sunday, May 6, 2012

How to use XeLaTeX in Kile + change the font to Arial

14 Jamadilakhir 1433H, Ah.

Update: 8th May 2012, Se.

Assalamualaikum. By preparing a research proposal, my husband is learning how to use LaTeX in Kile. He is starting from scratch and wants to use the Arial font instead of the default font, Computer Modern.

i myself don't know how and never thought of such a thing. After a late evening of much ask and answer, try and error, tease and jabber, google and sigh, eat and idle, and much more... Here's how to implement the Arial font in a LaTeX output document (referring to the PDF file).

You'll notice the difference with the Panel in a few screenshots because i was working on my husband's laptop ;). The fine editing was done on my laptop later on.



Part A: Obtaining the Arial font

1. Run Ubuntu Software Center.


2. In the search field, type-in the search term "arial". The results will auto-filter. See Pic 1.


3. Select the result: Installer for Microsoft TrueType core fonts (ttf-mscorefonts-installer). See Pic 1.

If you want to install straightaway-no-delays, click the Install button.
* In Pic 1, seeing that i have already installed these fonts, the Install button has turned into the Remove button.

If you want to see the available Add-ons, click the More Info button. See the Add-ons, shown in Pic 2. When you are ready to install, click the Install button.

Pic 1 - Refer Step 2 and Step 3. Searching for the Arial font installer in Ubuntu Software Center.


Pic 2 - Refer Step 3. The Add-ons for the Installer for Microsoft TrueType core fonts (ttf-mscorefonts-installer).


4. An Authenticate window will appear prompting for your password. Key-in your password in the Password: field, then click the Authenticate button. See Pic 3.

Pic 3 - Refer Step 4. Password prompt to authenticate the action.


5. After downloading but before installing the fonts, a EULA(?) window will appear. To accept the terms and conditions, put a tick in the box. Then click the Forward(?)/Next(?)/OK(?)* button.

* Hoping to make a screenshot of the EULA(?) window, i removed the fonts (using the Remove button in Pic 2) then re-installed (using the Install button) but the EULA window did not appear on the second install :-\. Sorry.


6. Once the fonts are installed, the Install button will turn into the Remove button. See Pic 1 and Pic 2.



Part B: Installing the xltxtra package

Without the xltxtra package, you will get one of the errors mentioned in Step 16.

If you already have this package, then skip to Step 12.

If you do not have this package yet, then proceed to Step 7.


7. Run Ubuntu Software Center.


8. In the search field, type-in the search term "xltxtra". The results will auto-filter. See Pic 4.


9. Select the result: TeX Live: XeTeX packages (texlive-xetex). See Pic 4.

If you want to install straightaway-no-delays, click the Install button.

If you want to see the list of XeTeX packages and available Add-ons, click the More Info button. When you are ready to install, click the Install button.

Pic 4 - Refer Step 9. Searching for the xltxtra package installer in Ubuntu Software Center.


10. An Authenticate window will appear prompting for your password. Key-in your password in the Password: field, then click the Authenticate button. See Pic 3.


11. Once this package is installed, the Install button will turn into the Remove button. See Pic 5.

Pic 5 - Refer Step 11. The Install button is now the Remove button.



Part C: Producing document with Arial font

12. Run Kile.
i'm not sure if it works the same in other editors, though giving it a try shouldn't hurt :).


13. Create a new document. Click File > New. See Pic 6.

Pic 6 - Refer Step 13. Creating a new document in Kile.


14. A window* will appear. See Pic 7.

* The pop-up windows on my husband's laptop doesn't seem to have a title bar. Checking on my laptop, the window is New File -- Kile.

Under the Document Type section, select LaTeX Document.

Under the Template section, scroll to the end then select Xelatex.

Then click the OK button.

An Untitled document with contents is automatically created. See Pic 8.

Pic 7 - Refer Step 14. The New File -- Kile pop-up window. Creating a new LaTeX document using the XeLaTeX template.


Pic 8 - Refer Step 14. Screenshot of the newly created XeLaTeX template titled Untitled in Kile.


15. Save your document. If you don't save now, you will still need to do so and will be prompted with:
[QuickBuild] Please save the untitled document first.
when building/compiling later on. See Pic 9.

Pic 9 - Refer Step 15. Save first, only then can build.


Click File > Save As... .

In the pop-up window*, see Pic 10:

* Again, no title bar. Checking elsewhere, it's the Save File -- Kile window.

Under the Places section, locate where on your hard-disk do you want to save this document.

In the Name: field, give it a name.

Then click the Save button.

i named mine xeletex test  (i know, i misspelled it out of excitement :P) and placed it on the Desktop.

Pic 10 - Refer Step 15. Give the document a name and place.


16. If you were to click Build > QuickBuild now, among the many possible errors you might encounter are:

./test:5:File `xltxtra.sty' not found. ^^M
[PDFLaTeX] 1 error, 0 warnings, 0 badboxes
See Pic 11. This error is because the package is not installed in the system.

In order to eliminate this error, proceed to Part B. After Part B is completed, proceed to Step 17.

Pic 11 - Refer Step 16. Error because the xltxtra package is not installed.


*** this package currently works only with XeTeX ***
See Pic 12. i'm guessing you will get this error because of the QuickBuild. In order to eliminate this error, proceed to the next step.

Pic 12 - Refer Step 16. Error probably because of the QuickBuild.


17. In the document, change the font from Linux Libertine O to Arial.

Then click Build > Compile > XeLaTeX, see Pic 13. Alternatively, the XeLaTeX shortcut button is shown in Pic 14.

This time there supposedly should be no more errors, see Pic 15:
[XeLaTeX] 0 errors, 0 warnings, 0 badboxes
[XeLaTeX] Done!

Pic 13 - Refer Step 17. Compiling using XeLaTeX.


Pic 14 - Refer Step 17. The XeLaTeX shortcut.


Pic 15 - Refer Step 17. Done! To copy+paste the content you see here, go to Part D.


18. To see the output:

Either view the PDF file straightaway. Locate the file at the same place where you saved the XeLaTeX document when in Step 15.

Or

Click Build > View > ViewPDF, see Pic 16. Alternatively, the ViewPDF shortcut button is shown in Pic 17.

Pic 16 - Refer Step 18. Viewing the output file using ViewPDF.


Pic 17 - Refer Step 18. The ViewPDF shortcut.



Part D: It's Arial, alright!

Some might argue that the font in use is not Arial but a clone or a close mimic of it. This article shows the differences between the Helvetica, Arial, and Grotesque fonts: How to Spot Arial.

Now that you know how the "a" of the Arial font is supposed to look like, Pic 18 is my proof that the font used in Part C is really Arial.

Pic 18 - The document in Okular at 250% zoom.


Here's the content of the file seen in Pic 15:

\documentclass[a4paper,10pt]{article}
%\documentclass[a4paper,10pt]{scrartcl}

\usepackage{xltxtra}

\setromanfont[Mapping=tex-text]{Arial}
% \setsansfont[Mapping=tex-text]{DejaVu Sans}
% \setmonofont[Mapping=tex-text]{DejaVu Sans Mono}

\title{Arial font}
\author{}
\date{}

\begin{document}

\maketitle

\Huge{Aa Bb Cc Dd Ee Ff \\
Gg Hh Ii Jj Kk Ll \\
Mm Nn Oo Pp Qq Rr \\
Ss Tt Uu Vv Ww Xx \\
Yy Zz 0 1 2 3 \\
4 5 6 7 8 9}

\end{document}

Still not convinced?

Open the generated PDF file.

Click File > Properties, see Pic 19.

In the Properties pop-up window, under the Fonts tab is the list of embedded fonts, see Pic 20. The Arial font is embedded under its "postscript name" as ArialMT. Read here about Arial and Arial MT: Arial being changed to ArialMT in PDF.

Convinced? :)

Pic 19 - Summoning the properties.


Pic 20 - Arial font embedded in PDF document.



Here, i would like to thank the person who taught me the basics of LaTeX, Dr. Bakri Adam from Faculty of Science, Universiti Putra Malaysia (UPM).

Thursday, December 30, 2010

How to remove custom fonts (user fonts) on Ubuntu

Update: 3 January 2011 / 28 Muharam 1432H, Is.

24 Muharam 1432H

After clicking the Install Font button, see Pic 1, and trying out a new font, it turns out that that new font isn't what i want on my list of fonts. But how does one remove it?

Pic 1 - The Install Font button. Easy to install, hardly know how to uninstall :p


Before removing the unwanted font, Pic 2:

Pic 2 - The unwanted font shown in OpenOffice.org Writer. Before removing.


After removing the unwanted font, Pic 3:

Pic 3 - The unwanted font shown in OpenOffice.org Writer. After removing.


Like any seasoned Windows user, i did go through the fonts file, see Pic 4, but couldn't find the font i want to delete. By the way, the file is located here:
File System > usr > share > fonts.

Pic 4 - Locating the fonts folder in Ubuntu.


So, i did some searching and found these to be helpful:
- How to remove installed fonts in Ubuntu
- How to Delete Ubuntu Fonts

Turns out that a font installed using the Install Font button is referred to as custom fonts or user fonts.

Here, i refined the explanations.


1. Run the Terminal. The Terminal, shown in Pic 6, is located here:
Panel > Applications > Accessories > Terminal. See Pic 5.

Pic 5 - Refer Step 1. Running the Terminal from the menu.


Pic 6 - The Terminal, freshly loaded.


2. Type in the command as follow:
cd /home/username/.fonts
Source: How to remove installed fonts in Ubuntu
Refer Pic 7.

Pic 7 - Refer Step 2. Changing directory to the fonts folder.


3. Change the part username in Step 2 to your username. Mine is aisha. See Pic 8.

In my case, it's:
cd /home/aisha/.fonts
Then press the Enter button. A new command line appears as shown in Pic 9.

Pic 8 - Refer Step 3. Changing the username in the command.


Pic 9 - Refer Step 3. We are now in the fonts folder.


4. To see the list of items in the fonts folder, type the command as follow:
ls
Source: How to remove installed fonts in Ubuntu
Refer Pic 10. Then press the Enter button. A list of custom fonts appears, similar to Pic 11.

Pic 10 - Refer Step 4. Adding command to see the list of items in the fonts folder.


Pic 11 - Refer Step 4. List of user fonts installed in my laptop.


5. From the list, similar to as seen in Pic 11, look for the font(s) you want to remove. Then type in the the command as follow:
rm
Source: How to remove installed fonts in Ubuntu
followed by the name of the font(s) you want to remove. The are two ways to add the font name:
  1. You can either type-in the name, or
  2. Highlight the name. Press Ctrl+Shift+C to copy. Then press Ctrl+Shift+V to paste.
Then press the Enter button.

In my case, i want to remove the Arabic Typesetting font. So, my command, as shown in Pic 12, will be like this:
rm arabtype.ttf

Pic 12 - Refer Step 5. Adding the command to remove the unwanted font(s).


6. Upon pressing the Enter button in Step 5, a new line to confirm the removal appears. Refer Pic 13.

To proceed with the removal, type in:
y
then press the Enter button, see Pic 14. Then command line seen in Pic 9 appears, also shown in Pic 15. The removal process is completed.

Pic 13 - Refer Step 6. Confirmation required.


Pic 14 - Refer Step 6. Removal confirmed.


Pic 15 - Refer Step 6. Unwanted font has been removed.