@coderline/alphatab 1.8.0-alpha.1668 → 1.8.0-alpha.1670

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4452,6 +4452,11 @@ declare class Bar {
4452
4452
  * Gets or sets the type of key signature (major/minor)
4453
4453
  */
4454
4454
  keySignatureType: KeySignatureType;
4455
+ /**
4456
+ * How bar numbers should be displayed.
4457
+ * If specified, overrides the value from the stylesheet on score level.
4458
+ */
4459
+ barNumberDisplay?: BarNumberDisplay;
4455
4460
  /**
4456
4461
  * The bar line to draw on the left side of the bar with an "automatic" type resolved to the actual one.
4457
4462
  * @param isFirstOfSystem Whether the bar is the first one in the system.
@@ -4536,6 +4541,25 @@ declare enum BarLineStyle {
4536
4541
  Tick = 11
4537
4542
  }
4538
4543
 
4544
+ /**
4545
+ * How bar numbers are displayed
4546
+ * @public
4547
+ */
4548
+ declare enum BarNumberDisplay {
4549
+ /**
4550
+ * Show bar numbers on all bars.
4551
+ */
4552
+ AllBars = 0,
4553
+ /**
4554
+ * Show bar numbers on the first bar of every system.
4555
+ */
4556
+ FirstOfSystem = 1,
4557
+ /**
4558
+ * Hide all bar numbers
4559
+ */
4560
+ Hide = 2
4561
+ }
4562
+
4539
4563
  /**
4540
4564
  * Lists all beat barré types.
4541
4565
  * @public
@@ -6581,6 +6605,13 @@ export declare class DisplaySettings {
6581
6605
  * @defaultValue `5`
6582
6606
  */
6583
6607
  trackStaffPaddingBetween: number;
6608
+ /**
6609
+ * The additional padding to apply between multiple lyric lines.
6610
+ * @since 1.8.0
6611
+ * @category Display
6612
+ * @defaultValue `5`
6613
+ */
6614
+ lyricLinesPaddingBetween: number;
6584
6615
  /**
6585
6616
  * The mode used to arrange staves and systems.
6586
6617
  * @since 1.3.0
@@ -6933,6 +6964,13 @@ declare interface DisplaySettingsJson {
6933
6964
  * @defaultValue `5`
6934
6965
  */
6935
6966
  trackStaffPaddingBetween?: number;
6967
+ /**
6968
+ * The additional padding to apply between multiple lyric lines.
6969
+ * @since 1.8.0
6970
+ * @category Display
6971
+ * @defaultValue `5`
6972
+ */
6973
+ lyricLinesPaddingBetween?: number;
6936
6974
  /**
6937
6975
  * The mode used to arrange staves and systems.
6938
6976
  * @since 1.3.0
@@ -11494,6 +11532,7 @@ export declare namespace model {
11494
11532
  TrackNamePolicy,
11495
11533
  TrackNameMode,
11496
11534
  TrackNameOrientation,
11535
+ BarNumberDisplay,
11497
11536
  RepeatGroup,
11498
11537
  Score,
11499
11538
  ScoreSubElement,
@@ -12035,7 +12074,24 @@ export declare enum NotationElement {
12035
12074
  /**
12036
12075
  * The key signature for numbered notation staff.
12037
12076
  */
12038
- EffectNumberedNotationKeySignature = 51
12077
+ EffectNumberedNotationKeySignature = 51,
12078
+ /**
12079
+ * The fretboard numbers shown in chord diagrams.
12080
+ */
12081
+ ChordDiagramFretboardNumbers = 52,
12082
+ /**
12083
+ * The bar numbers.
12084
+ */
12085
+ BarNumber = 53,
12086
+ /**
12087
+ * The repeat count indicator shown above the thick bar line to describe
12088
+ * how many repeats should be played.
12089
+ */
12090
+ RepeatCount = 54,
12091
+ /**
12092
+ * The slurs shown on bend effects within the score staff.
12093
+ */
12094
+ ScoreBendSlur = 55
12039
12095
  }
12040
12096
 
12041
12097
  /**
@@ -14120,6 +14176,11 @@ export declare namespace rendering {
14120
14176
  export declare class RenderingResources {
14121
14177
  private static _sansFont;
14122
14178
  private static _serifFont;
14179
+ private static _effectFont;
14180
+ /**
14181
+ * The default fonts for notation elements if not specified by the user.
14182
+ */
14183
+ static defaultFonts: Map<NotationElement, Font>;
14123
14184
 
