Skip to content

Commit

Permalink
chore: Add a QRCode icon in the font (openfoodfacts#5015)
Browse files Browse the repository at this point in the history
* QRCode icons

* Fix typo
  • Loading branch information
g123k authored Jan 27, 2024
1 parent 7d6244e commit acbe694
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 10 deletions.
Binary file modified packages/smooth_app/assets/fonts/SmoothIcons.ttf
Binary file not shown.
30 changes: 29 additions & 1 deletion packages/smooth_app/assets/fonts/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@
},
{
"uid": "757a50310db185dc97335fa2a2a81f47",
"css": "personnalization",
"css": "personalization",
"code": 59440,
"src": "custom_icons",
"selected": true,
Expand All @@ -711,6 +711,34 @@
"search": [
"no_picture"
]
},
{
"uid": "d46202801c1482b5815eb9a0d3fb872e",
"css": "qrcode",
"code": 59442,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M363.6 386.4L363.6 295.5C363.6 282.9 373.8 272.7 386.4 272.7L454.5 272.7 454.5 204.5 386.4 204.5C373.8 204.5 363.6 194.4 363.6 181.8L363.6 90.9C363.6 78.4 373.8 68.2 386.4 68.2L477.3 68.2C489.8 68.2 500 78.4 500 90.9L500 159.1 568.2 159.1C580.7 159.1 590.9 169.3 590.9 181.8L590.9 295.5C590.9 308 580.7 318.2 568.2 318.2L500 318.2 500 386.4 750 386.4C762.6 386.4 772.7 396.5 772.7 409.1L772.7 500C772.7 504.2 771.6 508 769.7 511.4 771.6 514.7 772.7 518.6 772.7 522.7L795.5 522.7 795.5 477.3C795.5 464.7 805.6 454.5 818.2 454.5L909.1 454.5C921.6 454.5 931.8 464.7 931.8 477.3L931.8 681.8C931.8 694.4 921.6 704.5 909.1 704.5L818.2 704.5C814 704.5 810.2 703.4 806.8 701.5 803.5 703.4 799.6 704.5 795.5 704.5L772.7 704.5 772.7 727.3 909.1 727.3C921.6 727.3 931.8 737.4 931.8 750L931.8 931.8C931.8 944.4 921.6 954.5 909.1 954.5L727.3 954.5C714.7 954.5 704.5 944.4 704.5 931.8L704.5 795.5 590.9 795.5 590.9 863.6C590.9 876.2 580.7 886.4 568.2 886.4L477.3 886.4C464.7 886.4 454.5 876.2 454.5 863.6L454.5 750C454.5 737.4 464.7 727.3 477.3 727.3L522.7 727.3 522.7 659.1C522.7 646.5 532.9 636.4 545.5 636.4L704.5 636.4 704.5 590.9 613.6 590.9C601.1 590.9 590.9 580.7 590.9 568.2L590.9 522.7 477.3 522.7C464.7 522.7 454.5 512.6 454.5 500L454.5 431.8 409.1 431.8 409.1 590.9C409.1 603.5 398.9 613.6 386.4 613.6L295.5 613.6C282.9 613.6 272.7 603.5 272.7 590.9L272.7 522.7 204.5 522.7 204.5 590.9C204.5 603.5 194.4 613.6 181.8 613.6L90.9 613.6C78.4 613.6 68.2 603.5 68.2 590.9L68.2 500C68.2 487.4 78.4 477.3 90.9 477.3L159.1 477.3 159.1 409.1C159.1 396.5 169.3 386.4 181.8 386.4L363.6 386.4ZM170.5 45.5C189.3 45.5 204.5 60.7 204.5 79.5L204.5 215.9C204.5 234.7 189.3 250 170.5 250L34.1 250C15.3 250 0 234.7 0 215.9L0 79.5C0 60.7 15.3 45.5 34.1 45.5L170.5 45.5ZM159.1 79.5L45.5 79.5C39.2 79.5 34.1 84.6 34.1 90.9L34.1 204.5C34.1 210.8 39.2 215.9 45.5 215.9L159.1 215.9C165.4 215.9 170.5 210.8 170.5 204.5L170.5 90.9C170.5 84.6 165.4 79.5 159.1 79.5ZM125 102.3C137.6 102.3 147.7 112.4 147.7 125L147.7 170.5C147.7 183 137.6 193.2 125 193.2L79.5 193.2C67 193.2 56.8 183 56.8 170.5L56.8 125C56.8 112.4 67 102.3 79.5 102.3L125 102.3ZM965.9 45.5C984.7 45.5 1000 60.7 1000 79.5L1000 215.9C1000 234.7 984.7 250 965.9 250L829.5 250C810.7 250 795.5 234.7 795.5 215.9L795.5 79.5C795.5 60.7 810.7 45.5 829.5 45.5L965.9 45.5ZM954.5 79.5L840.9 79.5C834.6 79.5 829.5 84.6 829.5 90.9L829.5 204.5C829.5 210.8 834.6 215.9 840.9 215.9L954.5 215.9C960.8 215.9 965.9 210.8 965.9 204.5L965.9 90.9C965.9 84.6 960.8 79.5 954.5 79.5ZM920.5 102.3C933 102.3 943.2 112.4 943.2 125L943.2 170.5C943.2 183 933 193.2 920.5 193.2L875 193.2C862.4 193.2 852.3 183 852.3 170.5L852.3 125C852.3 112.4 862.4 102.3 875 102.3L920.5 102.3ZM170.5 727.3C189.3 727.3 204.5 742.5 204.5 761.4L204.5 897.7C204.5 916.6 189.3 931.8 170.5 931.8L34.1 931.8C15.3 931.8 0 916.6 0 897.7L0 761.4C0 742.5 15.3 727.3 34.1 727.3L170.5 727.3ZM159.1 761.4L45.5 761.4C39.2 761.4 34.1 766.5 34.1 772.7L34.1 886.4C34.1 892.6 39.2 897.7 45.5 897.7L159.1 897.7C165.4 897.7 170.5 892.6 170.5 886.4L170.5 772.7C170.5 766.5 165.4 761.4 159.1 761.4ZM125 784.1C137.6 784.1 147.7 794.3 147.7 806.8L147.7 852.3C147.7 864.8 137.6 875 125 875L79.5 875C67 875 56.8 864.8 56.8 852.3L56.8 806.8C56.8 794.3 67 784.1 79.5 784.1L125 784.1Z",
"width": 1000
},
"search": [
"qrcode"
]
},
{
"uid": "33f56d489a85012d8576ab5b944211fa",
"css": "qrcode_corners",
"code": 59443,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M14.2 216.9C22.3 216.9 28.4 210.8 28.4 202.7L28.4 131.7C28.4 113.3 43.1 98.6 61.5 98.6L132.6 98.6C140.6 98.6 146.8 92.4 146.8 84.4 146.8 76.3 140.6 70.2 132.6 70.2L61.5 70.2C27.5 70.2 0 97.6 0 131.7L0 202.7C0 210.8 6.2 216.9 14.2 216.9ZM61.5 947.4L132.6 947.4C140.6 947.4 146.8 941.2 146.8 933.2 146.8 925.1 140.6 919 132.6 919L61.5 919C43.1 919 28.4 904.3 28.4 885.8L28.4 814.8C28.4 806.8 22.3 800.6 14.2 800.6 6.2 800.6 0 806.8 0 814.8L0 885.8C0 919.9 27.5 947.4 61.5 947.4ZM1003.3 800.6C995.3 800.6 989.1 806.8 989.1 814.8L989.1 885.8C989.1 904.3 974.5 919 956 919L885 919C876.9 919 870.8 925.1 870.8 933.2 870.8 941.2 876.9 947.4 885 947.4L956 947.4C990.1 947.4 1017.5 919.9 1017.5 885.8L1017.5 814.8C1017.5 806.8 1011.4 800.6 1003.3 800.6ZM952.4 70.2L881.4 70.2C873.3 70.2 867.2 76.3 867.2 84.4 867.2 92.4 873.3 98.6 881.4 98.6L952.4 98.6C970.9 98.6 985.5 113.3 985.5 131.7L985.5 202.7C985.5 210.8 991.7 216.9 999.7 216.9 1007.8 216.9 1013.9 210.8 1013.9 202.7L1013.9 131.7C1013.9 97.6 986.5 70.2 952.4 70.2ZM403.5 438.6L403.5 368.4C403.5 358.7 411.4 350.9 421.1 350.9L473.7 350.9 473.7 298.2 421.1 298.2C411.4 298.2 403.5 290.4 403.5 280.7L403.5 210.5C403.5 200.8 411.4 193 421.1 193L491.2 193C500.9 193 508.8 200.8 508.8 210.5L508.8 263.2 561.4 263.2C571.1 263.2 578.9 271 578.9 280.7L578.9 368.4C578.9 378.1 571.1 386 561.4 386L508.8 386 508.8 438.6 701.8 438.6C711.4 438.6 719.3 446.5 719.3 456.1L719.3 526.3C719.3 529.5 718.4 532.5 716.9 535.1 718.4 537.7 719.3 540.7 719.3 543.9L736.8 543.9 736.8 508.8C736.8 499.1 744.7 491.2 754.4 491.2L824.6 491.2C834.3 491.2 842.1 499.1 842.1 508.8L842.1 666.7C842.1 676.4 834.3 684.2 824.6 684.2L754.4 684.2C751.2 684.2 748.2 683.4 745.6 681.9 743 683.4 740 684.2 736.8 684.2L719.3 684.2 719.3 701.8 824.6 701.8C834.3 701.8 842.1 709.6 842.1 719.3L842.1 859.6C842.1 869.3 834.3 877.2 824.6 877.2L684.2 877.2C674.5 877.2 666.7 869.3 666.7 859.6L666.7 754.4 578.9 754.4 578.9 807C578.9 816.7 571.1 824.6 561.4 824.6L491.2 824.6C481.5 824.6 473.7 816.7 473.7 807L473.7 719.3C473.7 709.6 481.5 701.8 491.2 701.8L526.3 701.8 526.3 649.1C526.3 639.4 534.2 631.6 543.9 631.6L666.7 631.6 666.7 596.5 596.5 596.5C586.8 596.5 578.9 588.6 578.9 578.9L578.9 543.9 491.2 543.9C481.5 543.9 473.7 536 473.7 526.3L473.7 473.7 438.6 473.7 438.6 596.5C438.6 606.2 430.7 614 421.1 614L350.9 614C341.2 614 333.3 606.2 333.3 596.5L333.3 543.9 280.7 543.9 280.7 596.5C280.7 606.2 272.8 614 263.2 614L193 614C183.3 614 175.4 606.2 175.4 596.5L175.4 526.3C175.4 516.6 183.3 508.8 193 508.8L245.6 508.8 245.6 456.1C245.6 446.5 253.5 438.6 263.2 438.6L403.5 438.6ZM254.4 175.4C268.9 175.4 280.7 187.2 280.7 201.8L280.7 307C280.7 321.6 268.9 333.3 254.4 333.3L149.1 333.3C134.6 333.3 122.8 321.6 122.8 307L122.8 201.8C122.8 187.2 134.6 175.4 149.1 175.4L254.4 175.4ZM245.6 201.8L157.9 201.8C153.1 201.8 149.1 205.7 149.1 210.5L149.1 298.2C149.1 303.1 153.1 307 157.9 307L245.6 307C250.5 307 254.4 303.1 254.4 298.2L254.4 210.5C254.4 205.7 250.5 201.8 245.6 201.8ZM219.3 219.3C229 219.3 236.8 227.2 236.8 236.8L236.8 271.9C236.8 281.6 229 289.5 219.3 289.5L184.2 289.5C174.5 289.5 166.7 281.6 166.7 271.9L166.7 236.8C166.7 227.2 174.5 219.3 184.2 219.3L219.3 219.3ZM868.4 175.4C883 175.4 894.7 187.2 894.7 201.8L894.7 307C894.7 321.6 883 333.3 868.4 333.3L763.2 333.3C748.6 333.3 736.8 321.6 736.8 307L736.8 201.8C736.8 187.2 748.6 175.4 763.2 175.4L868.4 175.4ZM859.6 201.8L771.9 201.8C767.1 201.8 763.2 205.7 763.2 210.5L763.2 298.2C763.2 303.1 767.1 307 771.9 307L859.6 307C864.5 307 868.4 303.1 868.4 298.2L868.4 210.5C868.4 205.7 864.5 201.8 859.6 201.8ZM833.3 219.3C843 219.3 850.9 227.2 850.9 236.8L850.9 271.9C850.9 281.6 843 289.5 833.3 289.5L798.2 289.5C788.6 289.5 780.7 281.6 780.7 271.9L780.7 236.8C780.7 227.2 788.6 219.3 798.2 219.3L833.3 219.3ZM254.4 701.8C268.9 701.8 280.7 713.5 280.7 728.1L280.7 833.3C280.7 847.9 268.9 859.6 254.4 859.6L149.1 859.6C134.6 859.6 122.8 847.9 122.8 833.3L122.8 728.1C122.8 713.5 134.6 701.8 149.1 701.8L254.4 701.8ZM245.6 728.1L157.9 728.1C153.1 728.1 149.1 732 149.1 736.8L149.1 824.6C149.1 829.4 153.1 833.3 157.9 833.3L245.6 833.3C250.5 833.3 254.4 829.4 254.4 824.6L254.4 736.8C254.4 732 250.5 728.1 245.6 728.1ZM219.3 745.6C229 745.6 236.8 753.5 236.8 763.2L236.8 798.2C236.8 807.9 229 815.8 219.3 815.8L184.2 815.8C174.5 815.8 166.7 807.9 166.7 798.2L166.7 763.2C166.7 753.5 174.5 745.6 184.2 745.6L219.3 745.6Z",
"width": 1018
},
"search": [
"qrcode_corners"
]
}
]
}
Binary file modified packages/smooth_app/assets/fonts/icons/icons.sketch
Binary file not shown.
12 changes: 12 additions & 0 deletions packages/smooth_app/assets/fonts/icons/qrcode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions packages/smooth_app/assets/fonts/icons/qrcode_corners.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 25 additions & 9 deletions packages/smooth_app/lib/resources/app_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,6 @@ class Lifebuoy extends AppIcon {
}) : super._(_IconsFont.lifebuoy);
}

