locked
Create glyph such MDL2 font icon RRS feed

  • Question

  • i want create glyph such thing in my self with which tools could i use?

    i try to take 2 glyph's and merge them to 1 picture .png ,but this like not good

    i am looking for glyph clock (i found clock only within MDL2) with pause symbol within the clock ,doesn't found

    then i decided to create one my self

    Wednesday, September 25, 2019 9:34 AM

Answers

  • To the best of my understanding , to create glyph's font icons should to use photoshop to create this ,and therefore vb.net not related

    Sorry about my question

    Your question is fine.

    However, it is an advanced question but you are a beginner. In fact you really dont know what you want you are exploring what it is and find out what there is to choose from.

    It takes years to learn it all. You are trying to do something more advanced that is beyond your current programming knowledge. You just have to learn it. But you are jumping past the beginning and trying to do something advanced.

    An Icon is a graphics object.

    A Bitmap is a graphics object.

    A glyph, in vb, has no meaning. There are things microsoft called glyphs but in general it is just another term for picture.

    A picture or image is just a word to describe a picture or image. It is not a vb object.

    In this link it describes type of image files(just glance over the pages for now):

    https://docs.microsoft.com/en-us/visualstudio/extensibility/ux-guidelines/images-and-icons-for-visual-studio?view=vs-2019

    "File types

        32-bit PNG: the preferred format for icons. A lossless data compression file format that can store a single raster (pixel) image. 32-bit PNG files support alpha-channel transparency, gamma correction, and interlacing.

        32-bit BMP: for non-WPF controls. Also called XP or high color, 32-bit BMP is an RGB/A image format, a true-color image with an alpha-channel transparency. The alpha channel is a layer of transparency designated in Adobe Photoshop that is then saved within the bitmap as an additional (fourth) color channel. A black background is added during artwork production to all 32-bit BMP files to provide a quick visual cue about the color depth. This black background represents the area to be masked out in the UI.

        32-bit ICO: for Project icons and Add Item. All ICO files are 32-bit true color with alpha-channel transparency (RGB/A). Because ICO files can store multiple sizes and color depths, Vista icons are often in an ICO format containing 16x16, 32x32, 48x48, and 256x256 image sizes. In order to display properly in Windows Explorer, ICO files must be saved-down to 24-bit and 8-bit color depths for each image size.

        XAML: for design surfaces and Windows adorners. XAML icons are vector-based image files that support scaling, rotating, filing, and transparency. They are not common in Visual Studio today but are becoming more popular because of their flexibility.

        SVG

        24-bit BMP: for the Visual Studio command bar. A true-color RGB image format, 24-bit BMP is an icon convention that creates a layer of transparency by using magenta (R=255, G=0, B=255) as a color key for a knock-out transparency layer. In a 24-bit BMP, all magenta surfaces are displayed using the background color.

        24-bit GIF: for the Visual Studio command bar. A true-color RGB image format that supports transparency. GIF files are often used in Wizard artwork and GIF animations.
    "

    BTW there are more types of files ie JPG, AVI, MPG, etc. Note those are images, sounds, video files...

    See how ICo, PNG, BMP are all type of picture files? Like a Corvette, Camaro, Volkswagen are types of cars. They all look different, are made different, but they do the same thing.

    So an image is just an image it can be on the computer screen or a page of a book. The image is the image. Like a photo republished in a book or scanned and shown as an image on a computor screen. On the computer the image can also have several forms. Just like cars. And like cars you cant take parts from one type of image and put them into another type of image. Unless you mess with it.

    We can mess with images in vb various ways. One way is making the image into a file type such as .ico or .png. The image looks the same to our eye on the computer screen but the structure of the file is different for the same image.

    https://docs.microsoft.com/en-us/dotnet/api/system.drawing.icon?view=netframework-4.8

    https://docs.microsoft.com/en-us/dotnet/api/system.drawing.font?view=netframework-4.8

    Now what is a font? A font is a file that has images of characters. Like A B C # = 1234 ....

    The fonts have high definition images of the characters. Note the word Character. Another special object.

    Now what you want to do is make your own image as what? Icon? Font? BMP? ICO? PNG?

    See there are several ways to do this. So we just have to learn the ways.

    https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/how-to-draw-text-on-a-windows-form

    We draw in vb using GDI+ graphics operations. By drawing we mean like caster has shown where we create a new image based on vb tools and objects we use to make the image in some form. We can draw a single line on a picturebox. Or we can draw a circle, or fill a rectangle, or make a green dashed line, or a red text string like "P()*(&)(*^*&%^" or we can draw a copy of an entire image like a photo of your dog.

    So confused? Sure you are. It is very complicated and takes years to learn it all.

    YOu need to go one step at a time. YOu need to make code examples of each step and understand each step before moving to the next. That is true for any programming but especially true with drawing graphics because there are soooo many waaaayyyyssss to do anything.

    So the first thing you need to do is understand exactly what a font is and how it is different from an icon bitmap image.

    Here are some examples. Make the example. Run it. Change it. Learn it. Understand it. Now try to do your two part image anyway you can.

    To make the example copy the code into an empty form. The code makes the picturebox control you don't need to. Change the form name as required. Path name of image on your system.

    Public Class Form3
        Private MyText As String = "Text Font String 123abx&*("
        Private Picturebox1 As New PictureBox With {.Parent = Me,
            .Location = New Point(100, 150), .Size = New Size(100, 100)}
    
        Private Sub Form3_Load(sender As Object, e As EventArgs) Handles Me.Load
            'create a bitmap in memory
            Dim MyBitmap As New Bitmap(64, 64)
    
            Using g As Graphics = Graphics.FromImage(MyBitmap)
                g.Clear(Color.Maroon)
                'draw the text string chr on the bitmap
                g.DrawString(Chr(169),
                              New Font("Script MT Bold", 36, FontStyle.Regular),
                              New SolidBrush(Color.AntiqueWhite),
                              10, 10)
    
                MyBitmap.Save("c:\bitmaps\mybitmap.png")
    
            End Using
    
    
            Picturebox1.ImageLocation = ("c:\bitmaps\mybitmap.png")
            Picturebox1.SizeMode = PictureBoxSizeMode.CenterImage
            Picturebox1.BackColor = Color.AntiqueWhite
    
        End Sub
    
        Private Sub Form3_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
            Using f As New Font("arial", 18, FontStyle.Bold),
                RedBr As New SolidBrush(Color.Red)
    
                e.Graphics.DrawString(MyText, f, RedBr, 20, 50)
    
                e.Graphics.DrawString("This is the copyright character: " & Chr(169),
                                      New Font("Script MT Bold", 18, FontStyle.Regular),
                                      New SolidBrush(Color.Green),
                                      10, 100)
    
            End Using
        End Sub
    End Class


    I know it is a lot. As I say you are trying to do advanced drawing. It is hard. It takes years to learn it and practice and get good at it.

    So perhaps you are trying to do to advanced and should just find an existing icon bitmap image glyph picture logo thingy? Or not? Its not that hard really. I can do it!

    :)

    PS another thing is we have different native voice languages so we have to learn the words to talk to each other about programming.

    PS Image is also a special word in vb when used with picturebox.image etc... that is the thing ...you have to learn them all.,,, it takes time... go one step at a time. Make a program that runs and play with it... now it is getting fun again! Look at easy examples and get them to run. Don't just look at a screen full of errors. Get something to run and add to it one step at a time.


    • Edited by tommytwotrain Thursday, September 26, 2019 9:34 AM
    • Marked as answer by YakirFx Wednesday, October 2, 2019 6:34 PM
    Thursday, September 26, 2019 9:13 AM