14124
14185
  /**
14125
14186
  * The SMuFL Metrics to use for rendering music symbols.
@@ -14131,50 +14192,131 @@ export declare class RenderingResources {
14131
14192
  * The font to use for displaying the songs copyright information in the header of the music sheet.
14132
14193
  * @defaultValue `bold 12px Arial, sans-serif`
14133
14194
  * @since 0.9.6
14195
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreCopyright}
14134
14196
  */
14135
- copyrightFont: Font;
14197
+ get copyrightFont(): Font;
14198
+ /**
14199
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreCopyright}
14200
+ */
14201
+ set copyrightFont(value: Font);
14136
14202
  /**
14137
14203
  * The font to use for displaying the songs title in the header of the music sheet.
14138
14204
  * @defaultValue `32px Georgia, serif`
14139
14205
  * @since 0.9.6
14206
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreTitle}
14140
14207
  */
14141
- titleFont: Font;
14208
+ get titleFont(): Font;
14209
+ /**
14210
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreTitle}
14211
+ */
14212
+ set titleFont(value: Font);
14142
14213
  /**
14143
14214
  * The font to use for displaying the songs subtitle in the header of the music sheet.
14144
14215
  * @defaultValue `20px Georgia, serif`
14145
14216
  * @since 0.9.6
14217
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreSubTitle}
14218
+ */
14219
+ get subTitleFont(): Font;
14220
+ /**
14221
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreSubTitle}
14146
14222
  */
14147
- subTitleFont: Font;
14223
+ set subTitleFont(value: Font);
14148
14224
  /**
14149
14225
  * The font to use for displaying the lyrics information in the header of the music sheet.
14150
14226
  * @defaultValue `15px Arial, sans-serif`
14151
14227
  * @since 0.9.6
14228
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreWords}
14152
14229
  */
14153
- wordsFont: Font;
14230
+ get wordsFont(): Font;
14154
14231
  /**
14155
- * The font to use for displaying certain effect related elements in the music sheet.
14156
- * @defaultValue `italic 12px Georgia, serif`
14157
- * @since 0.9.6
14232
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ScoreWords}
14158
14233
  */
14159
- effectFont: Font;
14234
+ set wordsFont(value: Font);
14160
14235
  /**
14161
14236
  * The font to use for displaying beat time information in the music sheet.
14162
14237
  * @defaultValue `12px Georgia, serif`
14163
14238
  * @since 1.4.0
14239
+ * @deprecated use {@link elementFonts} with {@link NotationElement.EffectBeatTimer}
14164
14240
  */
14165
- timerFont: Font;
14241
+ get timerFont(): Font;
14242
+ /**
14243
+ * @deprecated use {@link elementFonts} with {@link NotationElement.EffectBeatTimer}
14244
+ */
14245
+ set timerFont(value: Font);
14166
14246
  /**
14167
14247
  * The font to use for displaying the directions texts.
14168
14248
  * @defaultValue `14px Georgia, serif`
14169
14249
  * @since 1.4.0
14250
+ * @deprecated use {@link elementFonts} with {@link NotationElement.EffectDirections}
14251
+ */
14252
+ get directionsFont(): Font;
14253
+ /**
14254
+ * @deprecated use {@link elementFonts} with {@link NotationElement.EffectDirections}
14170
14255
  */
14171
- directionsFont: Font;
14256
+ set directionsFont(value: Font);
14172
14257
  /**
14173
14258
  * The font to use for displaying the fretboard numbers in chord diagrams.
14174
14259
  * @defaultValue `11px Arial, sans-serif`
14175
14260
  * @since 0.9.6
14261
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ChordDiagramFretboardNumbers}
14262
+ */
14263
+ get fretboardNumberFont(): Font;
14264
+ /**
14265
+ * @deprecated use {@link elementFonts} with {@link NotationElement.ChordDiagramFretboardNumbers}
14266
+ */
14267
+ set fretboardNumberFont(value: Font);
14268
+ /**
14269
+ * Unused, see deprecation note.
14270
+ * @defaultValue `14px Georgia, serif`
14271
+ * @since 0.9.6
14272
+ * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14273
+ * @json_ignore
14274
+ */
14275
+ fingeringFont: Font;
14276
+ /**
14277
+ * Unused, see deprecation note.
14278
+ * @defaultValue `12px Georgia, serif`
14279
+ * @since 1.4.0
14280
+ * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14281
+ * @json_ignore
14282
+ */
14283
+ inlineFingeringFont: Font;
14284
+ /**
14285
+ * The font to use for section marker labels shown above the music sheet.
14286
+ * @defaultValue `bold 14px Georgia, serif`
14287
+ * @since 0.9.6
14288
+ * @deprecated use {@link elementFonts} with {@link NotationElement.EffectMarker}
14289
+ */
14290
+ get markerFont(): Font;
14291
+ /**
14292
+ * @deprecated use {@link elementFonts} with {@link NotationElement.EffectMarker}
14293
+ */
14294
+ set markerFont(value: Font);
14295
+ /**
14296
+ * Ununsed, see deprecation note.
14297
+ * @defaultValue `italic 12px Georgia, serif`
14298
+ * @since 0.9.6
14299
+ * @deprecated use {@link elementFonts} with the respective
14300
+ * @json_ignore
14301
+ */
14302
+ effectFont: Font;
14303
+ /**
14304
+ * The font to use for displaying the bar numbers above the music sheet.
14305
+ * @defaultValue `11px Arial, sans-serif`
14306
+ * @since 0.9.6
14307
+ * @deprecated use {@link elementFonts} with {@link NotationElement.BarNumber}
14176
14308
  */
