Giter VIP home page Giter VIP logo

circle-flags's People

Contributors

ccwang002 avatar climech avatar ebuyuran avatar hatscripts avatar jussikinnula avatar mikima avatar ramongilmoreno avatar tnovau avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circle-flags's Issues

World Flag

Maybe someone has time to add a flag representing the whole planet. Something looking like a globe maybe.

Download

Add flag of Quebec

Include flag of the Canadian province of Quebec (ca-qc).

Depending on how much you want to simplify the fleur-de-lis, here is my version:

Proposal: use width/height instead of viewBox

I realize that viewBox="0 0 512 512" is shorter than width="512" height="512", but that's only a 3-character difference, and the latter has several advantages:

I'd argue that the pros of width/height outweigh the cons, so I'd like to make the change to svgo.yml and to the svg files in the repo, but I wanted to make sure we're on the same page regarding this beforehand, hence this issue. Let me know what you think!

Color-bleeding issue

Commit: a419c7f
visibility:hidden shadows all other inlined SVGs (testcase below).
Tested with: Chrome + Firefox
Would it be possible to revert this patch?
Thank you so much!

<!DOCTYPE html>
<html >
<head></head>
<body>
<!-- hides the 2 flags below -->
<div style="visibility:hidden">
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><mask id="a"><circle cx="256" cy="256" r="256" fill="#fff"/></mask><g mask="url(#a)"><path fill="#eee" d="m0 256 249.6-41.3L512 256v256H0z"/><path fill="#a2001d" d="M0 0h512v256H0z"/></g></svg>
</div>
<!-- invisible -->
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><mask id="a"><circle cx="256" cy="256" r="256" fill="#fff"/></mask><g mask="url(#a)"><path fill="#eee" d="m0 256 258.2-43.3L512 256v256H0z"/><path fill="#d80027" d="M0 0h512v256H0z"/></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><mask id="a"><circle cx="256" cy="256" r="256" fill="#fff"/></mask><g mask="url(#a)"><path fill="#d80027" d="m0 256 256.4-44.3L512 256v256H0z"/><path fill="#eee" d="M0 0h512v256H0z"/></g></svg>
</body>
</html>

Document flag design guidelines

From the conversation at #5:

The repo is mischievously titled circle-flags, ultimately allowing for expansion to include virtually any type of flag, so long as it follows the correct design scheme and has the right color palette.

Such design guidelines should be noted down in order to facilitate contributions to the project that expand the coverage of flags. Even a simple bullet list of high-level principles (with examples) would already be quite useful for this purpose.

Saudi Arabia flag is wrong

Saudi Arabia text seems to be wrong ? That's an issue that was filed on my lib that use this. I cannot verify this claim as I don't speak arabic

Update Afghanistan flag

The government of Afghanistan adopted a new flag in 2021. Here is a version I made based on Saudi Arabia's:
af_new_optimized

Styling with border radius not always works.

Hi,
First of all thanks for this awesome lib! Much appreciated.
I have installed this package as a dependency in my project.
I came across this weird issue where I've notice that the the styling of the border radius doesn't always work with border-radius:50%.
I first noticed when trying to rasterize the flags for a PDF export. The preview of the doc looked fine, but in the file itself the flag came out as as a square.
I navigated to the svg flag file in through my editor (WebStorm) and noticed the same thing, the flags are square there as well.
When opening the same file in the browser though, the border-radius:50% style prop was correctly interpreted and the flag showed up as round. And then it hit me! Not all programs are able to recognize/interpret the CSS like syntax. 🤔

Here is a preview of what I mean, file found at circle-flags/flags/gb.svg,
and notice border-radius:50% in the code side:

Screen Shot 2022-05-19 at 14 06 17

On the other hand, a svg image I found online, seems to by pass this issue in an another manner by adding some additional native svg elements which helps achieving a more universal compliance:

Screen Shot 2022-05-19 at 14 10 51

