• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3.9.16 - sans-serif fonts default to serif
#1
I just upgraded to 3.9.16 on Android.

Seems that sans-serif fonts don't render in several ABC files in which they worked previously.
I've tried both Helvetica and sans-serif.

Defaults to serif.  Courier and monospace work.

I'm partial to some kind of sans-serif, more readable for me ... but not a big deal.

Thanks as always for a terrific app.
Reply
#2
Can you send me one of the abc files that isn't working for you so I can test it? In order to properly render flats and sharps, when sans-serif is encountered, I'm using a custom font now that includes the sharp and flat symbols. All of the ABC files that I've tested that use sans-serif seem to work (or at least it did last time I tested this before the release), so it would be helpful to have a file that demonstrates the issue.

Thanks,
Mike
Reply
#3

.txt   Best-Things-in-Life-Are-Free,abc.txt (Size: 1.92 KB / Downloads: 4)
Here's one ... thank you very much Mike.



.... in case the file doesn't come thru right:

%abc
%% transpose -2    %    ORIG = C
%
% PAGE LAYOUT
%% topmargin  0.1cm
%% topspace 0cm
%% titlespace 0.1cm
%% musicspace 0.2cm
%% botmargin  0.1cm
%% leftmargin  0.1cm
%% rightmargin 0.1cm
%% maxshrink 0.6      % 1= max compression; 0 = min
% % scale 0.8
%% titleformat R-1 T0 C1, T0 H1
%% staffsep 1.9cm
%% stretchstaff 1
%% stretchlast 1
%
%  FONTS
%%font Helvetica
%%titlefont Helvetica-Bold 18    %  Helvetica-Bold 18
%% subtitlefont Helvetica-BoldItalic 14
%% composerfont Helvetica-Italic 12
%% infofont Helvetica-Italic 12
%% historyfont Helvetica-Italic 12
%% partsfont HelveticaBold-Italic 20
%% gchordfont HelveticaBold 18
%% vocalfont Helvetica 16
%% vocalspace 0.01cm
%
%%setfont-1 Helvetica 16
%%setfont-2 Helvetica-BoldItalic 16
%%setfont-3 Helvetica-Bold 16
%%setfont-4 Helvetica-Bold 20
%
X:1
T:The Best Things in Life Are Free
T: 1927, orig C, from Sac Trad Jazz Camp
C: RG DeSylva, Lew Brown, Ray Henderson
R: rec: Geo Olsen, Bob Borger voc
Q: 1/2=102
M: C|
L:1/2
I:linebreak @
K:C clef=bass
%
P: [A]
G, || "C" C, E, | G, C | B,/C/ B,- | B, z/A,/ |  @
w: $1The moon be-longs to e-v'ry-one,_ the
%
"C" G, B,,/C,/ | "Em7"G, "Ebm7"_G, | "Dm7"F,2- | "G7" F, z/ A,/ || @
w: $1best things in life are free._ The
%
%% vskip 0.8cm
P: [B]
yyyy "Dm7" D, F, | "G7" A, D | "Dm7"C/D/ C- | C "G7"z/ B,/ | @
w: $1Stars be-long to e-v'ry-one,_ they
%
"Dm7"A, ^C,/D,/ | "G7" A, _A, | "C" G,2- | G, z/ "(G7)"G,/ || @
w: $1gleam there for you and me._ The
%
%% vskip 0.8cm
P: [C]
yyyy "C7" C/D/C/D/- | D3/2 E,/ | "F" D,/E,/ D,/E,/- | E,3/2 A,/ | @
w: $1Flow-ers in spring,_ the ro-bins that sing,_ the
%
"D7" D/E/ D/E/- | E3/2 A,/ | "Dm7" C3/2 F,/ | "G7" A,3/2 G,/ || @
w: $1sun-beams that shine,_ they're yours, they're mine! And
%
%% vskip 0.8cm
P: [D]
yyyy "C" C, E, | G, C | "E7" B,/C/ B,- | B, "A7" A, |  @
w: Love can come to e-v'ry-one,_ the
%
"Dm7" D C/D/ | "G7" C D | "C" C2- yy | C yyyy :|
w: best things in life are free!_
Reply
#4
... and re-reading your reply:

It might be relevant that this is an older Samsung T350 on Android 7.1.1.
I wondered if it needed a font installed, but I don't know how to install a font on Android (happy to learn if that's a fix)

thanks again.
Reply
#5
Helvetica isn't a font that's available on Android to my knowledge. So abc2svg is having to fall back to a different font. Some devices let you install custom fonts: https://www.androidauthority.com/install...id-279698/

Just be aware that, if you want sharp and flat symbols to show up properly, the font needs to include those unicode characters. Android has fallback logic for that so they may show up properly even when using a font that doesn't include them, but it certainly won't work on Windows and iOS, as the rendering on that platform will not use a fallback font.

Mike
Reply
#6
Thanks ...
I also tried "sans-serif" in the abc file, as per the ABC manual here:
    https://abcplus.sourceforge.net/abcplus_en.pdf ... p 66
   ... and the previous page says "abc2svg understands PostScript font names"

