Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISM update #106

Merged
merged 55 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
32f7bf8
Add TextLayoutElement class
lpugin Jun 2, 2023
e9ffcb3
Make TextLayoutElement inherit from ObjectListInterface and AttType
lpugin Jun 2, 2023
c88241a
Make RunningElement inherit from TextLayoutElement
lpugin Jun 2, 2023
8a70747
Re-order files in xcode
lpugin Jun 2, 2023
744fd78
Move RunningElement cells to TextLayoutElement
lpugin Jun 2, 2023
bb2ea8d
Add Div class
lpugin Jun 2, 2023
e9f614d
Add Div reading and writing methods (scaffolding)
lpugin Jun 2, 2023
4e7411b
Handle Div when converting to PageBased
lpugin Jun 3, 2023
885cf9e
Handle Div when casting off
lpugin Jun 3, 2023
0e0a0ed
Align Div vertically
lpugin Jun 3, 2023
52fa705
Return page with for div
lpugin Jun 3, 2023
569614c
Draw Div - at this stage a rectangle with fixed height
lpugin Jun 3, 2023
cdc3337
Move methods to TextLayoutElement
lpugin Jun 4, 2023
c925617
Align rend within Div
lpugin Jun 4, 2023
3b904a4
Prepare and adjust position for Div
lpugin Jun 4, 2023
64e7600
Rename DrawPgHeader to DrawTextLayoutElement and call it from DrawDiv
lpugin Jun 4, 2023
274e25e
Load RunningChildren within Div (invalid MEI)
lpugin Jun 4, 2023
087dde4
Move view_running.cpp to view_text.cpp
lpugin Jun 4, 2023
654a2c8
Add input filter for Div parent
lpugin Jun 5, 2023
b6f8e50
Basic cast off for automatic layout
lpugin Jun 5, 2023
cc68472
Adjust functors for setting and resetting inline div
lpugin Jun 5, 2023
6ea1879
Add member to Div to handle inline div
lpugin Jun 5, 2023
6cc2402
Fix formatting
lpugin Jun 5, 2023
103c17e
Merge branch 'develop' into develop-text-div
lpugin Jun 30, 2023
27449ab
Add comment for invalid MEI current state
lpugin Jun 30, 2023
b7c05f4
Remove PgHead2 and PgFoot2 (WIP)
lpugin Jun 30, 2023
4b1fd1e
Update LibMEI
lpugin Jun 30, 2023
bae3538
Add AttRunningText to RunningElement
lpugin Jun 30, 2023
9208c76
Add a AttRuningtextComparison class
lpugin Jun 30, 2023
80f3fb1
Remove pgHead2 and pgFoot2 use when generating headers/footers
lpugin Jun 30, 2023
d7c7e67
Update iohumrdum
lpugin Jun 30, 2023
74b3328
Update ios binding header list
lpugin Jun 30, 2023
12c00b4
Add pgHead2 and pgFoot2 upgrade function
lpugin Jun 30, 2023
336dfa0
Formatting
lpugin Jun 30, 2023
dc5f5db
Update LibMEI
lpugin Jul 1, 2023
c3d5982
Rename runningtext to formework
lpugin Jul 1, 2023
0ebb4fe
Remove pghead2.h/cpp
lpugin Jul 2, 2023
fa13013
Merge pull request #3469 from rism-digital/develop-text-div
ahankinson Jul 3, 2023
1a868c3
Start 3.17.0-dev
lpugin Jul 3, 2023
688c237
Add SMUFL_EBA6_luteDurationDoubleWhole
lpugin Jul 3, 2023
89253fa
Add support for `space` within `beam`
lpugin Jul 4, 2023
46f12e3
Update changelog
lpugin Jul 4, 2023
da0d147
fix empty paragraph
rettinghaus Jul 4, 2023
331a37c
fix HTML tag warning
rettinghaus Jul 4, 2023
96b2a83
fix wrong doxygen commands
rettinghaus Jul 4, 2023
f80a481
update ios
rettinghaus Jul 4, 2023
68a60b1
Adjust position for rest / space at the first / last position in a beam
lpugin Jul 4, 2023
d00af0f
Merge pull request #3474 from rettinghaus/develop-doxygen
lpugin Jul 4, 2023
075f29e
Merge pull request #3475 from rettinghaus/fix/ios [skip-ci]
lpugin Jul 4, 2023
197cd96
Merge pull request #3476 from rism-digital/develop-space-in-beam
lpugin Jul 4, 2023
c1ae9e9
Merge pull request #3478 from DDMAL/develop-rism_merge
lpugin Jul 5, 2023
5cac664
Merge branch 'develop' into develop-ddmal-merge
lpugin Jul 5, 2023
36cff54
Merge pull request #105 from rism-digital/develop-ddmal-merge
yinanazhou Jul 5, 2023
0bbfe64
pass neon path as command line argument
yinanazhou May 16, 2023
39c0099
Remove testNeon.sh from git
yinanazhou Jul 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Changelog