14177
- fretboardNumberFont: Font;
14309
+ get barNumberFont(): Font;
14310
+ /**
14311
+ * @deprecated use {@link elementFonts} with {@link NotationElement.BarNumber}
14312
+ */
14313
+ set barNumberFont(value: Font);
14314
+ /**
14315
+ * The fonts used by individual elements. Check {@link defaultFonts} for the elements which have custom fonts.
14316
+ * Removing fonts from this map can lead to unexpected side effects and errors. Only update it with new values.
14317
+ * @json_immutable
14318
+ */
14319
+ readonly elementFonts: Map<NotationElement, Font>;
14178
14320
  /**
14179
14321
  * The font to use for displaying the numbered music notation in the music sheet.
14180
14322
  * @defaultValue `14px Arial, sans-serif`
@@ -14211,38 +14353,12 @@ export declare class RenderingResources {
14211
14353
  * @since 0.9.6
14212
14354
  */
14213
14355
  barSeparatorColor: Color;
14214
- /**
14215
- * The font to use for displaying the bar numbers above the music sheet.
14216
- * @defaultValue `11px Arial, sans-serif`
14217
- * @since 0.9.6
14218
- */
14219
- barNumberFont: Font;
14220
14356
  /**
14221
14357
  * The color to use for displaying the bar numbers above the music sheet.
14222
14358
  * @defaultValue `rgb(200, 0, 0)`
14223
14359
  * @since 0.9.6
14224
14360
  */
14225
14361
  barNumberColor: Color;
14226
- /**
14227
- * The font to use for displaying finger information in the music sheet.
14228
- * @defaultValue `14px Georgia, serif`
14229
- * @since 0.9.6
14230
- * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14231
- */
14232
- fingeringFont: Font;
14233
- /**
14234
- * The font to use for displaying finger information when inline into the music sheet.
14235
- * @defaultValue `12px Georgia, serif`
14236
- * @since 1.4.0
14237
- * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14238
- */
14239
- inlineFingeringFont: Font;
14240
- /**
14241
- * The font to use for section marker labels shown above the music sheet.
14242
- * @defaultValue `bold 14px Georgia, serif`
14243
- * @since 0.9.6
14244
- */
14245
- markerFont: Font;
14246
14362
  /**
14247
14363
  * The color to use for music notation elements of the primary voice.
14248
14364
  * @defaultValue `rgb(0, 0, 0)`
@@ -14261,6 +14377,7 @@ export declare class RenderingResources {
14261
14377
  * @since 0.9.6
14262
14378
  */
14263
14379
  scoreInfoColor: Color;
14380
+ constructor();
14264
14381
 
14265
14382
  }
14266
14383
 
