Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE - MATERIAL.CONTACT_SUPPORT not available? #2421

Closed
jsfan3 opened this issue May 20, 2018 · 10 comments

Comments

@jsfan3
Copy link
Contributor

commented May 20, 2018

I'd like to use this Material icon:
https://material.io/tools/icons/?search=support&icon=contact_support&style=baseline

I didn't find it in the FontImage constants. Can you add this, please?

@codenameone codenameone self-assigned this May 21, 2018

@codenameone codenameone added this to the Version 5.0 milestone May 21, 2018

@codenameone

This comment has been minimized.

Copy link
Owner

commented Aug 9, 2018

It seems that Google hasn't updated the icon font for the past 2-3 years: https://fonts.gstatic.com/s/materialicons/v40/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.
I think we need to dump this and generate our own font with some additional icons as a lot of stuff is missing from the material design font. I'm not sure if this is something we want to take up yet.

@codenameone codenameone modified the milestones: Version 5.0, Version 6.0 Aug 9, 2018

@jsfan3

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2018

Yes, a lot of icons for common use cases are missing. I usually don't find the icons that I need in the FontImage material icons.

@ThomasH99

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

My suggestion would be to - at least in short term - stay consistent with the current implementation by making ALL the Google material icons available. It's frustrating when you've want to use one you've identified as suitable (or at least acceptable) and then find that it is missing.

@codenameone codenameone modified the milestones: Version 7.0, Version 8.0 Jul 9, 2019

@codenameone

This comment has been minimized.

Copy link
Owner

commented Jul 9, 2019

@ThomasH99 Great, where from?
Can you add the missing material icons to the font file which google chose to stop updating?
Can you find an alternative font file that's compatible in terms of character codes with the current file?

@jsfan3

This comment has been minimized.

Copy link
Contributor Author

commented Jul 9, 2019

I've done some research and I have a good news.

It seems that the link to the currently updated ttf file is:
https://fonts.gstatic.com/s/materialicons/v47/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf

(I don't know if it's compatible in terms of character codes with the current file, but I hope so, this file is from Google)

I found this link reading google/material-design-icons#786 (comment), in which it's written:

Filenames are always the same. Each file has its unique last char + filetype:
"flUhRq6tzZclQEJ-Vdg-IuiaDsN" + [ Y.eot | c.woff2 | a.woff | Z.ttf ]

EOT
https://fonts.gstatic.com/s/materialicons/v47/flUhRq6tzZclQEJ-Vdg-IuiaDsNY.eot
WOFF2
https://fonts.gstatic.com/s/materialicons/v47/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
WOFF
https://fonts.gstatic.com/s/materialicons/v47/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff
TFF
https://fonts.gstatic.com/s/materialicons/v47/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf

For future updates, just check the lastest version available from here:
https://fonts.googleapis.com/icon?family=Material+Icons

Replace the old version number with the new one.

@jsfan3

This comment has been minimized.

Copy link
Contributor Author

commented Jul 9, 2019

codenameone added a commit that referenced this issue Jul 10, 2019
Updated the font mentioned in #2421
We will need the constants for all the missing icons in image font now
@codenameone

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

Great find!
I added the font which is the easy part, I also did a cursory examination of the font file and it seems to have the same glyph codes for everything which means this should be compatible. But I don't have a diff file with the names/codes of the new characters. So now I don't know what to add to the constants of FontImage. I can think of two options:

  • Find the CSS file from the time we made the font then find a current CSS file matching it. Then use DIFF to get the names/characters of the missing fonts. Assuming someone can locate these files somewhere I can do the rest

  • If people need a specific character they can locate it in the font visually and let us know the name+code for the character either via an issue or PR. This isn't ideal but if there's no other choice...

@jsfan3

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

Probably these are the codes of the previous file (updated on 2016) for 932 icons:
https://github.com/google/material-design-icons/blob/master/iconfont/codepoints