## [unreleased]
* Support for `space` within `beam`

## [3.16.0] - 2023-07-03
* Support for rectangular tone clusters (@eNote-GmbH)
* Support for delayed turns on chords (@eNote-GmbH)
* Support for `pgHead@func` and `pgFoot@func` instead of `pgHead2` and `pgFoot2`
* Support for `ending@lform` and `ending@label`
* Update key signature handling according to the latest changes in MEI
* Improve endpoint location for spanning slurs (@eNote-GmbH)
* Improve layout for inner slurs in cross-staff situations (@eNote-GmbH)
* Fix validity of MEI output by ensuring correct element order
* Option --neume-as-note to render neumes as CMWN notes
* Option --octave-no-spanning-parentheses to prevent () in spanning octave displacements (@eNote-GmbH)

## [3.15.0] - 2023-03-01
Expand Down
2 changes: 1 addition & 1 deletion Verovio.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Verovio'
s.version = '3.16.0-dev'
s.version = '3.17.0-dev'
s.license = { :type => 'LGPL' }
s.homepage = 'https://www.verovio.org/index.xhtml'
s.authors = { 'Contributors List' => 'https://github.com/rism-digital/verovio/graphs/contributors' }
Expand Down
144 changes: 67 additions & 77 deletions Verovio.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions bindings/iOS/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
#import <VerovioFramework/devicecontext.h>
#import <VerovioFramework/devicecontextbase.h>
#import <VerovioFramework/dir.h>
#import <VerovioFramework/div.h>
#import <VerovioFramework/divline.h>
#import <VerovioFramework/doc.h>
#import <VerovioFramework/docselection.h>
#import <VerovioFramework/dot.h>
Expand Down Expand Up @@ -138,6 +140,7 @@
#import <VerovioFramework/libmei.h>
#import <VerovioFramework/ligature.h>
#import <VerovioFramework/linkinginterface.h>
#import <VerovioFramework/liquescent.h>
#import <VerovioFramework/lv.h>
#import <VerovioFramework/mdiv.h>
#import <VerovioFramework/measure.h>
Expand Down Expand Up @@ -170,9 +173,7 @@
#import <VerovioFramework/pb.h>
#import <VerovioFramework/pedal.h>
#import <VerovioFramework/pgfoot.h>
#import <VerovioFramework/pgfoot2.h>
#import <VerovioFramework/pghead.h>
#import <VerovioFramework/pghead2.h>
#import <VerovioFramework/phrase.h>
#import <VerovioFramework/pitchinflection.h>
#import <VerovioFramework/pitchinterface.h>
Expand All @@ -186,6 +187,7 @@
#import <VerovioFramework/reg.h>
#import <VerovioFramework/reh.h>
#import <VerovioFramework/rend.h>
#import <VerovioFramework/repeatmark.h>
#import <VerovioFramework/resetfunctor.h>
#import <VerovioFramework/resources.h>
#import <VerovioFramework/rest.h>
Expand Down Expand Up @@ -226,6 +228,7 @@
#import <VerovioFramework/text.h>
#import <VerovioFramework/textdirinterface.h>
#import <VerovioFramework/textelement.h>
#import <VerovioFramework/textlayoutelement.h>
#import <VerovioFramework/tie.h>
#import <VerovioFramework/timeinterface.h>
#import <VerovioFramework/timemap.h>
Expand Down
2 changes: 1 addition & 1 deletion bindings/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.rism.verovio</groupId>
<artifactId>VerovioToolkit</artifactId>
<version>3.16.0-dev</version>
<version>3.17.0-dev</version>
<packaging>jar</packaging>