Can you tell me what sans font you use for testing, and/or what Android sans-serif font the previous MSP version used? (Helvetica and "sans-serif" rendered in the previous version of MSP, for what that's worth.) Might be easiest to just install the one you use if I can get it.

Thanks again,
C




Thanks very much.
Reply
#7
I meant to ask - what text isn't rendering for you with sans-serif? With the abc file you provided, all of the text appears correct to me and I'm not seeing anything missing, although it's possible I'm overlooking something.

Previously, I wasn't using any font myself, so it was just falling back to the OS default sans-serif font which is Roboto on most devices. I can go back to using Roboto if people prefer it, although I will have to edit the Roboto font to insert proper flat and sharp symbols.

Mike
Reply
#8
Mike,
Thanks again for following up on this - curious that it renders OK for you (tho I understand different devices, stacks etc).

Using this attached test file, in which "Helvetica" is replaced with "sans-serif" - - 
- Here are 2 screenshots from 2 very similar tablets, but one on 3.9.16 vs the other on 3.9.11:

On 3.9.16 (on Samsung T350, Android 7.1.1): all sans-serif render serif.

On 3.9.11 (on Samsung T550, Android 7.1.1), exact same file: all render sans.

Hoping that helps somehow and again thank you very much for following up, and for a terrific app.

Chris
Reply
#9
(03-10-2025, 11:48 PM)chrisss Wrote: Mike,
Thanks again for following up on this - curious that it renders OK for you (tho I understand different devices, stacks etc).

Using this attached test file, in which "Helvetica" is replaced with "sans-serif" - - 
- Here are 2 screenshots from 2 very similar tablets, but one on 3.9.16 vs the other on 3.9.11:

On 3.9.16 (on Samsung T350, Android 7.1.1): all sans-serif render serif.

On 3.9.11 (on Samsung T550, Android 7.1.1), exact same file: all render sans.

Hoping that helps somehow and again thank you very much for following up, and for a terrific app.

Chris


.txt   Best-Things-testing,abc.txt (Size: 1.94 KB / Downloads: 0)        
Reply
#10
I don't see any missing text in your screenshots. You said "fonts don't render" in your original post, so I thought you meant that there was text that was invisible. Are you just saying that it's not using the font you want it to use? If that's all you are saying, then that's fine and I can make some adjustments in the code to revert back to using Roboto as the sans-serif font, and support "finalemaestro" as a font to use the current one.

Mike
Reply
#11
O boy, I'm sure sorry I wasn't more specific + clear, Mike.

You're correct, it IS rendering the text; just defaulting to render in serif, vs in sans-serif as called in the file.

Very sorry for the confusion.
Thanks again for all your time + attention.
Chris
Reply
#12
I'm testing with Win10 / Win11 and compare ABC, ABC integrated in ChordPro and the ChordPro Reference Implementation. To do that I use Chrisss' ABC example, the same example between start_of_abc / end_of_abc and an example from my collection with just %%gchordfont and %%vocalfont. To check if a font is installed I check if I can select it in the font selection dropdown of LibreOffice Writer.
I found a documentation of "xxxfont font_name [style/weight] [encoding] [size] [arguments]" here http://moinejf.free.fr/abcm2ps-doc/index.html

It needs more investigation, but what I can say so far is
- there seems to be an issue with passing "font_name" to the ABC library , even when the font is installed.
- "size" and weight=bold are applied
- ABC and ABC integrated in ChordPro create the same output in MobileSheets
- please keep using

AfterYouveGone-MuseJazzText_ABC.pro in the ChordPro Reference Implementation also use default fonts instead of MuseJazzText, same as AfterYouveGone-Helvetica_ABC.pro or AfterYouveGone-Tahoma_ABC.pro, size is applied, weight is not applied


Attached Files
.pro   Best-Things-in-Life-Are-Free_ABC.pro (Size: 1.95 KB / Downloads: 0)
.pro   AfterYouveGone-Helvetica_ABC.pro (Size: 1.24 KB / Downloads: 0)
.pro   AfterYouveGone-MuseJazzText_ABC.pro (Size: 1.25 KB / Downloads: 0)
.pro   AfterYouveGone-Tahoma_ABC.pro (Size: 1.2 KB / Downloads: 0)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#13
Refined test files and screenshots from MobileSheets 3.9.16 on Win10
Note the difference: 
with Helvetica size and weight is applied, the same serif font is used as without font specification
with Helvetica bold size and weight is applied, the same serif font is used as without font specification for lyrics and title, for chords the same sans-serif font is used as with MuseScoreText
with MuseScoreText the size is also applied, but a sans serif font is used, flats and sharps are missing
       


Attached Files
.pro   AfterYouveGone-Helvetica_ABC.pro (Size: 1.18 KB / Downloads: 0)
.pro   AfterYouveGone-MuseJazzText_ABC.pro (Size: 1.21 KB / Downloads: 0)
.pro   AfterYouveGone-Tahoma_ABC.pro (Size: 1.1 KB / Downloads: 0)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#14
Results from EasyABC and the ChordPro Reference Implementation
Same behaviour for all %%xxxfont specifications, size is applied, weight is ignored, whereas In MobileSheets both weight and size are applied
In EasyABC I had to delete a part of the files from my previous post before taking the screenshots because the first %%xxxfont definitions are used for the rest of the file
           


Attached Files
.pdf   AfterYouveGone-Helvetica_ChordPro_6.07_083.pdf (Size: 287.63 KB / Downloads: 0)
.pdf   AfterYouveGone-MuseJazzText_ChordPro_6.07_083.pdf (Size: 286.19 KB / Downloads: 0)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#15
Android, iOS etc do not have the fonts functionality that other systems have. As such, it is questionable whether we should even try.

My suggestion would be to stick to Sans, Serif and Mono. It may be nice to add MuseJazzText as a fourth option. This would require a user definable mapping to designate what group a user-specified font belongs to.

If, for example, the ABC source uses font Castledom, MSPro may pop up "Font Castledom unknown, use sans/serif/mono/muse instead? With a radio button for the four alternatives.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply




Users browsing this thread:
Bill O, 1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2025 MyBB Group.