drawshield / Drawshield-Code

PHP code to create SVG shield images from Blazons, as used on drawshield.net
https://drawshield.net
GNU General Public License v3.0
50 stars 18 forks source link

Canton improvements (shield & flag) #54

Open karlwilcox opened 4 years ago

karlwilcox commented 4 years ago

See following discussion:

Hi Karl,

So the simplest way to do this would be to have a few various cantons to work with. This also makes the most sense because in reality, while we call many things a canton in vexillology, they all can have various shapes. That's what I aim to fix by having four types of cantons.

First, you have square cantons. You're correct in that altering the height would change the width as well to keep it square. If you just say "a square canton", that implies that the square is exactly 1/2 the vertical size of the field, and the width of the canton will take care of itself.

Then you have square cantons that terminate at a bar. They work largely the same but the descriptor "of N bars" would have to be added to specify their vertical size (and again in turn adjusting their width as well).

For rectangular cantons, you have three types in common use. The first is quarter, taking up exactly 1/2 the width and 1/2 the height of the field. An example would be the Blue Ensign flags of the British Overseas Territories, which I propose you simply define as "a quarter".

The quarter can also be terminated at a specific barline, making it technically 1/2 the width of the field, but some value other than 1/2 the height of the field. An example of this would be the flag of Malaysia, whose canton is 1/2 the width of the field, but whose lower boundary is aligned on the 8th of 14 bars, making it slightly larger than 1/2. For cantons like these, I simply propose you say "a quarter of n bars".

Next you have what I've taken to calling a "two-fifths canton", a "fourty canton" (meaning 40% the width of the field) or just a "US canton" (because it appears on almost all US flags dating back to some of its earliest renditions). This canton is 2/5ths the width of the field and, by default, 1/2 the height of the field. However, it too can be made to align to specific bars, with the US flag being a prime example. This would then be "a US canton of 7 bars" on the US flag. An example of a two-fifths canton that is exactly 1/2 the height of the field is in the flag of Tonga, whose measurements are very precise and not well documented, but the canton is roughly 40% the width of the field and exactly 1/2 the height.

Finally, you have what I believe are traditional heraldic cantons, which (if I'm not mistaken) are 1/3 the width of the field and 1/2 the height. These could just be called cantons, and could still be subjected to the "of n bars" modifier.

To recap, my research proposes the following four cantons:

  1. Square Canton: a perfect square canton which by default takes up 1/2 the height of the field
  2. Quarter: a rectangular which by default is 1/2 the width of the field and 1/2 the height of the field
  3. Two-Fifths Canton, Fourty Canton, US Canton*: a rectangular canton which by default is 2/5 the width of the field and 1/2 the height of the field
  4. Canton: a rectangular canton which by default is 1/3 the width of the field and 1/2 the height of the field

All of these cantons can have the "of n bars" descriptor at the end to adjust their height (and in the case of the square canton, adjust its width as well). They can also be put in chief sinister (a x canton sinister), dexter base (an x canton in base), and sinister base (an x canton sinister in base).

Hopefully this all makes sense. Please don't hesitate to ask if you have any further questions or need clarification. Thanks!

Mike

On Tue, Nov 5, 2019 at 2:55 PM Karl Wilcox karlwilcox36@gmail.com wrote:

Hi Mike,

I've got some code working on my development server that implements "a canton of N bars" for the height. Obviously in a square canton the width would be the same as the height but what would the width be for the ordinary canton? I can make it either a fixed width (say 1/3 of the total width), or I can force the aspect ratio of the canton to stay the same (e.g. the width is always 150% of the height or something?

Any thoughts?

Cheers,

Karl

—
Karl R. Wilcox
Creator: Leading heraldry site drawshield.net
E-mail: karlwilcox36@gmail.com
Website: karlwilcox.com
LinkedIn: linkedin.com/in/karlwilcox
Github: github.com/karlwilcox

On Tue, Nov 5, 2019 at 1:01 PM Micah wrote:

    Karl,

    I saw on your Twitter feed that you added the canton adjustments we discussed. I wanted to say thank you for taking the time to read my suggestions!

    After I sent you that email I compiled a bit of research on modern cantons and how they are used. I wanted to get your take to see if implementing these features would be feasible or not.

    Many cantons dictate their vertical size based not on the flag proportions but from objects on the field, almost always bars. For example, the United States flag isn't actually 1/2 the vertical size of the field, it's technically "7/13ths" because it aligns its lower boundary on the separation between the 7th and 8th bar from the field. The flag of Greece is another example, being a square canton but specifically aligning its lower boundary between the 5th and 6th bar from the field.

    My question to you is this: is it feasible to implement such a change? Since it's unexplored territory I took the liberty of compiling it all into a research paper and giving it the syntax "...a canton of n bars..." or just "...a canton of n...". Basically, this would mean that if you previously indicated bars on the field, this command would set the vertical size of the canton to exactly that many bars. The US flag would then be "barry of thirteen gules and argent, on a canton of seven bars (or just "on a canton of seven"),...". Square cantons would work the same way, so Greece would be "Barry of eight azure and argent, on a square canton of five, ..." It would allow for cantons to be set to the exact heights that they are depicted as in their flags.

    I understand that may be difficult to implement, and I also understand and respect that your interests lie primarily in heraldic uses so this kind of specificity may be beyond what you're interested in getting into since it only really applies to flags and not heraldic achievements. Regardless, I'm always interested in discussing flag design so I just figured I would see what you thought. I appreciate you taking the time to discuss this all with me.

    Thank you again!
    Mike
karlwilcox commented 1 year ago

Combine with #57 - Even if there is a cheif present (according to Robin), that means that they also need to be drawn after the chief. May also be noted in the discussion in https://github.com/drawshield/Drawshield-Code/issues/54 but can be tackled separately