summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c')
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c74
1 files changed, 29 insertions, 45 deletions
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
index 151cae35f49..3d21580727d 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
@@ -2,7 +2,7 @@
* Gregorio is a program that translates gabc files to GregorioTeX
* This file contains the logic for positioning signs on neumes.
*
- * Copyright (C) 2008-2015 The Gregorio Project (see CONTRIBUTORS.md)
+ * Copyright (C) 2008-2016 The Gregorio Project (see CONTRIBUTORS.md)
*
* This file is part of Gregorio.
*
@@ -909,7 +909,8 @@ static gregorio_vposition advise_positioning(const gregorio_glyph *const glyph,
note->gtex_offset_case = FinalInclinatumDeminutus;
break;
case S_PUNCTUM_INCLINATUM_AUCTUS:
- case S_PUNCTUM_INCLINATUM:
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
case S_PUNCTUM_CAVUM_INCLINATUM_AUCTUS:
case S_PUNCTUM_CAVUM_INCLINATUM:
note->gtex_offset_case = FinalInclinatum;
@@ -1336,7 +1337,8 @@ static __inline bool is_connectable_interglyph_ambitus(
static __inline bool has_space_to_left(const gregorio_note *const note) {
switch (note->u.note.shape) {
- case S_PUNCTUM_INCLINATUM:
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
case S_PUNCTUM_INCLINATUM_DEMINUTUS:
case S_PUNCTUM_INCLINATUM_AUCTUS:
return !is_connectable_interglyph_ambitus(note->previous, note);
@@ -1610,51 +1612,33 @@ static __inline int compute_fused_shift(const gregorio_glyph *glyph)
return 0;
}
- /* the FLEXA check below checks for a porrectus-like flexus, which is not
- * fusible from above */
- if (shift < 0 && ((next_is_fused && glyph->u.notes.glyph_type == G_FLEXA)
- || glyph->u.notes.glyph_type == G_PORRECTUS
- || (glyph->u.notes.glyph_type == G_PODATUS
- && !(glyph->u.notes.liquescentia & L_DEMINUTUS))
- || (previous->u.notes.glyph_type == G_PUNCTUM
- && is_initio_debilis(previous->u.notes.liquescentia)))) {
- /* may not be fused from above */
- return 0;
- }
-
- /* Special cases for oriscus */
- switch (first_note->u.note.shape) {
- gregorio_note *next_note;
- const gregorio_glyph *next_glyph;
- case S_ORISCUS_ASCENDENS:
- case S_ORISCUS_DESCENDENS:
- case S_ORISCUS_SCAPUS_ASCENDENS:
- case S_ORISCUS_SCAPUS_DESCENDENS:
- next_note = first_note->next;
- if (!next_note && (next_glyph = gregorio_next_non_texverb_glyph(glyph))
- && next_glyph->type == GRE_GLYPH
- && is_fused(next_glyph->u.notes.liquescentia)) {
- next_note = next_glyph->u.notes.first_note;
- }
- if (next_note) {
- if (next_note->u.note.pitch < first_note->u.note.pitch) {
- /* then this note should be an down-up-down oriscus */
- if (shift > 0) {
- /* down-up-down oricus cannot be fused from below */
- return 0;
- }
- } else {
- /* then this note should be an up-down-up oriscus */
- if (shift < 0) {
- /* up-down-up oricus cannot be fused from above */
- return 0;
- }
+ if (shift < 0) {
+ if (glyph->u.notes.glyph_type == G_PODATUS) {
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ /* podatus deminutus may be fused from above */
+ return shift;
+ }
+ switch (first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ return shift;
+ default:
+ /* otherwise, podatus may not be fused from above */
+ return 0;
}
}
- break;
- default:
- break;
+ /* the FLEXA check below checks for a porrectus-like flexus, which is
+ * not fusible from above */
+ if ((next_is_fused && glyph->u.notes.glyph_type == G_FLEXA)
+ || glyph->u.notes.glyph_type == G_PORRECTUS
+ || (previous->u.notes.glyph_type == G_PUNCTUM
+ && is_initio_debilis(previous->u.notes.liquescentia))) {
+ /* may not be fused from above */
+ return 0;
+ }
}
return shift;