For all the chocolate lovers out there, here is how to create a delicious chocolate bar text effect in Illustrator. You will use the Blend Tool, effects like Roughen and Chrome, different Blending modes and also the 3D Extrude & Bevel effect to create perfect chocolate squares. Enjoy!
Open a new web document. Take the Rectangle Tool (M) and draw a 16x16 px square then fill it with the brown color shown. Having this square selected go to Effect menu > Distort&Transform and apply the Transform effect. From the Object menu select Expand Appearance then Ungroup twice and you obtained the eight squares you need further.
Now let's compose the letters. Select the column of eight squares and while holding the Alt key drag them to duplicate the entire column. Do the same thing again to obtain the three columns that you will use for each of the letters. Next, put the four squares as shown in the image and multiply them (Alt+drag) to get the letter "C".
For the letter "H" all you need are two copies of the three columns then put other two squares between them. The letter "O" is similar only delete the four squares in the corners. Duplicate the letters "C" and "O" and now you have all the letters.
At this step you need a 32x32 px circle (twice the size of the square) and a copy of the brown square. Place the circle on top of the square and make sure that the center of the circle intersects the bottom left corner of the square. Select both shapes and click Intersect shape areas > Expand from the Pathfinder Panel. Do the same thing to obtain the other quarters of the circle. Next, delete the indicated squares of the letter "C" and put in their place the rounded corners.
In the image below you can see all the squares that were replaced. You are done with the letters but before you continue, Copy and Paste each one of them to the back because you will need them again later. For now you can hide them so they don't bother you.
Take a copy of the brown square then go to the Effect menu > 3D and apply the Extrude&Bevel effect. Choose the front position, a 15pt Extrude Depth and Rounded as the Bevel shape. You just obtained a perfect square of chocolate. Now go to the Appearance Panel and drag the thumbnail into the Graphic Styles Panel to save it.
If you lower the Extrude Depth from 15 pt to 10 pt you will obtain a glossier square of chocolate. Save this one into the Graphic Styles Panel also. In the image below you can see other types of chocolate that you can get by changing the fill color of the squares.
Select all the squares that compose a letter and apply the style saved earlier. For the letters "H" and the second "C" I applied the first style saved at the previous step and for the others the Chocolate square 2 style. You can choose only one of the variants if you want. When you are done select Expand Appearance from the Object menu.
Take the Rectangle Tool (M) and draw a 630 x 170 px rectangle behind the letters then go to Effect menu > Distort&Transform and apply the Roughen effect. From the Object menu select Expand Appearance then Ungroup.
Having the resulting shape selected go to Object menu > Path > Offset Path and apply a 10 px Offset value. Fill these two shapes with the colors shown then select them both and go to Object menu > Blend > Blend Options. Choose Smooth Color then go back to Object > Blend and select Make.
Copy and Paste in front the smaller shape of the two (but drag it out of the Blend group) and fill it with the linear gradient shown. Next go to Effect menu > Sketch and apply the Chrome effect. Change the Blending mode to Multiply and reduce the Opacity to 25%.
Copy and Paste the same shape twice. Leave one of them where it is (the red path) and move the second one to the right (the green path). Select both shapes and click Subtract from shape area > Expand from the Pathfinder Panel. You will obtain a compound path but go to Object menu > Compound Path and select Release. Keep only the yellow shapes you see below and fill them with the color shown. Next, having all these small shapes selected go to Effect > Blur and apply a 1.5 px Gaussian Blur then change the Blending mode to Soft Light.
At this step you need two other copies of the same shape used earlier. Move one of them up (the pink path) then repeat the previous step to obtain more highlights. The fill color and the blur radius are the same only this time set them on Luminosity.
Create even more highlights in the same way.
To create the tiny chocolate pieces, first draw a shape like in the image using the Pen Tool (P) or the Pencil Tool (N). Fill it with dark brown then go to Effect > Stylize and apply the Inner Glow effect. Next draw a smaller shape on top, as the red one and fill it with the color shown. Go to Effect menu > Blur and apply a 1 px Gaussian Blur then change the Blending mode to Luminosity. The other pieces are made in the same way only the blending modes of the small highlight shapes are changed for a different look. You can even reduce the opacity a bit if you think it's necessary.
Here are all the tiny pieces of chocolate arranged randomly around the letters:
Copy one of the chocolate squares (expanded) and select using the Direct Selection Tool (A) only the front square from the group. Go to Object menu > Path and select Add Anchor Points twice. Use these anchor points as reference and draw the three red paths between them. Stroke them with a brush called Tapered Stroke that you can find in the Brush Libraries Menu under Artistic > Artistic_Ink. Reduce the Stroke weight to 0.05 pt then go to the Object menu and select Expand Appearance. Fill the resulting stripes with the linear gradient shown.
Now multiply the new chocolate square and replace some of the others with them like in the image.
All that is left to do is to add some shadows behind the letters. For that you need the copies of the letters that I said to keep at step 4. Having all the squares that compose the letter selected click Add to shape area > Expand in the Pathfinder Panel to unite them and obtain the letter "C". Fill it with dark brown then go to Effect > Blur and apply a 4 px Gaussian Blur. Do the same thing for the other letters.
You are done and this is the final image. Now follow my example and go and eat some chocolate : )