class Outdated extends AppIcon {
const Outdated({
super.color,
super.size,
super.shadow,
super.key,
}) : super._(_IconsFont.outdated);
}

class NoPicture extends AppIcon {
const NoPicture({
super.color,
Expand All @@ -401,6 +392,15 @@ class NutritionFacts extends AppIcon {
}) : super._(_IconsFont.nutrition_facts);
}

class Outdated extends AppIcon {
const Outdated({
super.color,
super.size,
super.shadow,
super.key,
}) : super._(_IconsFont.outdated);
}

class Packaging extends AppIcon {
const Packaging({
super.color,
Expand Down Expand Up @@ -435,6 +435,22 @@ class Question extends AppIcon {
}) : super._(_IconsFont.question_circled);
}

class QRCode extends AppIcon {
const QRCode({
super.color,
super.size,
super.shadow,
super.key,
}) : super._(_IconsFont.qrcode);

const QRCode.withCorners({
super.color,
super.size,
super.shadow,
super.key,
}) : super._(_IconsFont.qrcode_corners);
}

class Share extends AppIcon {
factory Share({
Color? color,
Expand Down
4 changes: 4 additions & 0 deletions packages/smooth_app/lib/resources/app_icons_font.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ class _IconsFont {
IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData no_picture =
IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qrcode =
IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qrcode_corners =
IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData outdated =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData question_circled =
Expand Down

0 comments on commit acbe694

Please sign in to comment.