Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

And the language geek asks for IPA... #11

Open
HughP opened this issue Apr 6, 2015 · 28 comments
Open

And the language geek asks for IPA... #11

HughP opened this issue Apr 6, 2015 · 28 comments

Comments

@HughP
Copy link

HughP commented Apr 6, 2015

@randallmunroe and others (@kolbylyn @rgbkrk ), I was reading the discussion on #9 and... Sooo I thought I'd ask, is it beyond all geekery sensibleness to ask for IPA characters to be added to the font? I mean we're not all astronomy and math students who read xkcd.... ;-) If we can start with some hand writing samples again, I'll look at reaching out to some font developers and adding the glyphs to the font proper... but I'd need the original hand writing samples. I guess much like what was asked for and provided in #9.

@certik
Copy link

certik commented Sep 1, 2017

As a start, here are the ones for Czech:

Á É Í Ó Ú Ů Ý Č Ď Ě Ň Ř Š Ť Ž
á é í ó ú ů ý č ď ě ň ř š ť ž

@pelson
Copy link
Member

pelson commented Oct 11, 2017

As a start, here are the ones for Czech:
Á É Í Ó Ú Ů Ý Č Ď Ě Ň Ř Š Ť Ž
á é í ó ú ů ý č ď ě ň ř š ť ž

@certik It may be possible to manufacture these glyphs from what we already have. It would involve a bit of programatic hack and slice of the glyphs coming out of https://github.com/ipython/xkcd-font/blob/master/xkcd-script/samples/handwriting.png, but it is conceivable to do a good-enough job of it.

No such luck for the IPA characters though...

@thaliaarchi
Copy link

I frequently view XKCD comics using XKCD Open Source which uses this font. Unfortunately, of the German diacritics, this font only supports Ü. This means that sights like "ERKLäREN" are common where ä is in a fallback font. Could Ä/ä, Ö/ö, Ü/ü, and ẞ/ß be added to this font?
In 1647 Diacritics, there are several diacritics that could be the source for these additions: résümȩ̊́́́̆.́́́

@fuhrmanator
Copy link

I was using this font for handwritten-looking diagrams for my courses in French, when I realized the accented characters were standing out like boring type... XKCD or OCD?
image

@HughP
Copy link
Author

HughP commented Nov 18, 2020

I found another missing character I use all the time today; and now I must write "sans em-dash".

@dummy-index
Copy link

I add accented letters (includes cedilla, ogonek, caron, breve), en-dash, em-dash, degree, minus (longer than hyphen-minus), multiply, long s, etc., and kernings.
https://github.com/dummy-index/xkcd-font/tree/brushup/xkcd-script/font

@HughP
Copy link
Author

HughP commented Dec 6, 2020

@dummy-index do you have a total list of characters? when you added accented letters did you add these accents as combining diacritics or as composite character/pre-composed characters?

@dummy-index
Copy link

@HughP

as combining diacritics or as composite character/pre-composed characters?

Both. precomposition runs based on the Unicode Character Database.
Like a 1647: Diacritics

a total list of characters

charlist.txt

import os
import fontforge
base = '../font/'
ttf = os.path.join(base, 'xkcd-script.ttf')
font = fontforge.open(ttf)
glyph_iter = font.__iter__()
for glyphname in glyph_iter:
	if font.__contains__(glyphname):
		glyph = font.__getitem__(glyphname)
		if glyph.unicode >= 0:
			print(hex(glyph.unicode))
font.close()

@HughP
Copy link
Author

HughP commented Dec 13, 2020

@dummy-index I was looking at the font metadata, and it says "Version 1.0" But is this still accurate?

@dummy-index
Copy link

@HughP I'm thinking, but want to change the version number system to such as 1.000 .
(my immediate goal is Ver. 1.100, and release candidates are 1.090, 1.091, ...)

@HughP
Copy link
Author

HughP commented Dec 16, 2020

Well I definitely recommend semantic versioning https://semver.org/ BUT in this case, IF I understand the creative work you released, I think it is a fork of the original. In that case it needs to indicate that.... Something like this: https://dylanbeattie.net/2017/01/26/semantic-versioning-with-powershell_26.html But I have never done this before, but I am interested in this notation for other professional projects I am involved with.

@dummy-index
Copy link

dummy-index commented Dec 19, 2020

Mmm... What is the public API of this font? Which do you think the "Version 1.0" of master corresponds to, 1.0.0 or 0.1.0? Or set the version number of the generator script?
Certainly I should add some string to the version, because I'm an outsider of ipyhon project.

@HughP
Copy link
Author

HughP commented Dec 19, 2020

  1. I am not sure that one can equate a version of a font to an API. So, I don't think there is a public API of a font.
  2. I think that "Version 1.0" = 1.0.0
  3. Good question. Have you reached out to the original project (from which you forked) to ask them for feed back? They might accept your contribution and increment their version number rather than introducing a variant in the wild.
  4. Definitely add a string to indicate it is a variant of an other project.

@fuhrmanator
Copy link

In semantic versioning, major revisions are "breaking" changes. I could think of that as a document using this font would look differently after a major revision.

Adding new characters that weren't previously supported would be a minor revision.

Fixing a character that displayed improperly would be a patch.

@dummy-index
Copy link

I don't intend to establish another project. At first, there were some reason to hesitate PR-ing. (#34 #36) Now I has been able to build the font file in same way as pelson. I'll PR after some more things.

