-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add capacity to parking search results #11689
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
base: master
Are you sure you want to change the base?
Conversation
|
Can emoji be used instead? Maybe a specialized monochrome font with a few icons that we can also embed/reuse on Android (which often lacks standard emoji fonts)? |
Like in #11579? |
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
|
Now using custom OrganicMapsEmojiFont |
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few nits, @kirylkaveryn WDYT about reusing the font size?
@Rawdyrathaur would you mind implementing the same for Android, based on commits in this PR?
| [self.locationLabel sizeToFit]; | ||
|
|
||
| // Define emoji font with fallback | ||
| UIFont * emojiFont = [UIFont fontWithName:@"OrganicMapsEmojiFont" size:13]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the size be taken from the font used in the cell instead of hard-coding it?
| UIFontDescriptor * baseDescriptor = (emojiFont ?: fallbackFont).fontDescriptor; | ||
| UIFontDescriptor * cascadeDescriptor = [baseDescriptor | ||
| fontDescriptorByAddingAttributes:@{UIFontDescriptorCascadeListAttribute: @[fallbackFont.fontDescriptor]}]; | ||
| UIFont * emojiFontWithFallback = [UIFont fontWithDescriptor:cascadeDescriptor size:13]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, at least use a shared constant?
|
|
||
| // Define emoji font with fallback | ||
| UIFont * emojiFont = [UIFont fontWithName:@"OrganicMapsEmojiFont" size:13]; | ||
| UIFont * fallbackFont = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| return {}; | ||
| } | ||
|
|
||
| string FormatCapacity(string_view capacity, TypesHolder const & types) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| string FormatCapacity(string_view capacity, TypesHolder const & types) | |
| string FormatCapacity(std::string_view capacity, TypesHolder const & types) |
| else | ||
| return {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
| else | |
| return {}; |
|
@Rawdyrathaur cool, thanks! Please make a separate PR/branch with the commits from this PR/branch, so we can:
|
Support displaying parking capacity with emoji (🚘/🚲) in search results by applying the custom emoji font to the description TextView. Related to PR organicmaps#11689 Signed-off-by: Rawdyrathaur <mrathaur704@gmail.com>
Support displaying parking capacity with emoji (🚘/🚲) in search results by applying the custom emoji font to the description TextView. Related to PR organicmaps#11689 Signed-off-by: Rawdyrathaur <mrathaur704@gmail.com>
|
Not a big deal, but on iOS Debug I see a red car first, and the nice grey car (from font) then, after some time and scrolling. |
|
@kirylkaveryn @dvdmrtnz is there a way to replace fonts without blinking? Should it be done in xib/storyboard? |

Add bicycle and car icons with capacity to parking search results.