Mapping alternative font characters (OpenType)?

Discuss the word processor

Mapping alternative font characters (OpenType)?

Postby forrie » Fri May 01, 2020 11:17 pm

Is there a way in OpenOffice to map out alternative font characters in OpenType font faces?

For example, I have a third-party font that I use for writing that has alternative fonts for Q and others, that I would prefer the application use instead of the standard.

I see that we can do general font substitution, but this isn't what I'm looking for. I want to map specific characters from within that OpenType font (which it has several).


Thanks.
OOo 2.3.X on Mac OSx other
forrie
 
Posts: 16
Joined: Sun Mar 29, 2009 6:26 pm

Re: Mapping alternative font characters (OpenType)?

Postby Zizi64 » Sat May 02, 2020 6:20 am

The OpenOffice and the LibreOffice uses those fonts that are installed on your operating system. Install the desired fonts, restart the computer, and then try it in the Writer.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9540
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Mapping alternative font characters (OpenType)?

Postby Zizi64 » Sat May 02, 2020 6:39 am

For example, I have a third-party font that I use for writing that has alternative fonts for Q and others, that I would prefer the application use instead of the standard.

Do you want to format differently some individual charactes inside a text? It is possible by the usage of the Character Style feature. Create and apply a different character style.
Generally it is not a good idea, but there are cases (to show special signs, physical quantities, and others) when it is necessary.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9540
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Mapping alternative font characters (OpenType)?

Postby RoryOF » Sat May 02, 2020 9:05 am

If, for a particular document, you wish to map always the same subset of characters, I would suggest editing the master font with a suitable font editor and making a subset font, containing only those characters you wish. Give this a unique name and use it, not the master font.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31414
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Mapping alternative font characters (OpenType)?

Postby JeJe » Sat May 02, 2020 2:11 pm

Its looks like you can't do this:

viewtopic.php?f=30&t=63368&hilit=opentype+font#p281061

This might help you edit the font:

https://fontforge.org/en-US/
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1145
Joined: Wed Mar 09, 2016 2:40 pm

Re: Mapping alternative font characters (OpenType)?

Postby John_Ha » Sat May 02, 2020 3:11 pm

forrie wrote:I want to map specific characters from within that OpenType font (which it has several).

I have a recollection that LO supports OpenType better than (the walking dead) AOO. See Opentype features now enabled? Documentation?

Be sure to read the AOO Write Guide Find and replace specific formatting on page 67 for ideas.

Say you want to replace all Arial " Q " by Comic Sans " Q "

1. Copy a Comic Sans " Q " to the clipboard
2. Do a Find and Replace and Find All Arial Q. This highlights all Arial Q as below.
3. Press Ctrl+V.

All done.

Clipboard01.png
Note only the Arial Q are found

Or Define a Tools > AutoCorrect > Replace ..., such that when you type something unique, say, %%Q, AutoCorrect changes it to Comic Sans Q. Paste the required Comic Sans Q in the Replace box. See [Tutorial] Automatic functions in Writer - enable / disable for more information =- it requires a following space.

Or you may be able to do it with AutoHotKey. Define a substitution like %%Q gives Comic Sans Q. It works in any application and does not require that a space follows before the substitution is made. I cannot immediately see how to change the font but it is probably possible.

Or record a macro with an icon on a toolbar. Click the icon to run the macro which uses Insert > Special character, and inserts that character. A macro could also add the following space to force AutoCorrect to work, and then backspace to delete the space. See [Tutorial] How to record a macro (and Regular Expressions).

Or use the Alternate Find and Replace add-on where the Replace can be a hex or decimal character code. See its Help - the icon with a " ? ".

Code: Select all   Expand viewCollapse view
\xhhhh - inserts a character using the hexadecimal character code (as hhhh)
\#ddddd - inserts character using the decimal character code (as ddddd).

Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Mapping alternative font characters (OpenType)?

Postby forrie » Sat May 02, 2020 10:20 pm

This may be what I need to do.

The font I purchased is expensive, but has many alternative fonts in the mapping. For example, there is an alternative Q that has a long tail, which I want to always be used. There aren't many, but if I can create a version of the Font with the tool below, that will suit my needs, this would be fine with me. I've never done this before.



JeJe wrote:Its looks like you can't do this:

viewtopic.php?f=30&t=63368&hilit=opentype+font#p281061

This might help you edit the font:

https://fontforge.org/en-US/
OOo 2.3.X on Mac OSx other
forrie
 
Posts: 16
Joined: Sun Mar 29, 2009 6:26 pm

Re: Mapping alternative font characters (OpenType)?

Postby RoryOF » Sat May 02, 2020 10:25 pm

In addition to selecting your choice of characters, you may need to change the internal name of the font to match the filename you use for it. Make sure not to overwrite your original font - always work on a copy.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31414
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland


Return to Writer

Who is online

Users browsing this forum: No registered users and 14 guests