Here is a the code for the svg I found in the internet, maybe helps you see how they did it.
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"> <g stroke="none" fill="none"> <g> <circle fill="#F0F0F0" cx="256" cy="256" r="256" /> <g transform="translate(8.000000, 8.000000)" fill="#0052B4"> <path d="M44.92,92.142 C24.811,118.305 9.648,148.46 0.819,181.219 L133.997,181.219 L44.92,92.142 Z" /> <path d="M495.181,181.219 C486.352,148.461 471.188,118.306 451.08,92.143 L362.005,181.219 L495.181,181.219 Z" /> <path d="M0.819,314.784 C9.649,347.542 24.812,377.697 44.92,403.859 L133.994,314.784 L0.819,314.784 Z" /> <path d="M403.858,44.921 C377.695,24.812 347.541,9.649 314.782,0.819 L314.782,133.996 L403.858,44.921 Z" /> <path d="M92.142,451.079 C118.305,471.188 148.46,486.351 181.218,495.181 L181.218,362.005 L92.142,451.079 Z" /> <path d="M181.217,0.819 C148.459,9.649 118.304,24.812 92.142,44.92 L181.217,133.995 L181.217,0.819 Z" /> <path d="M314.783,495.181 C347.541,486.351 377.696,471.188 403.858,451.08 L314.783,362.005 L314.783,495.181 Z" /> <path d="M362.005,314.784 L451.08,403.86 C471.188,377.698 486.352,347.542 495.181,314.784 L362.005,314.784 Z" /> </g> <g fill="#D80027"> <path d="M509.833,222.609 L289.393,222.609 L289.392,222.609 L289.392,2.167 C278.461,0.744 267.317,0 256,0 C244.681,0 233.539,0.744 222.609,2.167 L222.609,222.607 L222.609,222.608 L2.167,222.608 C0.744,233.539 0,244.683 0,256 C0,267.319 0.744,278.461 2.167,289.391 L222.607,289.391 L222.608,289.391 L222.608,509.833 C233.539,511.256 244.681,512 256,512 C267.317,512 278.461,511.257 289.391,509.833 L289.391,289.393 L289.391,289.392 L509.833,289.392 C511.256,278.461 512,267.319 512,256 C512,244.683 511.256,233.539 509.833,222.609 Z" /> <path d="M322.783,322.783 L437.019,437.02 C442.273,431.768 447.285,426.277 452.067,420.585 L354.265,322.783 L322.783,322.783 Z" /> <path d="M189.217,322.784 L189.215,322.784 L74.98,437.019 C80.232,442.273 85.723,447.285 91.415,452.067 L189.217,354.263 L189.217,322.784 Z" /> <path d="M189.217,189.219 L189.217,189.217 L74.981,74.98 C69.727,80.232 64.715,85.723 59.933,91.415 L157.736,189.218 L189.217,189.219 Z" /> <path d="M322.783,189.219 L437.02,74.981 C431.768,69.727 426.277,64.715 420.585,59.934 L322.783,157.737 L322.783,189.219 Z" /> </g> </g> </g> </svg>

Sorry I couldn't be of more help but I'm not an svg expert myself.

Update Martinique Flag

Martinique (mq) has a new flag:

In this case, please leave the current "Four Snakes" flag up, at least as a historical variant, both for the recency of the change (see #87), and for the fact that it's a much better design than the new one that it would be a shame to remove from the repo completely.

White circle around some flags

I recently integrated your icons into my app, but some of the flags have a white outline around them. Is it expected?
изображение

Consistent naming of subnational flags

Some subnational flags have two hyphenated two letter codes, like cn-xj (China, Xinjiang) and in-ka (India, Karnataka), while others which are prima facie very similar, have standalone codes, either abbreviated like hk (Hong Kong) or spelled out in full like mizoram (Mizoram), instead of cn-hk (China, Hong Kong) and in-mz (India, Mizoram).
EDIT: I have since learned that the relevant standard is ISO 3166-2.

North Ireland flag

hey North Ireland flag is missing, can u help me?

Also, can i use this flags to create a flag pack for Football Manager 2022? I will credit your project, obviously!

iso alpha 2

a couple of flags are not using their iso alpha 2, like ac, ta, bq. It's easier for automated tools when everything is iso 2.

Coat of arms for the slovenian flag

The Slovenian flag currently has a stylised but incorrect coat of arms. If Spanish flag can be drawn in detail, so should Slovenian. You can find the official instructions for the Republic of Slovenia symbols here. Added is an example of quick fix:

si_round_edited

... + the same in official colours.

si_round_edited_proper_colours

[feature] create additional english dialect flags

Similar to this commit following dialects can be useful. Used from services as Microsoft Azure for example :

"en-GH", "English (Ghana)"
"en-HK", "English (Hong Kong)"
"en-IE", "English (Ireland)"
"en-KE", "English (Kenya)"
"en-NG", "English (Nigeria)"
"en-PH", "English (Philippines)"
"en-SG", "English (Singapore)"
"en-TZ", "English (Tanzania)"

Use a circular clipPath to mask flags

Per waldyrious's suggestion on #8, here are some experiments with converting flags to use a circular <clipPath>. This helps to avoid having longer than necessary <path d="...">s, and generally makes the code more human readable. It also seems to result in smaller files when minified with svgo (For these examples I'm using svgo 1.3.2; the latest release at the time of writing).