I think my most "breaking" change is the kerning. (Although it's no effect for apps not supporting 'kern,' Microsoft says "This feature should be active by default" hence it should be treated as breaking change.) my kernings are bit too condensed for small-point text.

@HughP
Copy link
Author

HughP commented Dec 23, 2020

FYI: something to think about. I converted the font to wott2 for internet use and found two issues which could use some "tweaking"...

  1. the bigraph "cc" looks unnatural. "c" is raised and this I think is part of the effect of the handwriting, but the second "c" should not be the exact same height. It either needs to randomly be even higher or lower, or consistently the same height as an "e" or there abouts.
  2. There is no combining macron below diacritic U+0331 ◌̱ in the current version. I would think that the glyph for hyphen-minus or en-dash could be used for the character in question, an the lowered height would likely be the same as the amount from bottom as the above the base diacritics would be found. Some examples of underlining are seen in: https://xkcd.com/1051/ https://xkcd.com/285/, however, underlining is not the same as the combining macron below... The image below shows the "cc" bigraph, and also the fall-back nature needed for use of U+0331.
    xkcd2

Job Well done on the creation of non-breaking hypen, and of the grave and acute diacritics. Those all work for me.

Note: Macron below, U+0331 ◌̱ COMBINING MACRON BELOW, is a combining diacritical mark that is used in various orthographies. It is not to be confused with U+0320 ◌̠ COMBINING MINUS SIGN BELOW, U+0332 ◌̲ COMBINING LOW LINE and U+005F _ LOW LINE.

@jorgesumle
Copy link

I could add Esperanto letters (Ĉ, Ĝ, Ĥ, Ĵ, Ŝ, Ŭ, ĉ, ĝ, ĥ, ĵ, ŝ, ŭ) using Fontforge. Here is the result:

robota-estonteco

I don't know how to contribute this, so if this addition interests you, I ask you to guide me on how to contribute.

@HughP
Copy link
Author

HughP commented Sep 6, 2023 via email

@jorgesumle
Copy link

jorgesumle commented Sep 6, 2023

I did it adding individual diacritics, and then combining them with letters to create the Unicode characters I needed (see the linked guide).

@story645
Copy link

story645 commented Nov 13, 2023

I don't intend to establish another project. At first, there were some reason to hesitate PR-ing. (#34 #36) Now I has been able to build the font file in same way as pelson. I'll PR after some more things.

Any chance you'd PR it now? It'd be really helpful to get it in for matplotlib/matplotlib#27299 / matplotlib/matplotlib#26854

@dummy-index
Copy link

Oh, thank you for your concern.
There are a few things to do...

  1. "OCH" ligature fails in some application. Reference says liga table must be sorted. (soon)
  2. Add some ligatures to gain more handwriting effect.
  3. It is difficult to distinguish "æ" from "œ". I want "open a". cf. 2251: Alignment Chart

@Carreau
Copy link
Member

Carreau commented Nov 17, 2023

Some notes as I was recently asked personally what was the state of this repository.

I don't think many of the committers in this repository really all know what they are doing with fonts, and we likely all had notification off.

Personally I have no clue how to build a font file, how to add a character. Though if some of you want know how to do that, and have a nice way to be able to review the changes, I would be happy to merge it.

Among other I guess a demo page (like https://monaspace.githubnext.com/), would be nice.

I guess a really nice first step would be for someone that understand how this repo work to help fill the .github/CONTRIBUTING.md that appear to be empty. (even if it's just sending a PR that say "we know this file is empty please help us completing it", or better dig through history to see why it's empty.

Thanks,

@rgbkrk
Copy link
Member

rgbkrk commented Nov 18, 2023

Though if some of you want know how to do that, and have a nice way to be able to review the changes, I would be happy to merge it.

Same. I sometimes come over to the repo to get the font but it's all greek to me.

@pelson
Copy link
Member

pelson commented Nov 19, 2023

FWIW, I keep an eye here from time-to-time too. I dream of finding the time to extend the with the desired characters, but the reality is that I am not going to be able to invest enough effort to do it well. FWIW I think the steps I would take to achieve it:

  • Manually generate a number of the desired characters using GIMP/Inkscape, and save them in a "generated characters" png (much like the actual handwriting sample one)
  • Include this in the font generation, taking into account the thickness/size/kerning details of the original script

This will require some upfront maintenance:

  • The repository is based on use of Travis-CI - the first thing to do would be to get it working in github actions
  • The software stack I used originally was quite fragile - in the end I published the docker image because I wasn't able to re-build FontForge reliably at the time. I'm sure FontForge has moved forwards a long way since then, and so it would be great if the image being used was more standard (or even apt/apk installed versions of FontForge used)

Whilst I don't have the capacity to do these things, I would be happy to support somebody who is motivated to give it a go.

@Tim-the-gitter
Copy link

No coding experience here, but I have a feeling this will help.

@Tim-the-gitter
Copy link

No coding experience here, but I have a feeling this will help.

BTW, actual comic

@rgbkrk
Copy link
Member

rgbkrk commented Sep 9, 2024

Well I'll be. After all this time.

image

@Tim-the-gitter
Copy link

Maybe the Kepler-283 section on the bottom-left of this or this will help. NO SCREENSHOTS, COPY THE IMAGE. YOU KNOW WHY? CLICK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests