Is it possible for a font to exclude the space character?

I'm currently developing a font detection library that must be extremely compact in size, perfect for direct inclusion on every page of a website. I've managed to shrink it down quite a bit already (compressed to 417 bytes). Take a look at it on Github.

After pondering further, I realized that I could reduce the size of the library even more (by approximately 10%) if I operate under a few fundamental assumptions:

  • It seems impossible to create a functional font file (at least for browsers) without including a space character.
  • OR, if by any chance a font sans space character could be produced, then all modern browsers and IE9+ would likely default to using the space character from the fallback font whenever needed.
  • In addition, there's a probability that modern browsers and IE9+ might assign different widths to the space character in generic fonts like serif and monospace, but this requires further testing.

I recently experimented with defining a font devoid of a space character using FontSquirrel's webfont generator. Despite excluding the space from the Subset selection and disabling 'Fix Missing Glyphs' for space, FontSquirrel still generated a font containing a space character with a unique width compared to both serif and monospace.

While I acknowledge that certain languages may not have a conventional space character, given the structure of font file formats and definitions, I believe fonts tailored for such languages would still encompass a space character.

If these hypotheses prove accurate, the library could eliminate the necessity for custom text evaluation, reducing the number of tests from 3 to 2. This adjustment would enhance the library's performance, minimize its memory usage, and result in a new compressed size of approximately 380 bytes or less.

So, esteemed experts in the world of fonts, can you possibly conceive a valid font without a space character? If such a font exists, I'd appreciate an example for reference.

Answer №1

After thorough investigation, it seems that the concept of creating a font without a space character is extremely rare if not virtually non-existent. Even services dedicated to icon fonts seem to adhere to including this character. With the exception of a unique case involving a font detection library, there have been no reported instances of fonts omitting the space character.

This exploration has led me to enhance my onfontready library. More information can be found here. A special thanks to Mike 'Pomax' Kamermans for their valuable contributions.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Angular Nested Interface is a concept that involves defining an

Looking for guidance on creating a nested interface for JSON data like this: Any help is appreciated. JSON Structure "toto": { "toto1": [], "toto2": [], "toto3": [], } Interface Definition export interface Itot ...

Transform the outcome of Request() into a variable

I'm currently working with the following code snippet: request('http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name=Gamma Case', function (e, r, body){ var req_data = JSON.parse(body); conso ...

Highcharts: single point muted and not easily seen when markers are turned off

Highchart displaying data with some null points (only visible via tooltip if marker disabled): https://i.stack.imgur.com/u04v1.png https://i.stack.imgur.com/uRtob.png Enabling markers will resolve the issue of invisible points, but it may look cluttered ...

When running JavaScript from a .js.erb file, it gets executed while still being visible as plain text

I'm facing an issue with a form inside a popup window. Here's how it looks: <%= form_tag "/controller/action", :method => :get, :remote => true do %> ... <% end %> Within my controller: respond_to do |format| format.js end ...

Using Vue.js to showcase real-time Pusher data in Laravel 5.4

I am currently working on developing a real-time chat application using vue.js, Pusher, and Laravel. I have successfully managed to receive information from Pusher, as I can view the JSON data in the console with the correct details. However, I am facing a ...

Creating pagination using AJAX to fetch data from an API while maintaining the same query parameters

Writing a title for this may be a bit tricky, but I'll try my best. On the webpage located at the /music-maker endpoint, there is a modal that contains an input field. This input field captures user input and sends it to the backend using AJAX. The u ...

Retrieve the country code of an IP address using getJSON

I am currently facing an unusual issue. My goal is to extract the country code (like US for United States) from an IP address using free APIs. After some research, I came across ipify for retrieving the IP address (which works fine), and then attempted to ...

Is there a way to configure multiple entry points in a package.json file?

I am looking to execute various commands using npm: "scripts": { "v1": "node v1.js", "v2": "node v2.js" } I would like to use npm start v1 or npm start v2 for this purpose, however, these commands do not seem to trigger the intended Node command. ...

Response text from AJAX in PHP

I am working on an AJAX sign up form and I would like to incorporate a gear wheel animation similar to this When the server successfully signs up a user, I want a specific bar to change to green. To achieve this, I have echoed the names of the functions I ...

Using Vue3 to Enable or Disable the Submit Button Based on Changes in Editable Form Content

Here is a practical example, demonstrating how to create an editable address form. The save button should remain disabled if the form remains unchanged, as there is no need to submit it. However, when a value changes, the save button should become enabled ...

The React Component is caught in a loop of continuous re-rendering and reloading

Just starting out with React and tackling my first project. Running into a bit of trouble here, so I'm sharing my code for some insight. When users input their search term and hit 'search,' they are redirected from another page to this one. ...

Protecting String in PHP to Utilize in JavaScript

When I receive code through AJAX, I handle it as shown below: $verifiedSubject = addslashes(htmlentities($_REQUEST['subject'])); $verifiedBody = addslashes(htmlentities($_REQUEST['body'])); $verifiedAttachment1 = addslashes(htmlentitie ...

Activate filtering beyond the AngularJS datatable

Currently, I am experimenting with a codepen to understand how to filter data based on a clicked span element. The table is where the data is displayed and I'm looking for a way to trigger filtering outside of it. While the angularjs documentation spe ...

Is there a way to identify the specific button that was clicked within an Angular Material dialog?

import {Component, Inject} from '@angular/core'; import {MdDialog, MdDialogRef, MD_DIALOG_DATA} from '@angular/material'; /** * @title Dialog Overview Example with Angular Material */ @Component({ selector: 'dialog-overview-ex ...

What is the solution to eliminating the MultiValueDictKey error when making an AJAX get request?

When handling multiple divs on a web page, each containing a form, I encountered the need to utilize AJAX Get functionality. The goal was to pass the text entered into a form along with the ID of the corresponding div to a Django view for storage in a data ...

What impact does the //g flag in Regex JavaScript have on the program's state?

I recently had a question that was answered, but I'm still trying to grasp why the regex behaves in a certain way. According to w3schools, it explains: g: Perform a global match (find all matches rather than stopping after the first match) Okay, ...

The Google Software Development Kit has encountered a 403 error, indicating that the user has exceeded their

Currently, I am working on integrating the Google Developer SDK into my project to leverage the Google Translate functionality. While everything works smoothly when making a request using my access token obtained from the Google Developer Console, I keep e ...

Deleting entries from a selection of items in a list generated from an auto-fill textbox

I have successfully implemented an auto-complete Textbox along with a styled div underneath it. When the client selects an item from the Textbox, it appears in the div after applying CSS styling. Now, I am looking to create an event where clicking on the s ...

Transform a Mobx observable map into a JavaScript array

I am working with a component that receives the value of "form.$('userProfile').fields" as a prop, which is an observable map. The structure of this map can be seen in the console.log screenshot below: class Location extends React.Component<* ...

Angular dependency injection function

What is the best placement for the common handleError and handleSuccess functions? These functions are commonly used by every service. Where should these functions be placed? Should they be global functions injected as dependencies? (function () { "u ...