How to set kerning in iPhone UILabel

Old question, but you can do it now (easily). NSMutableAttributedString *attributedString; attributedString = [[NSMutableAttributedString alloc] initWithString:@”Please get wider”]; [attributedString addAttribute:NSKernAttributeName value:@5 range:NSMakeRange(10, 5)]; [self.label setAttributedText:attributedString]; For Nov 2013, Just to expand on this great answer, here’s some totally typical code. Usually you’d set the font as well. Note in the comments the old-fashioned way using … Read more

How can I specify letter spacing or kerning, in a WPF TextBox?

I tried Glyphs and FontStretch and couldn’t easily get the result I was looking for. I was able to come up with an approach that works for my purposes. Maybe it will work for others, as well. <ItemsControl ItemsSource=”{Binding SomeString}”> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation=”Horizontal” /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text=”{Binding}” Margin=”0,0,5,0″/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> … Read more