We also trying to avoid the anti-aliasing/color-bleeding issues described here and on the graphic design SE.

Russia

Original (302 bytes minified):

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
  <circle cx="256" cy="256" r="256" fill="#eee"/>
  <path fill="#0052b4" d="M496 345a255.4 255.4 0 0 0 0-178H16a255.5 255.5 0 0 0 0 178l240 22.3L496 345z"/>
  <path fill="#d80027" d="M256 512a256 256 0 0 0 240-167H16a256 256 0 0 0 240 167z"/>
</svg>

New (298 bytes minified):

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
  <defs>
    <clipPath id="circle-mask">
      <circle r="256" cy="256" cx="256"/>
    </clipPath>
  </defs>
  <g clip-path="url(#circle-mask)">
    <rect y="0" x="0" height="160" width="512" fill="#eeeeee"/> <!-- white -->
    <rect y="160" x="0" height="192" width="512" fill="#0052b4"/> <!-- blue -->
    <rect y="352" x="0" height="160" width="512" fill="#d80027"/> <!-- red -->
  </g>
</svg>

United States

Original (836 bytes minified):

16px, 24px, 32px, 48px (zoomed to 400%)

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
  <circle cx="256" cy="256" r="256" fill="#eee"/>
  <path fill="#d80027" d="M246 55v67h227.9A256 256 0 0 0 414 55H246zm0 134v67h266a256 256 0 0 0-9-67H246zM9 323a256 256 0 0 0 29.1 67h435.7a256 256 0 0 0 29-67H9zm89 134a256 256 0 0 0 158 55 256 256 0 0 0 158.5-55H97.9z"/>
  <path fill="#0052b4" d="M256 0a256 256 0 0 0-135 38.9h20l-21.6 15.7 8.2 25.4L106 64.3 84.4 80l6.3-19.4a256 256 0 0 0-48 54.3H48L38 122a256 256 0 0 0-9.2 16.1l5.8 17.8-10.5-7.7a256 256 0 0 0-9.3 22.7l6.5 19.9H48l-21.6 15.7 8.2 25.4L13 216.3 2.2 224A256 256 0 0 0 0 256h256V0z"/>
  <path fill="#eee" d="M84.4 156l56.6-41.1H71l56.6 41.1L106 89.4zm93 0l56.6-41.1h-70l56.6 41.1L199 89.4zm0-76L234 38.9h-70L220.6 80 199 13.4zm-93 152l56.6-41.1H71l56.6 41.1-21.6-66.6zm93 0l56.6-41.1h-70l56.6 41.1-21.6-66.6z"/>
</svg>

New (784 bytes minified):

16px, 24px, 32px, 48px (zoomed to 400%)

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
  <defs>
    <clipPath id="circle-mask">
      <circle r="256" cy="256" cx="256"/>
    </clipPath>
    <path id="star" d="M-8.6 80L48 38.9h-70L34.6 80 13 13.4z" fill="#eeeeee"/>
  </defs>
  <g clip-path="url(#circle-mask)">
    <rect y="0" x="0" height="512" width="512" fill="#eeeeee"/> <!-- White background -->

    <g fill="#d80027"> <!-- Red stripes -->
      <rect y="64" x="0" height="64" width="512"/>
      <rect y="192" x="0" height="64" width="512"/>
      <rect y="320" x="0" height="64" width="512"/>
      <rect y="448" x="0" height="64" width="512"/>
    </g>

    <rect y="0" x="0" height="256" width="256" fill="#0052b4"/> <!-- Blue background -->

    <use href="#star" transform="translate(0 0)"/>
    <use href="#star" transform="translate(0 76)"/>
    <use href="#star" transform="translate(0 152)"/>
    <use href="#star" transform="translate(93 0)"/>
    <use href="#star" transform="translate(93 76)"/>
    <use href="#star" transform="translate(93 152)"/>
    <use href="#star" transform="translate(186 0)"/>
    <use href="#star" transform="translate(186 76)"/>
    <use href="#star" transform="translate(186 152)"/>
  </g>
</svg>

Loading Image into Google sheet using =image()

I found that some flags do not load with the =image() formula in google sheets. The 2 I found is tr.svg and hk.svg do not load, but oddly enough cn-hk.svg does load

Not sure if this is due to something in the .svg file or not.

