Adding fonts for one user only without admin rights on MS Windows

So, you are using a MS Windows machine. You need to add a new font to your document, as those already present do not satisfy your needs. But you have one problem – you are not the Administrator, you lack the necessary admin permissions to access Windows system folders, so there is no way you can install fonts the standard way.

If you google it up, you get a lot of sites telling you that adding fonts as a regular user in Windows is not possible. Well, that is false…

Adding custom fonts for a particular user in Windows is actually quite simple. It isn’t as simple as it is in Linux, but still simple enough.

There are two basic steps:

  1. Copy font files into the user font directory
  2. Add their names and paths to the Windows registry

For example:

Let us assume our user is called “myusername”.

  • See if the following directory exists, create it if it doesn’t:
    C:\Users\myusername\AppData\Local\Microsoft\Windows\Fonts
  • Go get the font. Let’s say we want to have all variants of “Roboto”. We go to Google Fonts , select the font, customize the download by selecting extra variants, then download it as a single ZIP archive.
  • Create a sub-directory for the font family, “Roboto” in this case:
    C:\Users\myusername\AppData\Local\Microsoft\Windows\Fonts\Roboto
  • Unpack all contents of the downloaded ZIP into the newly created sub-directory.

It is a matter of convenience to group the fonts by their family name and store them in separate sub-directories, it is not mandatory. As well you can dump them all together in the Fonts directory.

So far so good. The font files are there but they will stay invisible to MS Windows.

  • Go to Start->Run and start registry editor by running regedit
  • Navigate to the key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Fonts
  • Right-click your mouse and add a new String Value.
  • Give it the name as you would like to see it in the drop-down font list in your application, for example “Roboto” or “Roboto Regular” (This will be known as the “value name”), and press enter.
  • Double-click the newly created record and enter full path to the font file (This will be the “value data”). In our example it will be:
    C:\Users\myusername\AppData\Local\Microsoft\Windows\Fonts\Roboto\Roboto-Regular.ttf

At this point you shall be able to use the Roboto Regular font after a system restart.

If you want, you can add other members of the family to the registry in the same way.

Tested on MS Windows 10 Enterprise (64 bit).


Convert PDF to EPS

You may want to convert a PDF file to EPS format, for example to insert it in a Microsoft Word of LibreOffice Writer document.

One way to do is like this. This workflow creates an intermediary Postscript file during the conversion. Note: no need to provide name of the output EPS file, it will be created automatically.

 

  • pdf2ps myfile.pdf myfile.ps; ps2eps myfile.ps

Find paragraph breaks in LibreOffice

To find paragraph breaks (i.e. the ASCII line feed character 0A hex)  in LibreOffice, use the currency symbol “$” as the search string.

Make sure to look into “Other options” and check “Regular expressions” in the “Find & Replace” dialog.

P.S.

By the way, searching for “\n” and replacing it with “\n” can be done only once, as on the repeated action there will be no matches found anymore and searching for “$” must be done instead. Read some more about this bug/feature/inconsistency here.

 


Reset filters in LibreOffice

You may experience a situation where may not be able to reset filters in LibreOffice, with the Data -> More filters -> Reset all.

Use the alternative way by directly ordering the rows to be shown by Format -> Row -> Show.

 


Count occurences of a character in a cell in LibreOffice

Let’s say you have a list of e-mails in a column in LibreOffice Calc spreadsheet and you want to see if there are cells which contain more than one e-mail address.

To do that you can use the formula below (assuming your e-mails are stored in column A) which will show the number of symbols @ in the particular cell:

=LEN(A1)-LEN(SUBSTITUTE(A1,”@”,””))