neuralfirings / JianZiPu

A font for writing Guqin music in JianZiPu.
https://neuralfirings.github.io/jianzipu/
MIT License
15 stars 1 forks source link

Several questions and suggestions on font making #22

Open alephpi opened 1 month ago

alephpi commented 1 month ago

Hi Nancy,

I've checked the font file and your making procedure, and I have several questions and suggestions.

  1. Which base font do you use for your v2? I wonder if it's an open source font that we can modify for our open source work, if not I recommend this KaiTi font, which is official and open sourced under OTF-1.1 license.
  2. I recommend to add meaningful glyph name for each unicode codepoints, i.e. what you did for spacers (58000,58001,58002) but not the others.
  3. I don't understand why in figmaLayoutDefinitions.txt, there are so many(>10k) lines. I think many of them are repetitions. Will it cause an issue? And when copy as css (all layer), it seems I only get absolute positions instead of relative positions, will that cause an issue?
  4. On the principle of your implementation: I have played with your font, and I find that it seems you actually encode every glyph at every possible positions, e.g. you have number glyph(一、二、...) with variants for basic layout(at bottom, at top right, at top right top, at top right bottom), for chord layout(same position for basic layout but doubled in right part), and for vertical layout(every vertical positions in n-grams). So the presence an unicode character will render the corresponding glyph at that position. And the spacers are used to render space to avoid overlapping of glyph components. Am I right?
  5. If I understand correctly in 4, a very basic question is why you need an explicit spacer, or in other words, how do you manage to overlap the glyphs, since in normal font. It seems we don't need a spacer, so that in 'good', 'o' doesn't overlap on 'g' if its unicode just follows the one of 'g'. Alright, it seems has something to do with advance width.
neuralfirings commented 1 week ago

Hi, apologies for the delay. I've been busy with other projects the past month.

  1. Thanks for your recommendation. Do you have the download link? I tried the download link on that website and it did not lead to a KaiTi font. Maybe I'm looking in the wrong place.

2 & 3 & 4: So the way it works is that I have a Figma Board which has two parts + an Excel sheet. These are the pieces a human designer would interact with. -- Part 1: Components (see below): These are parts that make up characters. I have different weights as well, for example the numbers are heavy weight when small, and lighter weight when large. This helps maintain consistent thickness. -- Part 2: Layouts (see below): These are essentially different layouts the components can come together. In the dotted boxes in the layout view below, you can substitute the glyph component for any other component. Each layout has a number of areas (the dotted boxes), and each area can house a set of components. -- Part 3: There's a CSV sheet somewhere that maps which components are allowable in which layouts.

There are scripts that combine all three of these to create the actual font glyphs, which as you noted, is indeed components at different positions. There's over a thousand of these.

The FigmaLayout.txt file is just an export of these boards (Part 1 & Part 2 above). It contains a bunch of info that I don't use, but it does contain the layout/area position which is used to create the fonts.

Hope this is clear?

  1. My glyphs do not have widths. This enables me to layer one glyph on top of another to create a character. This is why I need a spacer glyph. See below, the first four glyphs all have widths of 0, and they combine (overlap) to make the final glyph. Then a spacer is used to advance the character.

[image: image.png]

Components: [image: image.png]

Layouts: [image: image.png]

On Sun, Sep 29, 2024 at 1:05 AM 润心 @.***> wrote:

Hi Nancy,

I've checked the font file and your making procedure, and I have several questions and suggestions.

  1. Which base font do you use for your v2? I wonder if it's an open source font that we can modify for our open source work, if not I recommend this KaiTi font https://www.cns11643.gov.tw/pageView.jsp?ID=59&SN=&lang=en, which is official and open sourced under OTF-1.1 license.
  2. I recommend to add meaningful glyph name for each unicode codepoints, i.e. what you did for spacers (58000,58001,58002) but not the others.
  3. I don't understand why in figmaLayoutDefinitions.txt, there are so many(>10k) lines. I think many of them are repetitions. Will it cause an issue?
  4. On the principle of your implementation: I have played with your font, and I find that it seems you actually encode every glyph at every possible positions, e.g. you have number glyph(一、二、...) with variants for basic layout(at bottom, at top right, at top right top, at top right bottom), for chord layout(same position for basic layout but doubled in right part), and for vertical layout(every vertical positions in n-grams). So the presence an unicode character will render the corresponding glyph at that position. And the spacers are used to render space to avoid overlapping of glyph components. Am I right?
  5. If I understand correctly in 4, a very basic question is why you need an explicit spacer, or in other words, how do you manage to overlap the glyphs, since in normal font. It seems we don't need a spacer, so that in 'good', 'o' doesn't overlap on 'g' if its unicode just follows the one of 'g'.

— Reply to this email directly, view it on GitHub https://github.com/neuralfirings/JianZiPu/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIKOS6VBHOLYDRUYQJ5DT3ZY6YFHAVCNFSM6AAAAABPBMFSKKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2TINZZHAYDQMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

alephpi commented 1 week ago

Thank you for your response, never mind the delay. I just wonder if you can grab me in your project? I resend the request to you(with my education email sicheng.mao@telecom-paris.fr)

I should just give you the download link haha, I thought you could find it on the page. https://www.cns11643.gov.tw/opendata/Fonts_Kai.zip, also the open source page https://data.gov.tw/dataset/5961 for info.

BTW, I have also discussed with a chinese font maker on your design and there could be some improvements(e.g. use opentype feature like GSUB). But recently I'm also busy, let's see.