Probably these are the new codes (extracted by me from https://github.com/jossef/material-design-icons-iconfont/blob/master/dist/material-design-icons.css, that seems updated) for 1278 icons:
newcodes.txt

This is the diff (I hope that no icon is missing, however... 346 new icons is a good enhancement):
diff.txt

10k e951
10mp e952
11mp e953
12mp e954
13mp e955
14mp e956
15mp e957
16mp e958
17mp e959
18mp e95a
19mp e95b
1k e95c
1k_plus e95d
20mp e95e
21mp e95f
22mp e960
23mp e961
24mp e962
2k e963
2k_plus e964
2mp e965
360 e577
3k e966
3k_plus e967
3mp e968
4k e072
4k_plus e969
4mp e96a
5k e96b
5k_plus e96c
5mp e96d
6k e96e
6k_plus e96f
6mp e970
7k e971
7k_plus e972
7mp e973
8k e974
8k_plus e975
8mp e976
9k e977
9k_plus e978
9mp e979
accessibility_new e92c
accessible_forward e934
account_tree e97a
add_call e0e8
add_chart e97b
add_comment e266
add_ic_call e97c
add_link e178
add_moderator e97d
add_photo_alternate e43e
add_to_home_screen e1fe
airplanemode_off e194
airplanemode_on e195
all_inbox e97f
alternate_email e0e6
amp_stories ea13
apartment ea40
approval e982
arrow_back_ios e5e0
arrow_forward_ios e5e1
arrow_left e5de
arrow_right_alt e941
arrow_right e5df
assistant_direction e988
assistant_navigation e989
atm e573
attractions ea52
badge ea67
bakery_dining ea53
ballot e172
bar_chart e26b
bathtub ea41
bolt ea0b
bookmark_outline e867
bookmarks e98b
breakfast_dining ea54
brunch_dining ea73
bus_alert e98f
calendar_today e935
calendar_view_day e936
cancel_presentation e0e9
cancel_schedule_send ea39
car_rental ea55
car_repair ea56
cases e992
category e574
celebration ea65
cell_wifi e0ec
check_circle_outline e92d
circle_notifications e994
closed_caption_off e996
commute e940
compass_calibration e57c
compress e94d
confirmation_num e638
connected_tv e998
contactless ea71
contact_support e94c
control_camera e074
dangerous e99a
dashboard_customize e99b
deck ea42
delete_outline e92e
delivery_dining ea72
departure_board e576
desktop_access_disabled e99d
device_thermostat e1ff
device_unknown e339
dinner_dining ea57
directions_ferry e532
directions_train e534
dnd_forwardslash e611
domain_disabled e0ef
done_outline e92f
double_arrow ea50
drag_indicator e945
drive_file_move_outline e9a1
drive_file_rename_outline e9a2
drive_folder_upload e9a3
dry_cleaning ea58
duo e9a5
dynamic_feed ea14
eco ea35
edit_attributes e578
edit_off e950
emoji_emotions ea22
emoji_events ea23
emoji_flags ea1a
emoji_food_beverage ea1b
emoji_nature ea1c
emoji_objects ea24
emoji_people ea1d
emoji_symbols ea1e
emoji_transportation ea1f
enhance_photo_translate e8fc
euro ea15
expand e94f
explore_off e9a8
exposure_minus_1 e3cb
exposure_minus_2 e3cc
fastfood e57a
favorite_outline e87e
festival ea68
file_copy e173
file_download_done e9aa
file_present ea0e
filter_list_alt e94e
fireplace ea43
fit_screen ea10
flip_camera_android ea37
flip_camera_ios ea38
format_list_numbered_rtl e267
format_underline e249
goat dbff
grid_view e9b0
hail e9b1
hardware ea59
headset_off e33a
height ea16
highlight_remove e888
home_filled e9b2
home_work ea09
horizontal_split e947
house ea44
how_to_reg e174
how_to_vote e175
icecream ea69
image_search e43f
imagesearch_roller e9b4
insert_chart_outlined e26a
inventory e179
invert_colors_on e891
keyboard_control e5d3
king_bed ea45
label_important e937
label_important_outline e948
label_off e9b6
library_add_check e9b7
lightbulb e0f0
link_off e16f
liquor ea60
list_alt e0ee
local_attraction e53f
local_print_shop e555
local_restaurant e556
location_history e55a
logout e9ba
lunch_dining ea61
margin e9bb
mark_as_unread e9bc
maximize e930
meeting_room eb4f
menu_book ea19
menu_open e9bd
messenger e0ca
messenger_outline e0cb
minimize e931
missed_video_call e073
mobile_friendly e200
mobile_off e201
mobile_screen_share e0e7
money e57d
mp e9c3
multitrack_audio e1b8
museum ea36
music_off e440
my_library_add e02e
my_library_books e02f
my_library_music e030
nightlife ea62
nights_stay ea46
no_meeting_room eb4e
notes e26c
notification_important e004
notifications_on e7f7
not_listed_location e575
now_wallpaper e1bc
now_widgets e1bd
offline_bolt e932
offline_share e9c5
outdoor_grill ea47
outlined_flag e16e
padding e9c8
panorama_fisheye e40c
panorama_photosphere e9c9
panorama_photosphere_select e9ca
park ea63
pause_presentation e0ea
people_alt ea21
perm_contact_cal e8a3
perm_device_info e8a5
person_add_disabled e9cb
phone_callback e649
phone_disabled e9cc
phone_enabled e9cd
pivot_table_chart e9ce
play_circle_fill e038
policy ea17
post_add ea20
power_off e646
print_disabled e9cf
quick_contacts_dialer e0cf
quick_contacts_mail e0d0
radio_button_off e836
radio_button_on e837
railway_alert e9d1
ramen_dining ea64
recommend e9d2
remove_done e9d3
remove_moderator e9d4
repeat_on e9d6
repeat_one_on e9d7
replay_circle_filled e9d8
report_off e170
reset_tv e9d9
restore_from_trash e938
rtt e9ad
save_alt e171
saved_search ea11
scatter_plot e268
schedule_send ea0a
score e269
sd e9dd
segment e94b
send_and_archive ea0c
sentiment_satisfied_alt e0ed
settings_display e8bd
shield e9e0
shuffle_on e9e1
shutter_speed e43d
signal_cellular_alt e202
single_bed ea48
speed e9e4
sports_baseball ea51
sports_basketball ea26
sports_cricket ea27
sports ea30
sports_esports ea28
sports_football ea29
sports_golf ea2a
sports_handball ea33
sports_hockey ea2b
sports_kabaddi ea34
sports_mma ea2c
sports_motorsports ea2d
sports_rugby ea2e
sports_soccer ea2f
sports_tennis ea32
sports_volleyball ea31
square_foot ea49
stacked_bar_chart e9e6
star_outline e83a
storefront ea12
stream e9e9
supervised_user_circle e939
swap_horizontal_circle e933
swap_vert_circle e8d6
swipe e9ec
switch_account e9ed
sync_alt ea18
system_update_tv e8d7
table_chart e265
tag e9ef
takeout_dining ea74
text_rotate_up e93a
text_rotate_vertical e93b
text_rotation_angledown e93c
text_rotation_angleup e93d
text_rotation_down e93e
text_rotation_none e93f
theater_comedy ea66
thumb_down_alt e816
thumb_down_off_alt e9f2
thumb_up_alt e817
thumb_up_off_alt e9f3
toggle_off e9f5
toggle_on e9f6
transit_enterexit e579
trending_neutral e8e4
trip_origin e57b
tv_off e647
two_wheeler e9f9
unsubscribe e0eb
upload_file e9fc
vertical_split e949
video_collection e04a
view_comfortable e42a
view_in_ar e9fe
voice_over_off e94a
volunteer_activism ea70
wallet_giftcard e8f6
wallet_membership e8f7
wallet_travel e8f8
waterfall_chart ea00
waves e176
wb_shade ea01
wb_twighlight ea02
where_to_vote e177
wifi_off e648
work_off e942
work_outline e943
workspaces_filled ea0d
workspaces_outline ea0f

@jsfan3

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

Additional note: I counted the material icons included in Codename One: they are 932 (the same number of icons of the firstly linked file in the previous comment), so the previous diff should be correct (assuming that the CSS I used is updated, it was updated two months ago).

@ThomasH99

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

This is great, nice improvement! More complex than I imagined (eg I naively assumed Google would keep the character codes constant ;-)). Thanks Francesco and Shai

DurankGts added a commit to DurankGts/CodenameOne that referenced this issue Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.