<name>VerovioToolkit</name>
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/.pypi-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# dummy file used by setup.py for counting revisions when publishing to test.pypi
# counting can be reset by making a change to this file
3.16.0
3.17.0
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"identifier": "Verovio",
"name": "Verovio",
"description": "Verovio is a fast, portable and lightweight open-source library for engraving Music Encoding Initiative (MEI) music scores into SVG.",
"softwareVersion": "3.16.0-dev",
"datePublished": "2023-03-01",
"softwareVersion": "3.17.0-dev",
"datePublished": "2023-07-03",
"license": "https://www.gnu.org/licenses/lgpl-3.0",
"programmingLanguage": [{
"@type": "ComputerLanguage",
Expand Down
2 changes: 1 addition & 1 deletion data/Bravura.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Bravura.xml
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@
<g c="EB9D" x="0.0" y="0.0" w="0.0" h="0.0" h-a-x="0" n="staffPosLower6" />
<g c="EB9E" x="0.0" y="0.0" w="0.0" h="0.0" h-a-x="0" n="staffPosLower7" />
<g c="EB9F" x="0.0" y="0.0" w="0.0" h="0.0" h-a-x="0" n="staffPosLower8" />
<g c="EBA6" x="0.0" y="0.0" w="148.0" h="786.0" h-a-x="149" n="luteDurationDoubleWhole" />
<g c="EBA7" x="0.0" y="0.0" w="36.0" h="790.0" h-a-x="36" n="luteDurationWhole" />
<g c="EBA8" x="0.0" y="0.0" w="228.0" h="786.0" h-a-x="228" n="luteDurationHalf" />
<g c="EBA9" x="0.0" y="0.0" w="228.0" h="786.0" h-a-x="228" n="luteDurationQuarter" />
Expand Down
1 change: 1 addition & 0 deletions data/Bravura/EBA6.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<symbol id="EBA6" viewBox="0 0 1000 1000" overflow="inherit"><path transform="scale(1,-1)" d="M4 663c-3 3 -4 7 -4 11c0 5 2 11 6 14l112 94l6 3c2 1 4 1 6 1c10 0 18 -8 18 -18v-750c0 -10 -8 -18 -18 -18s-18 8 -18 18v712l-82 -70c-4 -2 -8 -4 -12 -4c-5 0 -10 2 -14 7z" /></symbol>
2 changes: 1 addition & 1 deletion data/Leipzig.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Leipzig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
<g c="E049" x="0.0" y="-73.0" w="537.0" h="653.0" h-a-x="537" n="codaSquare" />
<g c="E503" x="0.0" y="73.0" w="95.0" h="94.0" h-a-x="95" n="repeatBarUpperDot" />
<g c="E505" x="0.0" y="-166.0" w="95.0" h="94.0" h-a-x="95" n="repeatBarLowerDot" />
<g c="EBA6" x="-82.0" y="0.0" w="174.0" h="791.0" h-a-x="92" n="luteDurationDoubleWhole" />
<g c="E0A5" x="0.0" y="0.0" w="0.0" h="0.0" h-a-x="314" n="noteheadNull" />
<g c="E940" x="-209.0" y="-209.0" w="418.0" h="418.0" h-a-x="0" n="mensuralCombStemDiagonal" />
<g c="E905" x="0.0" y="-500.0" w="526.0" h="1000.0" h-a-x="526" n="mensuralCclef" />
Expand Down
1 change: 1 addition & 0 deletions data/Leipzig/EBA6.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<symbol id="EBA6" viewBox="0 0 1000 1000" overflow="inherit"><path transform="scale(1,-1)" d="M-82 763c11 4 128 23 137 26c7 2 12 2 14 2c15 0 16 -15 16 -35v-7c0 -94 -4 -76 -5 -259v-43c0 -99 2 -259 2 -292c0 -19 1 -33 1 -41v-60c1 -23 4 -41 9 -54h-60c-8 155 -23 497 -23 725c0 1 0 6 -1 16c0 4 -2 5 -5 5c-10 -1 -25 -4 -46 -11c-22 -6 -35 -10 -37 -10 c-2 24 -2 37 -2 38z" /></symbol>
2 changes: 1 addition & 1 deletion emscripten/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verovio",
"version": "3.16.0-alpha",
"version": "3.17.0-alpha",
"description": "This is the stable version of the verovio package",
"main": "dist/verovio-toolkit-wasm.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion fonts/supported.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2834,7 +2834,7 @@
<!--<glyph glyph-code="EBA3" smufl-name="luteBarlineStartRepeat" />-->
<!--<glyph glyph-code="EBA4" smufl-name="luteBarlineEndRepeat" />-->
<!--<glyph glyph-code="EBA5" smufl-name="luteBarlineFinal" />-->
<!--<glyph glyph-code="EBA6" smufl-name="luteDurationDoubleWhole" />-->
<glyph glyph-code="EBA6" smufl-name="luteDurationDoubleWhole" />
<glyph glyph-code="EBA7" smufl-name="luteDurationWhole" />
<glyph glyph-code="EBA8" smufl-name="luteDurationHalf" />
<glyph glyph-code="EBA9" smufl-name="luteDurationQuarter" />
Expand Down
1 change: 1 addition & 0 deletions include/vrv/adjustyposfunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class AdjustYPosFunctor : public DocFunctor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitStaffAlignment(StaffAlignment *staffAlignment) override;
FunctorCode VisitSystem(System *system) override;
///@}
Expand Down
4 changes: 3 additions & 1 deletion include/vrv/alignfunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class AlignMeasuresFunctor : public DocFunctor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitMeasure(Measure *measure) override;
FunctorCode VisitScoreDef(ScoreDef *scoreDef) override;
FunctorCode VisitSection(Section *section) override;
Expand Down Expand Up @@ -159,6 +160,7 @@ class AlignVerticallyFunctor : public DocFunctor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitFig(Fig *fig) override;
FunctorCode VisitMeasure(Measure *measure) override;
FunctorCode VisitPageEnd(Page *page) override;
Expand Down Expand Up @@ -188,7 +190,7 @@ class AlignVerticallyFunctor : public DocFunctor {
int m_cumulatedShift;
// The sum of justification factors per page
int m_justificationSum;
// The page width
// The page width - used for setting the horizontal position of <rend> withing text layout elements
int m_pageWidth;
};

Expand Down
3 changes: 3 additions & 0 deletions include/vrv/castofffunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CastOffSystemsFunctor : public DocFunctor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitEditorialElement(EditorialElement *editorialElement) override;
FunctorCode VisitEnding(Ending *ending) override;
FunctorCode VisitMeasure(Measure *measure) override;
Expand Down Expand Up @@ -183,6 +184,7 @@ class CastOffEncodingFunctor : public DocFunctor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitEditorialElement(EditorialElement *editorialElement) override;
FunctorCode VisitEnding(Ending *ending) override;
FunctorCode VisitMeasure(Measure *measure) override;
Expand Down Expand Up @@ -296,6 +298,7 @@ class CastOffToSelectionFunctor : public DocFunctor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitEditorialElement(EditorialElement *editorialElement) override;
FunctorCode VisitMeasure(Measure *measure) override;
FunctorCode VisitPageElement(PageElement *pageElement) override;
Expand Down
26 changes: 26 additions & 0 deletions include/vrv/comparison.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,32 @@ class AttVisibilityComparison : public ClassIdComparison {
data_BOOLEAN m_isVisible;
};

//----------------------------------------------------------------------------
// AttFormeworkComparison
//----------------------------------------------------------------------------

/**
* This class evaluates if the object is of a certain ClassId and has a @func of value func.
*/
class AttFormeworkComparison : public ClassIdComparison {

public:
AttFormeworkComparison(ClassId classId, data_PGFUNC func) : ClassIdComparison(classId) { m_func = func; }

bool operator()(const Object *object) override
{
if (!MatchesType(object)) return false;
// This should not happen, but just in case
if (!object->HasAttClass(ATT_FORMEWORK)) return false;
const AttFormework *element = dynamic_cast<const AttFormework *>(object);
assert(element);
return (element->GetFunc() == m_func);
}

private:
data_PGFUNC m_func;
};

//----------------------------------------------------------------------------
// CrossAlignmentReferenceComparison
//----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions include/vrv/convertfunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ConvertToPageBasedFunctor : public Functor {
* Functor interface
*/
///@{
FunctorCode VisitDiv(Div *div) override;
FunctorCode VisitEditorialElement(EditorialElement *editorialElement) override;
FunctorCode VisitEditorialElementEnd(EditorialElement *editorialElement) override;
FunctorCode VisitEnding(Ending *ending) override;
Expand Down
111 changes: 111 additions & 0 deletions include/vrv/div.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/////////////////////////////////////////////////////////////////////////////
// Name: div.h
// Author: Laurent Pugin
// Created: 2023
// Copyright (c) Authors and others. All rights reserved.
/////////////////////////////////////////////////////////////////////////////

#ifndef __VRV_DIV_H__
#define __VRV_DIV_H__

#include "textlayoutelement.h"

namespace vrv {

//----------------------------------------------------------------------------
// Div
//----------------------------------------------------------------------------

/**
* This class represents an MEI Div.
* The current implementation accepts rend as child of div, which is not valid
* See https://github.com/music-encoding/music-encoding/issues/1189
*/
class Div : public TextLayoutElement {
public:
/**
* @name Constructors, destructors, and other standard methods
* Reset method resets all attribute classes
*/
///@{
Div();
virtual ~Div();
void Reset() override;
std::string GetClassName() const override { return "Div"; }
///@}

/**
* @name Get and set the inline drawing flag
*/
///@{
bool GetDrawingInline() const { return m_drawingInline; }
void SetDrawingInline(bool drawingInline) { m_drawingInline = drawingInline; }
///@}

/**
* @name Get the X and Y drawing position
*/
///@{
int GetDrawingX() const override;
int GetDrawingY() const override;
///@}

/**
* @name Get and set the X and Y drawing relative positions
*/
///@{
int GetDrawingXRel() const { return m_drawingXRel; }
virtual void SetDrawingXRel(int drawingXRel);
void CacheXRel(bool restore = false);
int GetDrawingYRel() const { return m_drawingYRel; }
virtual void SetDrawingYRel(int drawingYRel);
void CacheYRel(bool restore = false);
///@}

/**
* Overriden to get the appropriate margin
*/
int GetTotalHeight(const Doc *doc) const override;

int GetTotalWidth(const Doc *doc) const override;

//----------//
// Functors //
//----------//

/**
* Interface for class functor visitation
*/
///@{
FunctorCode Accept(Functor &functor) override;
FunctorCode Accept(ConstFunctor &functor) const override;
FunctorCode AcceptEnd(Functor &functor) override;
FunctorCode AcceptEnd(ConstFunctor &functor) const override;
///@}

private:
//
public:
//
private:
/**
* The Y drawing relative position of the object.
* It is re-computed everytime the object is drawn and it is not stored in the file.
*/
int m_drawingYRel;

/**
* The X drawing relative position of the object.
* It is re-computed everytime the object is drawn and it is not stored in the file.
*/
int m_drawingXRel;

/**
* A flag indicating that the div should be displayed inline
*/
bool m_drawingInline;
};

} // namespace vrv

#endif
Loading