Author Topic: Clinched Routes Highway Shields  (Read 151835 times)

0 Members and 1 Guest are viewing this topic.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4422
  • Last Login:November 11, 2024, 12:50:03 pm
  • I like C++
Re: Clinched Routes Highway Shields
« Reply #105 on: January 31, 2018, 05:03:33 pm »
Just thinking out loud here; I haven't looked into the ShieldGen code, as I don't grok the language it's written in, and thus don't understand, in detail, what makes it tick. It's possible that I'm missing something important.

The main issue with canmb was the superscripted letters, which I'm not sure how to handle.
If we just say fudge-it-this-is-better-than-nothing and include regular letters, is that doable?
It is, and there are a few others in that category (PEI for example). Or we could just estimate.
PEI GMSV examples: 17A, 18A, and 19A (which uses a smaller font size 'A' than the first two examples)
I take "that category" to mean using letters in a smaller font size, thus complicating sizing & positioning of the text, and not necessarily superscript specifically.
usane has a similar route, NE25A, which is handled in the HB like a normal 3dNE (Compare vanilla NE25).
(To be clear, I'm perfectly fine with the way NE25A is handled in the HB; I'm just mentioning that here for completeness & comparison's sake.)

For how to handle these cases, the best comparison I can think of is usanh.
Like many other systems, ShieldGen already has to check whether a route is a 1d/2dNH or 3dNH to get the sizing & positioning of the text right. But it also has to check whether a route has a letter suffix, in which case the text is handled differently.
From viewing the source in the HB, it looks like this is done via two <text> tags, each with different x= & y= variables in the <tspan> tag.
This should be adaptable to canpe & canmb... or is there more to it?
« Last Edit: January 31, 2018, 05:06:56 pm by yakra »
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline rschen7754

  • Jr. Member
  • **
  • Posts: 51
  • Gender: Male
  • Last Login:Yesterday at 08:06:13 pm
    • Rschen7754
Re: Clinched Routes Highway Shields
« Reply #106 on: February 01, 2018, 02:27:25 pm »
For how to handle these cases, the best comparison I can think of is usanh.
Like many other systems, ShieldGen already has to check whether a route is a 1d/2dNH or 3dNH to get the sizing & positioning of the text right. But it also has to check whether a route has a letter suffix, in which case the text is handled differently.
From viewing the source in the HB, it looks like this is done via two <text> tags, each with different x= & y= variables in the <tspan> tag.
This should be adaptable to canpe & canmb... or is there more to it?

The problem is that the SVG template doesn't have a space for the letter. That doesn't mean that someone couldn't estimate where it is and add it.

I generally prioritize shields where I don't have to do that sort of thing. Sometimes I am able to come back to more complex cases as my SVG/shield skills improve. I'm hoping to get more Nova Scotia shields done soon since those were added to Commons recently.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4422
  • Last Login:November 11, 2024, 12:50:03 pm
  • I like C++
Re: Clinched Routes Highway Shields
« Reply #107 on: February 02, 2018, 12:33:18 am »
Quote
That doesn't mean that someone couldn't estimate where it is and add it.
Willing to take a stab at it. A lot of learning to do, though. I just figured out "resize page to content" in Inkscape...
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline rschen7754

  • Jr. Member
  • **
  • Posts: 51
  • Gender: Male
  • Last Login:Yesterday at 08:06:13 pm
    • Rschen7754
Re: Clinched Routes Highway Shields
« Reply #108 on: February 02, 2018, 01:30:47 am »
I would recommend starting with what Commons already has and working off that. For the letters, it may help to pull up an existing shield and estimate where the letter field would go from that.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4422
  • Last Login:November 11, 2024, 12:50:03 pm
  • I like C++
Re: Clinched Routes Highway Shields
« Reply #109 on: February 02, 2018, 03:11:53 pm »
Commons uses an older style, without the bison graphic. Based off this one example, the text may be centered a bit differently too. I may just have to eyeball it.
I'm interested in doing this, yes, but it's a low priority. Got a few things on my plate. :)
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4422
  • Last Login:November 11, 2024, 12:50:03 pm
  • I like C++
Re: Clinched Routes Highway Shields
« Reply #110 on: February 03, 2018, 03:07:23 pm »
Riscussion re Manitoba Provincial Roads shields split and merged into the Manitoba Provincial Roads thread.
http://tm.teresco.org/forum/index.php?topic=2344.msg8872#msg8872
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4422
  • Last Login:November 11, 2024, 12:50:03 pm
  • I like C++
