I need to apply a black outline to a font but maintain the white fill color. Expanding the stroke or adding an outline style applies the outline, but when I generate the .ttf or the .otf, the fill color is lost. I've never used fontforge before and a lot of the terms in the documentation are lost on me. Any guidance is appreciated. Using Windows 10.
FontForge - Add stroke to font with fill color and generate font
1.3k Views Asked by K K At
1
There are 1 best solutions below
Related Questions in FONTS
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- In my Flutter Project, I want to customize the font of a text, but it doesn't work
- Ubuntu wsl2 in windows, my /etc/fonts/fonts.conf keeps reloading
- Problem with sample code to set font properties for a whole XWPF Paragraph that includes Word fields
- I need to display alt characters
- Change back to default font size in Android Studio
- Custom Fonts used in react.js application are not visible after deployment on vercel
- Changing font colour on locked text box
- how to implement ZWJ and NZWJ in fontlab
- The p5js library's loadFont function does not seem to work for me?
- Use Google Font Without Network Connection
- How Can I Use the Poppins Font on My Website (coded with HTML, CSS, and JavaScript)?
- PDField set default appearances multiple fonts - pdfbox 2.0
- Why is my font-weight only switching from normal and bold instead of following the number?
- How to extract font names using PyMuPDF without subsets?
Related Questions in TRUETYPE
- Using custom fonts in react native
- Have emoji working in sphinx latexpdf xelatex generated content, titles and code
- How to use cursive letters with Pacifico font?
- How can I specify weight for variable font in Golang
- Convert TTF font glyphs to polygons
- how can I get font metadata by font file (.ttf,.otf,.woff2,.woff) using javascript?
- How to obtain head.ChecksumAdjustment?
- Wrong extra spaces for CID TrueType formated lines when converting PDF to JPG with Ghostscript
- Android Typeface.createFromFile(File) native crashes in production
- Network-Font with glyph variations is displayed wrong in chrome
- How can I use Google Drive to host a ttf file for my code?
- enscript cannot print spaces with Truetype Consolas font
- Can't get bitmap of glyph from TrueType font file with stb_truetype library
- Height Difference between characters while displaying using font file
- Having Trouble Getting Text Font to work in .ejs file
Related Questions in OPENTYPE
- OpenType's Chained Contexts Substitution: what is semantics?
- What are the values for "drop-out mode" in freetype?
- CSS OpenType: How to replace a single letter in entire text with character from Stylistic Set 1 without affecting other letters?
- modular/programmatic OTF font
- Is there a font that uses glyf table point values to align compound glyph components?
- How in Swift do I iterate over all FourCharCode table tags for a loaded, OpenType font?
- How to identify characters with duplicate glyphs in a font?
- Problem locating 'cmap' subtables in TrueType file (C#)
- "Windows Forms" seems to support OTF-Fonts. But why does it work, when everyone else says the opposite?
- opentype.js: Path.fromSvg() method is not a function
- My custom webfont is not displaying properly in iOS 16
- How can I fix the PDF preflight error: "The 'Widths' array in a font has an invalid length"
- VS Code: behavior of "editor.fontLigatures" and "editor.fontVariations"?
- FontForge - Add stroke to font with fill color and generate font
- can i add a opentype feature in html/css?
Related Questions in FONTFORGE
- SVG to Glyphs conversion
- How to copy glyphs between two strikes in fontforge without scaling?
- Hebrew Diacritics Positioning Error In Word Processor
- How do I compare the widths of two different fonts?
- How can I reduce the .ttf file size to reduce overall size of PDF generated by PDFJet library in JAVA?
- font forge remove glyphs
- Height Difference between characters while displaying using font file
- How do I edit a custom font's size in Skyrim SSE?
- After setting the same width via python font forge cannot edit font anymore
- How to fix the CID set of a font?
- How can I render a .ttf font without anti-aliasing, then export that font as a .ttf for the web?
- FontForge's SplineSet syntax
- how to move bottom linespace in fontforge
- issue with Custom Font Not Displaying Properly in Microsoft Word when Switching to Russian Language
- How to combine 3 different font files as one ttf file?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In a OpenType font, glyphs are described as shape outlines that get filled by a TrueType or CFF (PostScript type 1) rasterizer. The rasterizer is determining which regions are interior to the outline and, accordingly, which pixels get "ink". But the rasterizer doesn't determine the colour. It's up to the application to determine what colour is used for the glyph shape interior (the "foreground" colour) and what colour is used for the background.
Many graphics apps allow you to set a fill colour separate from the stroke colour. But the way that is done is to draw the text using the fill colour as foreground colour (as text would normally be drawn), and then separately to obtain the outline data from the font and then to draw that as paths on top of the "fill". In effect, the app is using the outlines twice in two different modes.
You can create a font that appears as outline stroke with a fill where the foreground colour applies to the outline and the background colour applies to the fill. E.g.,
These kinds of fonts are often referred to as "outline" fonts. (Don't get confused with the technical sense of "outline" to mean the paths in a font's glyph data.) Here's another example of the same font but with the foreground colour set to red and the background set to light green:
The way that would be done is that the glyph outline includes the outer and inner contours of the stroke.
The rasterizer will turn on pixels only for the interior regions of the combined paths.
So far, this is describing typical monochrome fonts. If you want to control the colour of the outline stroke and the fill within the font, then you can create a colour font. Unlike typical monochrome fonts, in which the font doesn't specify any colour info and the app determines foreground and background colours, colour fonts have polychromatic glyphs in which the font developer specifies particular colours. See here for an overview of colour fonts (a little dated and doesn't mention recent enhancements, but still a good intro).
The OpenType spec supports different formats for colour fonts:
I don't know if Fontforge supports creation of colour fonts, but other font development apps such as FontCreator, FontLab and Glyphs do have support for colour fonts.