ChordPro / chordpro

Reference implementation of the ChordPro standard for musical lead sheets.
Other
310 stars 51 forks source link

Why doesn't ChordPro need to use same font ? #299

Closed Rexadev closed 1 year ago

Rexadev commented 1 year ago

Ultimate Guitar always use RobertoMono if you were you copy it and use different font Chords and Lyrics will not Sync.


Describe the bug

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Attachments

System information

Additional context

sciurius commented 1 year ago

Your report is incomplete and I cannot understand what you want to say.

timmbo9 commented 1 year ago

Use any MONO font to resolve your issue.

Rexadev commented 1 year ago

Your report is incomplete and I cannot understand what you want to say.

ChordPro can any font user want but when font is changed lyrics-chord don't match.

Is there a standard ? Can I set is per file ?

sciurius commented 1 year ago

You can set both the lyrics font and the chord fonts independently. You can do this in the config file, see https://www.chordpro.org/chordpro/chordpro-configuration-pdf/#fonts . Alternatively, on the command line with (chordii compatibility) options https://www.chordpro.org/chordpro/using-chordpro/#text-font and https://www.chordpro.org/chordpro/using-chordpro/#chord-font .

Does this answer your question?

Rexadev commented 1 year ago

@sciurius Is there a font standard ? Most online use RobotoMono

Is it possible to make ChordPro not affects by Font by defining Chord per line ?

sciurius commented 1 year ago

If you install the RobotoMono font on your system, you can use it as described in https://www.chordpro.org/chordpro/chordpro-fonts/ .

But apparently this is not a bug report, but you are asking questions on how to use ChordPro. Please join the user community on https://groups.io/g/ChordPro - a lot of people are there that can help you with your questions, or learn from them.

Rexadev commented 1 year ago

Screen of txt chords in 2 fonts

Calibri

image

Cansolas

image

  1. https://ultimate.ftes.de/ uses monospaced
  2. ultimate-guitar.com uses robotomono
  3. https://www.e-chords.com/chords/taylor-swift/back-to-december uses Arial for chords and Poppins Puritan for title
  4. https://www.guitaretab.com uses monospace

Does https://ultimate.ftes.de/ handle different fonts ?

@sciurius @timmbo9

sciurius commented 1 year ago

I get the feeling you are not referring to the standard ChordPro from https://chordpro.org .

ChordPro is the name for a file format to notate lead sheets for viewing and printing. Its official specification can be found at https://www.chordpro.org . Its reference implementation can be found at GitHub (https://github.com/ChordPro/chordpro) and CPAN (https://metacpan.org/pod/App::Music::ChordPro).

ChordPro is a free and open file format, and its reference implementation is a free, open source, program.

There are many independent 3rd-party programs, web services and apps that implement something similar to the ChordPro file format, and several of these also call themselves ChordPro.

Unless you are running the actual reference implementation mentioned above we cannot help you. If you are using a web service, or a commercial program or app, it is definitely not ours. For support you have to address the company that developed the tool that you use.

Rexadev commented 1 year ago

@sciurius ChordPro has it's own ASCII to ChordPro converter. How does it handle Fonts and it's alignment with Lyrics/Chords

sciurius commented 1 year ago

An ASCII text document has characters only, there is no such thing as fonts in ASCII text. If you view an ASCII text a font is used by the viewer to render it.

For the conversion of ASCII text to ChordPro each character is assumed to be the same width to line-up the chords and lyrics. This corresponds to viewing the text with a monospace font.

Rexadev commented 1 year ago

An ASCII text document has characters only, there is no such thing as fonts in ASCII text. If you view an ASCII text a font is used by the viewer to render it.

For the conversion of ASCII text to ChordPro each character is assumed to be the same width to line-up the chords and lyrics. This corresponds to viewing the text with a monospace font.

Screenshot of .txt files in notepad - chords in 2 fonts

Calibri

image

Cansolas

image

sciurius commented 1 year ago

Your screenshots nicely illustrate this. When viewed with Calibri, a proportional font, the chords do not line up as they should. When viewed with Cansolas, a monospace font, the line-up is ok. ChordPro converts ASCII text as if viewed with a monospace font so you get the expected results.

When you try to visually line up the chords (by insertibng/removing spaces) while viewing with a proportional font you'll find your chords misplaced after conversion.

Does this answer your question?

Rexadev commented 1 year ago

https://www.e-chords.com/chords/taylor-swift/back-to-december uses Arial which is a proportional font how does ChordPro's ASCII to ChordPro Converter https://www.chordpro.org/chordpro/chordpro-configuration-a2crd/ handle's it @sciurius

sciurius commented 1 year ago

It depends on how you get the info from the site into a text document that you can feed to ChordPro. I assume that when you are premium member and download the song, you get an ASCII document that will do fine.

Even though the site displays the chords misplaced, when you select/copy the text and paste it in a notepad with monospace chords it already looks ok:

D 
I'm so glad you made the time to see me 
Bm 
How's life, tell me how's your family 
G                        D   A 
I haven't seen them in a while 
D 
You've been good, busier than ever 
Bm 
We small talk, work and the weather 
G                              D  A 
You're guard is up, and I know why