@@ -14280,53 +14397,35 @@ declare interface RenderingResourcesJson {
14280
14397
  */
14281
14398
  engravingSettings?: EngravingSettingsJson;
14282
14399
  /**
14283
- * The font to use for displaying the songs copyright information in the header of the music sheet.
14284
- * @defaultValue `bold 12px Arial, sans-serif`
14285
- * @since 0.9.6
14286
- */
14287
- copyrightFont?: FontJson;
14288
- /**
14289
- * The font to use for displaying the songs title in the header of the music sheet.
14290
- * @defaultValue `32px Georgia, serif`
14291
- * @since 0.9.6
14292
- */
14293
- titleFont?: FontJson;
14294
- /**
14295
- * The font to use for displaying the songs subtitle in the header of the music sheet.
14296
- * @defaultValue `20px Georgia, serif`
14400
+ * Unused, see deprecation note.
14401
+ * @defaultValue `14px Georgia, serif`
14297
14402
  * @since 0.9.6
14403
+ * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14404
+ * @json_ignore
14298
14405
  */
14299
- subTitleFont?: FontJson;
14406
+ fingeringFont?: FontJson;
14300
14407
  /**
14301
- * The font to use for displaying the lyrics information in the header of the music sheet.
14302
- * @defaultValue `15px Arial, sans-serif`
14303
- * @since 0.9.6
14408
+ * Unused, see deprecation note.
14409
+ * @defaultValue `12px Georgia, serif`
14410
+ * @since 1.4.0
14411
+ * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14412
+ * @json_ignore
14304
14413
  */
14305
- wordsFont?: FontJson;
14414
+ inlineFingeringFont?: FontJson;
14306
14415
  /**
14307
- * The font to use for displaying certain effect related elements in the music sheet.
14416
+ * Ununsed, see deprecation note.
14308
14417
  * @defaultValue `italic 12px Georgia, serif`
14309
14418
  * @since 0.9.6
14419
+ * @deprecated use {@link elementFonts} with the respective
14420
+ * @json_ignore
14310
14421
  */
14311
14422
  effectFont?: FontJson;
14312
14423
  /**
14313
- * The font to use for displaying beat time information in the music sheet.
14314
- * @defaultValue `12px Georgia, serif`
14315
- * @since 1.4.0
14424
+ * The fonts used by individual elements. Check {@link defaultFonts} for the elements which have custom fonts.
14425
+ * Removing fonts from this map can lead to unexpected side effects and errors. Only update it with new values.
14426
+ * @json_immutable
14316
14427
  */
14317
- timerFont?: FontJson;
14318
- /**
14319
- * The font to use for displaying the directions texts.
14320
- * @defaultValue `14px Georgia, serif`
14321
- * @since 1.4.0
14322
- */
14323
- directionsFont?: FontJson;
14324
- /**
14325
- * The font to use for displaying the fretboard numbers in chord diagrams.
14326
- * @defaultValue `11px Arial, sans-serif`
14327
- * @since 0.9.6
14328
- */
14329
- fretboardNumberFont?: FontJson;
14428
+ elementFonts?: Map<NotationElement | keyof typeof NotationElement | Lowercase<keyof typeof NotationElement>, FontJson>;
14330
14429
  /**
14331
14430
  * The font to use for displaying the numbered music notation in the music sheet.
14332
14431
  * @defaultValue `14px Arial, sans-serif`
@@ -14363,38 +14462,12 @@ declare interface RenderingResourcesJson {
14363
14462
  * @since 0.9.6
14364
14463
  */
14365
14464
  barSeparatorColor?: ColorJson;
14366
- /**
14367
- * The font to use for displaying the bar numbers above the music sheet.
14368
- * @defaultValue `11px Arial, sans-serif`
14369
- * @since 0.9.6
14370
- */
14371
- barNumberFont?: FontJson;
14372
14465
  /**
14373
14466
  * The color to use for displaying the bar numbers above the music sheet.
14374
14467
  * @defaultValue `rgb(200, 0, 0)`
14375
14468
  * @since 0.9.6
14376
14469
  */
14377
14470
  barNumberColor?: ColorJson;
14378
- /**
14379
- * The font to use for displaying finger information in the music sheet.
14380
- * @defaultValue `14px Georgia, serif`
14381
- * @since 0.9.6
14382
- * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14383
- */
14384
- fingeringFont?: FontJson;
14385
- /**
14386
- * The font to use for displaying finger information when inline into the music sheet.
14387
- * @defaultValue `12px Georgia, serif`
14388
- * @since 1.4.0
14389
- * @deprecated Since 1.7.0 alphaTab uses the glyphs contained in the SMuFL font
14390
- */
14391
- inlineFingeringFont?: FontJson;
14392
- /**
14393
- * The font to use for section marker labels shown above the music sheet.
14394
- * @defaultValue `bold 14px Georgia, serif`
14395
- * @since 0.9.6
14396
- */
14397
- markerFont?: FontJson;
14398
14471
  /**
14399
14472
  * The color to use for music notation elements of the primary voice.
14400
14473
  * @defaultValue `rgb(0, 0, 0)`
@@ -14508,6 +14581,10 @@ declare class RenderStylesheet {
14508
14581
  * {@link hideEmptyStaves}
14509
14582
  */
14510
14583
  showSingleStaffBrackets: boolean;
14584
+ /**
14585
+ * How bar numbers should be displayed.
14586
+ */
14587
+ barNumberDisplay: BarNumberDisplay;
14511
14588
  }
14512
14589
 
14513
14590
  /**