Think of the last Hollywood family animation you saw that had a female character in the lead role. Now try to think of one that wasn't about a Disney princess. See the problem? We're supposed to have just lived through a new golden age of animation, but clearly it has been one where boys are better than girls. You can't chuck a pair of 3D glasses across a multiplex without hitting a male hero: Shrek, Kung Fu Panda, Rango, Ice Age, Despicable Me, the list goes on. Even with Pixar, the undisputed kings of computer animation, it's pretty much a guy's world: Toy Story, Monsters Inc, Finding Nemo, A Bug's Life, Up, Ratatouille, Wall-E – if anything, Pixar's product is even more male-dominated than its competitors. At best, Pixar's females are second billing (Finding Nemo's Dory, Mrs Incredible, Toy Story's Jessie); at worst they're token love-interests, stay-at-home mums and other stereotypes bent on spoiling the boys' party. Which brings us to Cars 2, its latest release and most brazenly boytastic movie. This merchandise-shifting adventure will also go down as the worst-received movie Pixar has ever made, and there's barely a female speaking part in it.

Since the very first feature animation, Snow White and the Seven Dwarfs, Disney has somehow cornered the girls' market virtually unchallenged, but – with few exceptions – its heroines have fitted the corporate mould like a dainty foot in a glass slipper. This year's Tangled brought in "Disney Princess" No 10, Rapunzel, but despite a bit of pop-culture attitude, her ultimate fate is to be ladylike, marry a prince and live happily ever after in her newfound patriarchal milieu, just like her predecessors. Girls with aspirations beyond being the next Kate Middleton or the next Jordan (whose daughter's name is Princess, by the way), will have to look far beyond the pink palace of Disney to find a decent role-model. In fact, they'll have to look all the way to Japan.

As well as Cars 2, July 29 also sees the release of Arrietty, the latest product of Studio Ghibli, Japan's leading animation studio. Best known for 2001's Oscar-winning Spirited Away, Ghibli is often lazily dubbed Japan's answer to Disney, but the comparison only holds true in terms of box-office sales (Spirited Away is still Japan's all-time top-grossing film – three other Ghibli films are in the top 10) and sales of cuddly toys. In terms of content, Studio Ghibli is a world apart. Since 1984, under the auspices of its founder and chief auteur, Hayao Miyazaki, the studio has rolled out a succession of dense, ambitious fantasy adventures, almost all of them led by strong, intelligent, independent-minded girls. Miyazaki's movies are exciting and fantastical, often involving flying machines, ecological disasters, clashing civilisations and precarious spiritual values – all rendered in clean, colourful, hand-drawn animation. His heroines also tend towards a certain type. They are adventurous and active, but also compassionate, communicative, pacifist and virtuous. Their "female" qualities and childish innocence are often what resolve the crisis at hand and bridge conflicting worlds. Miyazaki does princesses, too, but the first time we see his eponymous Princess Mononoke, she's sucking the gunshot wound of a giant wolf and spitting blood into a river.

As Miyazaki once explained: "If it's a story like, 'Everything will be fine once we defeat him,' it's better to have a male as a lead. But, if we try to make an adventure story with a male lead, we have no choice other than doing Indiana Jones. With a Nazi, or someone else who is a villain in anyone's eyes."

"He thought heroism was much more complicated than that black hat/white hat stuff," explains Helen McCarthy, a British author who has written extensively on Miyazaki and Japanese animation. "By making the hero a girl, he took all that macho stuff out of the equation and that gave him the freedom to examine heroism. His career has been a very beautiful building of an idea that the feminine doesn't preclude the heroic."

Arrietty fits right into this mould. It was adapted by Miyazaki from Mary Norton's Borrowers stories and directed by his protege, Hiromasa Yonebayashi. Arrietty herself is a miniature 14-year‑old girl, who lives with her parents in secrecy under the floorboards of a rural Japanese home, "borrowing" their possessions – a pin becomes her sword, for example. Like any little girl growing up, she's independent-minded and eager to explore the outside world. Just as Spirited Away's heroine bridged the world between the spirits and the living, so Arrietty bridges that between her little people and the full-sized humans, but she is also driven by her curiosity about boys.

Against a vibrant springtime backdrop and hints about "the nesting season", Arrietty's relationship with a sickly human boy unfolds like a courtship. In one particularly charged scene, when she finally allows the boy to see her for the first time, Arrietty's tiny figure is framed against feverishly blooming giant poppies in the garden. There are similarly subtle erotic and sexual subtexts throughout Ghibli's films. Kiki's Delivery Service, for example, centres on a 13-year-old witch who, like Arrietty, is just approaching adolescence. In her travels, Kiki encounters all ages of womanhood, each of whose sexualities is hinted at through metaphors involving fire and flames.

Children and sexuality are well off‑limits in western culture as a whole, but in these films, it's a fact of life, with no associated perversity. "It is really difficult for any of us in a western tradition to acknowledge how powerful the sexual feelings of children are," McCarthy says. "One of the wonderful things Studio Ghibli do is they recognise and accept that children are adults in miniature. That children have all these feelings encapsulated in themselves; it's just a case of them learning to organise and articulate them."

Death and violence, too, are never far away in Miyazaki's films. Even in his most innocent work, My Neighbour Totoro, a film in which there are no evil characters and no apparent conflict, the threat of a sick mother's death hangs over the bucolic idyll of its two young sisters. In Ghibli films, limbs get hacked off, mortal peril is never far away. It makes Bambi's mother dying look like a walk in the park.

With its open acknowledgment of sex and violence, you could say Studio Ghibli's work is closer to the fairy tales of European literature, which can be seen as similarly coded children's primers for the adult world that awaits them. Victorian society defanged fairy tales, then Disney finished the job, but in their original versions, they're full of horror. In early versions of Snow White, for example, the queen eats what she presumes to be her stepdaughter's heart, lungs and liver, tries to asphyxiate Snow White with corset laces, and is punished by being forced to wear red-hot iron shoes. In Disney's hands, it became a story about a nice girl who likes singing and housework.

None of this is to say that Studio Ghibli's films are entirely exemplary. Even Arrietty, despite her courage and self- determination, ends up with a partner much more appropriate to her standing – literally and metaphorically – than a boy 100 times her size. Beyond their "perfect" heroines, Ghibli's work has recurring female archetypes, possibly stereotypes: the wise old grandmother, the idealised home-making mother in her apron. "I do think there are some very strong reactionary elements to Miyazaki's work," McCarthy says. "Not anti-feminist but not in line with feminist thinking. In a lot of his work, he's saying that men and women have established functions in the social order. While you're a child, anything is possible but when grown-up women step outside their roles, they tend to have a tough time in his movies."

Nevertheless, it all makes Cars 2 look like very primitive fare. Hollywood has rarely matched Studio Ghibli's output in storytelling sophistication, but it is making progress on gender issues, at least. Last year's How to Train Your Dragon, for example, bravely centred on a wimpy geek – a feminised hero who relied on brain rather than brawn, thus winning the affections of a physically superior female. And for all its flaws, Rio centred on a neurotic male parrot who couldn't fly, shackled to a more competent female. Even Pixar is finally seeing the light. The studio's next big animation project, Brave, due for release in a year's time, has a mythological Scottish highland setting and the company's first female lead character, voiced by Kelly Macdonald. The bad news is, she's a princess.