Re: Clinched Routes Highway Shields
« Reply #111 on: February 04, 2018, 11:26:05 am »
State abbreviations in out-of-state route segments:

tm.teresco.org/hb/?r=pa.ny017swa
tm.teresco.org/hb/?r=ct.ny120agre

tm.teresco.org/hb/?r=nh.me113cha
tm.teresco.org/hb/?r=nh.me113con
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Eth

  • Jr. Member
  • **
  • Posts: 71
  • Last Login:November 08, 2024, 02:20:22 pm
Re: Clinched Routes Highway Shields
« Reply #112 on: February 07, 2018, 05:26:25 pm »
State abbreviations in out-of-state route segments:

tm.teresco.org/hb/?r=pa.ny017swa
tm.teresco.org/hb/?r=ct.ny120agre

tm.teresco.org/hb/?r=nh.me113cha
tm.teresco.org/hb/?r=nh.me113con

See also http://tm.teresco.org/hb/?r=ga.tn068.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 10:13:19 am
Re: Clinched Routes Highway Shields
« Reply #113 on: May 15, 2018, 10:45:23 am »
Does anyone know where the fonts were downloaded?  They're in our repository and I'm not sure they should be.  At the least, we need a credits entry about the fonts.

Offline rschen7754

  • Jr. Member
  • **
  • Posts: 51
  • Gender: Male
  • Last Login:Yesterday at 08:06:13 pm
    • Rschen7754
Re: Clinched Routes Highway Shields
« Reply #114 on: May 15, 2018, 02:20:50 pm »
2005: https://n1en.org/roadgeek-fonts/

2014: https://github.com/sammdot/roadgeek-fonts

There's a few one-off fonts in there that I would have to look closer at.

Offline si404

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2067
  • Last Login:Today at 12:54:41 am
Re: Clinched Routes Highway Shields
« Reply #115 on: January 12, 2021, 04:16:05 pm »
Some more basic cartouche style shields (though the list on page 1 isn't, IIRC, finished being implemented) as Jim is doing shield stuff this afternoon:

ausm*, ausa*, ausxxxb, ausxxxc, ausr - green background, yellow text, prefix
finst, frolv - white background, black text, no prefix
gbnb, nirb, irlr - white background, black text, prefix
fraxxxd - yellow background, black text, prefix (includes overseas stuff like reu, glp, guf, myt, mtq)
fraxxxm, fracort - cyan background, white text, prefix
ukrm - blue background, white text, prefix
espxx - orange background, white text, prefix with dash** (except for espct)
espn, espct - red background, white text, prefix with dash** (espn already done, just letting you know its the same template)

That'll be enough for now.

*some states use an National Highway sign with an alphanumeric number, but we'll leave that for now.
**espn has a dash between prefix and number automatically inserted. espxx and espa (which has shields) also have a dash between prefix and number.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4849
  • Last Login:November 20, 2024, 11:21:09 am
Re: Clinched Routes Highway Shields
« Reply #116 on: January 13, 2021, 01:15:54 pm »
@Jim, please note that the svg files are also used in showroute.

e.g. bela shield looks good on clinched.php but 1-digit numbers look bad on showroute.php - it was the same with the old shield.

Just do make the shield shi* more complicated....

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 10:13:19 am
Re: Clinched Routes Highway Shields
« Reply #117 on: January 13, 2021, 01:38:26 pm »
As you might have noticed, I'm starting to put some shield generation items from this thread into GitHub Issues, where I (and hopefully others) can more easily find them and discuss on a case-by-case basis and close when fixed/improved/implemented.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Today at 10:13:19 am
Re: Clinched Routes Highway Shields
« Reply #118 on: January 13, 2021, 01:43:00 pm »
@Jim, please note that the svg files are also used in showroute.

e.g. bela shield looks good on clinched.php but 1-digit numbers look bad on showroute.php - it was the same with the old shield.

Just do make the shield shi* more complicated....

Reopened https://github.com/TravelMapping/Web/issues/590 for this.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4849
  • Last Login:November 20, 2024, 11:21:09 am
Re: Clinched Routes Highway Shields
« Reply #119 on: January 13, 2021, 01:46:19 pm »
As you might have noticed

yep, I just needed a place for my general note that the shields are always used twice: on clinched.php and on showroute.php. One must always check that new shields work on both.