Safari blurry icons

Hi,

Your library is awesome. It works perfectly on any device except for safari(iOS and desktop). The flags are blurry.

device screenshot

It happens when you load an image from url
<img src="https://hatscripts.github.io/circle-flags/flags/br.svg" width="48">

I found solutions but looks tricky
<object type="image/svg+xml" data={path} />

It only affects icons from this library. That's why I guess it has some problems with svg structure.

Thanks again for your work!

SVG border-radius issue

Hey I noticed the flags have been updated to use <style> now for border-radius. Specifically the value 50% is leading to errors if user is using for example react-native-svg library's component for rendering the svg, since it is trying to pass the borderRadius as a string instead of a number.

Not really sure if this is something that could or should be fixed here or in the react-native-svg lib, but something to be aware of.

"clipPath" in es.svg

Thanks you so much for fixing #39!
Would it be difficult to remove the last remaining global "id" from es.svg?
Thanks for your merits!

Klingon flag

Hello! Could you add Klingon flag? I am working on a translator application that has this language and it would be nice to present it with a flag :)

Flag svgs are broken

Hi,

First of all thanks for a great flag library 🙏

It seems that the latest commit 'Optimize files with svgo 2.3.0' has broken lots of the svgs. I can see the flags are also missing on your flag gallery website.

You might already be working on a fix for this, but I just wanted to let you know since lots of the flags on my website depend on this great library. 😊

broken flags

Historical flags

Are you open to including historical flags, such as the USSR or the Betsy Ross flag?

issue with SVGO

Hi, i followed the readme sintraction, however when i run svgo ./flags --recursive --config=svgo.config.js i get this error:
Error: Unknown builtin plugin "cleanupIDs" specified.

I'm using node v19.1.0 and SVGO 3.0.2

More explicit svgo version

Moving a discussion started in c9eed38 into an actual issue, to make it more trackable :) Repeating what I said there:

@HatScripts I think it's better to mention a specific version or version range that's been tested to work, in case they introduce breaking changes that invalidate this statement. E.g. #93.

@HatScripts, would you mind copying your response below, so it gets properly attributed to you? Then we can continue the discussion here.

Rollback to the internationally-recognized flag of Afghanistan

I did not see any discussion with the commits regarding this flag change.

According to the Flag of Afghanistan Wikipedia page, the internationally-recognised flag of Afghanistan is still the one from the Islamic Republic of Afghanistan (tricolor flag), and not the Islamic Emirate of Afghanistan (white flag, Taliban flag).

For example: the UN still use the tricolor flag, and a search for "afghan embassy" on Twitter only shows the tricolor flags, in various countries.

My suggestion would be to rollback 0a9caaf (#77, #82)

Adjusting a flag without recognition from the international community might be a bit sensitive and/or a political statement. Adding the flags of disputed lands is opening the discussion, but by changing this flag, you are removing a flag still recognised by almost the whole world the world to show one only recognised by a few.

If there is another source (consistently) used by this repo that do recognise the white version of the flag, please let me know and I would be happy to use an historical version of this repository.

Change `languages/la.svg`

Latin is associated with ancient Rome, commonly referred to as SPQR (Senatus Populusque Romanus), which was its government.

The flag of the SPQR resembles:
SPQR standard
(image from Wikipedia)
Also:
SPQR flag
(image from Wikimedia Commons)

A website named "Duolingo" uses the following flag:
image
(from this CDN link)

Overall, the flag can be described as two golden wheat spikes encircling the golden letters "SPQR" in a serif font on a red background.

I have no idea where the current flag (red background with the character æ) comes from. This character is not unique to Latin and is used today in many nordic languages (Norwegian, Danish, Icelandic, etc.)

Flag of French Guiana is missing

GF.svg flag is missing in the source.

In the file all-flags.md:

French Guiana (GF) is incorrect - you have mapped it to the Flag of Georgia

These flags are missing

Hey! I use this library with the CountryType field of Symfony.

Unfortunately, it seems that some flags are missing. Here is the list :

sh : Saint Helena
mf : Saint-Martin
pm : Saint Pierre and Miquelon
wf : Wallis and futuna
tf : Southern French lands
sj: Svalbard and Jan Mayen
bq : Caribbean Netherlands
nc : New Caledonia
yt : Mayotte
re : La Réunion
um : United States Minor Outlying Islands
hm : Heard and MacDonald Islands
bv : Bouvet Island
gp : Guadeloupe
gs : South Georgia and the South Sandwich Islands
aq : Antarctic

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.