All replies

  • Yakir,

    In this thread you said: " i found easy way myself"

    Could it be you really dont know what you are talking about? Which is understandable since you are a beginner (assuming you are a beginner).

    You were shown several ways to do things in the other thread. But since you dont know the basics you dont understand it. You think you know everything but you dont.

    Since you dont know the difference between an "icon", "font", and "glyph" in vb.net language you cant understand how to use the instructions you are given. Note I said in vb language, not just your definition of what the words mean. You need to speak and understand vb.net.

    Suggest you look those words up and work some examples such as what castor and Julie and I have shown you. Then if you still have questions show what you have done and explain what you dont understand exactly and exacty what you want to do. Perhaps then someone will take their time to tray and understand the question and help you.

    Programming is often a compromise between what you know how to do, what can be done, and how much time and energy is justified doing something for the project.

    :)


    • Edited by tommytwotrain Wednesday, September 25, 2019 11:40 AM fix link
    Wednesday, September 25, 2019 11:17 AM
  • you right, glyph not relevant to vb.net

    Wednesday, September 25, 2019 4:12 PM
  • Hi,

    I'm curious why you ask such questions.

    Please provide your code so that we can assist you without code it is purely guess work.

    Best Regards,

    Julie


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 26, 2019 1:32 AM
  • To the best of my understanding , to create glyph's font icons should to use photoshop to create this ,and therefore vb.net not related

    Sorry about my question

    Thursday, September 26, 2019 3:38 AM
  • To the best of my understanding , to create glyph's font icons should to use photoshop to create this ,and therefore vb.net not related

    Sorry about my question

    Your question is fine.

    However, it is an advanced question but you are a beginner. In fact you really dont know what you want you are exploring what it is and find out what there is to choose from.

    It takes years to learn it all. You are trying to do something more advanced that is beyond your current programming knowledge. You just have to learn it. But you are jumping past the beginning and trying to do something advanced.

    An Icon is a graphics object.

    A Bitmap is a graphics object.

    A glyph, in vb, has no meaning. There are things microsoft called glyphs but in general it is just another term for picture.

    A picture or image is just a word to describe a picture or image. It is not a vb object.

    In this link it describes type of image files(just glance over the pages for now):

    https://docs.microsoft.com/en-us/visualstudio/extensibility/ux-guidelines/images-and-icons-for-visual-studio?view=vs-2019

    "File types

        32-bit PNG: the preferred format for icons. A lossless data compression file format that can store a single raster (pixel) image. 32-bit PNG files support alpha-channel transparency, gamma correction, and interlacing.

        32-bit BMP: for non-WPF controls. Also called XP or high color, 32-bit BMP is an RGB/A image format, a true-color image with an alpha-channel transparency. The alpha channel is a layer of transparency designated in Adobe Photoshop that is then saved within the bitmap as an additional (fourth) color channel. A black background is added during artwork production to all 32-bit BMP files to provide a quick visual cue about the color depth. This black background represents the area to be masked out in the UI.

        32-bit ICO: for Project icons and Add Item. All ICO files are 32-bit true color with alpha-channel transparency (RGB/A). Because ICO files can store multiple sizes and color depths, Vista icons are often in an ICO format containing 16x16, 32x32, 48x48, and 256x256 image sizes. In order to display properly in Windows Explorer, ICO files must be saved-down to 24-bit and 8-bit color depths for each image size.

        XAML: for design surfaces and Windows adorners. XAML icons are vector-based image files that support scaling, rotating, filing, and transparency. They are not common in Visual Studio today but are becoming more popular because of their flexibility.

        SVG

        24-bit BMP: for the Visual Studio command bar. A true-color RGB image format, 24-bit BMP is an icon convention that creates a layer of transparency by using magenta (R=255, G=0, B=255) as a color key for a knock-out transparency layer. In a 24-bit BMP, all magenta surfaces are displayed using the background color.

        24-bit GIF: for the Visual Studio command bar. A true-color RGB image format that supports transparency. GIF files are often used in Wizard artwork and GIF animations.
    "

    BTW there are more types of files ie JPG, AVI, MPG, etc. Note those are images, sounds, video files...

    See how ICo, PNG, BMP are all type of picture files? Like a Corvette, Camaro, Volkswagen are types of cars. They all look different, are made different, but they do the same thing.

    So an image is just an image it can be on the computer screen or a page of a book. The image is the image. Like a photo republished in a book or scanned and shown as an image on a computor screen. On the computer the image can also have several forms. Just like cars. And like cars you cant take parts from one type of image and put them into another type of image. Unless you mess with it.

    We can mess with images in vb various ways. One way is making the image into a file type such as .ico or .png. The image looks the same to our eye on the computer screen but the structure of the file is different for the same image.

    https://docs.microsoft.com/en-us/dotnet/api/system.drawing.icon?view=netframework-4.8

    https://docs.microsoft.com/en-us/dotnet/api/system.drawing.font?view=netframework-4.8

    Now what is a font? A font is a file that has images of characters. Like A B C # = 1234 ....

    The fonts have high definition images of the characters. Note the word Character. Another special object.

    Now what you want to do is make your own image as what? Icon? Font? BMP? ICO? PNG?

    See there are several ways to do this. So we just have to learn the ways.

    https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/how-to-draw-text-on-a-windows-form

    We draw in vb using GDI+ graphics operations. By drawing we mean like caster has shown where we create a new image based on vb tools and objects we use to make the image in some form. We can draw a single line on a picturebox. Or we can draw a circle, or fill a rectangle, or make a green dashed line, or a red text string like "P()*(&)(*^*&%^" or we can draw a copy of an entire image like a photo of your dog.

    So confused? Sure you are. It is very complicated and takes years to learn it all.

    YOu need to go one step at a time. YOu need to make code examples of each step and understand each step before moving to the next. That is true for any programming but especially true with drawing graphics because there are soooo many waaaayyyyssss to do anything.

    So the first thing you need to do is understand exactly what a font is and how it is different from an icon bitmap image.

    Here are some examples. Make the example. Run it. Change it. Learn it. Understand it. Now try to do your two part image anyway you can.

    To make the example copy the code into an empty form. The code makes the picturebox control you don't need to. Change the form name as required. Path name of image on your system.

    Public Class Form3
        Private MyText As String = "Text Font String 123abx&*("
        Private Picturebox1 As New PictureBox With {.Parent = Me,
            .Location = New Point(100, 150), .Size = New Size(100, 100)}
    
        Private Sub Form3_Load(sender As Object, e As EventArgs) Handles Me.Load
            'create a bitmap in memory
            Dim MyBitmap As New Bitmap(64, 64)
    
            Using g As Graphics = Graphics.FromImage(MyBitmap)
                g.Clear(Color.Maroon)
                'draw the text string chr on the bitmap
                g.DrawString(Chr(169),
                              New Font("Script MT Bold", 36, FontStyle.Regular),
                              New SolidBrush(Color.AntiqueWhite),
                              10, 10)
    
                MyBitmap.Save("c:\bitmaps\mybitmap.png")
    
            End Using
    
    
            Picturebox1.ImageLocation = ("c:\bitmaps\mybitmap.png")
            Picturebox1.SizeMode = PictureBoxSizeMode.CenterImage
            Picturebox1.BackColor = Color.AntiqueWhite
    
        End Sub
    
        Private Sub Form3_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
            Using f As New Font("arial", 18, FontStyle.Bold),
                RedBr As New SolidBrush(Color.Red)
    
                e.Graphics.DrawString(MyText, f, RedBr, 20, 50)
    
                e.Graphics.DrawString("This is the copyright character: " & Chr(169),
                                      New Font("Script MT Bold", 18, FontStyle.Regular),
                                      New SolidBrush(Color.Green),
                                      10, 100)
    
            End Using
        End Sub
    End Class


    I know it is a lot. As I say you are trying to do advanced drawing. It is hard. It takes years to learn it and practice and get good at it.

    So perhaps you are trying to do to advanced and should just find an existing icon bitmap image glyph picture logo thingy? Or not? Its not that hard really. I can do it!

    :)

    PS another thing is we have different native voice languages so we have to learn the words to talk to each other about programming.

    PS Image is also a special word in vb when used with picturebox.image etc... that is the thing ...you have to learn them all.,,, it takes time... go one step at a time. Make a program that runs and play with it... now it is getting fun again! Look at easy examples and get them to run. Don't just look at a screen full of errors. Get something to run and add to it one step at a time.


    • Edited by tommytwotrain Thursday, September 26, 2019 9:34 AM
    • Marked as answer by YakirFx Wednesday, October 2, 2019 6:34 PM
    Thursday, September 26, 2019 9:13 AM