This is a comment on seeing the merge to Black font with regular when bold is available.
Javanese has two weights: Regular (400) and Bold (700).
I'm merging it with NotoSans various weights. Looks to me that Regular is used to merge with everything but Bold.
An improvement would be to
check the available weights of each font:
Javanese has 400, 700
Sans has 100,200,..700,800,900
As a fallback font I'd use the smallest absolute value between the difference of the "main" font and the merged font
e.g., for merging Sans 100 I'd use Javanese 400 because abs(100-400)=300 which is smaller than abs(100-700); for merging Sans 600 I'd use Javanese 700 because abs(600-700)=100 which is smaller than abs(600-400)
This is a comment on seeing the merge to Black font with regular when bold is available.
Javanese has two weights: Regular (400) and Bold (700).
I'm merging it with NotoSans various weights. Looks to me that Regular is used to merge with everything but Bold.
An improvement would be to
Just an idea