Closed cannin closed 8 years ago
Original comment by: amarillion
Original comment by: amarillion
Frank, I've implemented your label proposal, I'll follow up on the mailing list. I'm going to copy your propsal for styles to a separate bug. Please try to keep bug reports atomic!
Original comment by: amarillion
Original comment by: alice_villeger
Hello all,
At the last evo meeting, I've been asked to detail shortly some ideas for the positioning of text labels. These ideas are inspired by the SBML Layout / Render Extension. I'll try to be as brief as possible.
The key difference between the current SBGN-ML and the SBML Layout Extension with respect to text, is that we are missing a bounding box in which the text is supposed to be rendered. In the SBML Layout Extension the glyphs and text labels are actually separate elements. But that is not necessarily what we have to do here. Let us have a look at the current format:
<glyph class="simple chemical" id="glyph_ethanal"> <label text="Ethanal" /> <bbox x="220" y="110" w="60" h="60"/> </glyph>
I'm proposing that the label should have its own bounding box as well. If possible I would argue for backwards compatibility that if no label bounds are defined the label should inherit the glyphs bounding box. This would make the above equivalent with:
<glyph class="simple chemical" id="glyph_ethanal"> <label text="Ethanal"> <bbox x="220" y="110" w="60" h="60"/> </label> <bbox x="220" y="110" w="60" h="60"/> </glyph>
This actually would already solve our issue of representing floating compartment labels.
What we have not specified here is more information about alignment, font, and fontsize. So right now it would be left to the tool how to render the text inside the given bounding box. In the SBML Render Extension this is defined through styles for example:
<style idList="tGlyph_5"> <g stroke="Color_2" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top"/> </style>
While I'd love to have this kind of information eventually I think for the time being we could live without it, and define that the text is to be rendered horizontally and vertically centered in a bounding box with a font that does not overspill. If we could agree on this we would be able to at least qualitatively reproduce maps.
Best Frank
Reported by: fbergmann