2

My phone is a rooted Nexus S running the custom ROM Replicant. I copied twelve font files comprising three fonts (Arimo, Cousine, and Tinos) from my computer to the SD card, used a root file manager to copy the files to /system/fonts, and then rebooted the phone. Yet I am still unable to use these fonts. On par with the other font files in the folder, they are indeed .ttf files. For example, when I view this HTML file in the HTML viewer:

<!DOCTYPE html>

<html>

<head>

<style>

.arimo { font-family: "Arimo", sans-serif; }

.cousine { font-family: "Cousine", monospace; }

.tinos { font-family: "Tinos", serif; } </style> <meta charset="UTF-8">

<title>Font Test</title>

</head>

<body>

<p class="arimo">Arimo paragraph</p>

<p class="cousine">Cousine paragraph</p>

<p class="tinos">Tinos paragraph</p>

</body>

</html>

The paragraphs display in Roboto, Droid Sans Mono, and Droid Serif respectively. Why does the system not recognize the newly installed fonts? Is there some configuration file I need to edit?

1 Answer 1

1

Problem mostly, but not entirely, solved. For Arimo whatever font you want to install, you need to insert this text between the <familyset> tags in the file /system/etc/system_fonts.xml:

<family>
  <nameset>
    <name>the name of your font</name>
    <name>arial</name>
    <name>helvetica</name>
  </nameset>
  <fileset>
    <file>Arimo-Regular.ttf</file>
    <file>Arimo-Bold.ttf</file>
    <file>Arimo-Italic.ttf</file>
    <file>Arimo-BoldItalic.ttf</file>
  </fileset>
</family>

And remove the designations of "arial" and "helvetica" from the Roboto entry. The reason this is not entirely solved is it works only in the browser and not the HTML viewer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .